PLCnext API Documentation 23.0.2.9
MessageWithStationNamePayload.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6
7#pragma once
8
9
10#include "Arp/System/Nm/SpecializedPayload.hpp"
11#include <tuple>
12
13
14namespace Arp { namespace System { namespace NmPayload { namespace Io { namespace ProfinetStack
15{
16
17
21 : public Arp::System::Nm::SpecializedPayload<MessageWithStationNamePayload>
22{
23public:
25 using ArgumentsType = std::tuple<const char*, const char*>;
26
27 using SpecializedPayload::SpecializedPayload;
28
31
35 MessageWithStationNamePayload(const String& message, const String& stationName);
36
39
40private:
41 // Do not change the order of the field initialization!
42 size_t indexStationName = this->AddField<String>();
43};
44
45
46}}}}} // namespace Arp::System::NmPayload::Io::ProfinetStack
Payload class for a message containing a Profinet station name
Definition: MessageWithStationNamePayload.hpp:22
std::tuple< const char *, const char * > ArgumentsType
ArgumentsType to be used with NonBlockingNotificationRegistration3
Definition: MessageWithStationNamePayload.hpp:25
String GetStationName() const
Returns the Profinet station name
MessageWithStationNamePayload(const String &message, const String &stationName)
Creates a payload object
MessageWithStationNamePayload(const ArgumentsType &args)
Creates a payload object
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:43
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API