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