PLCnext API Documentation 25.0.2.69
MessageWithStationNamePayload.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
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*>;
28 explicit MessageWithStationNamePayload(const ArgumentsType& args);
29 MessageWithStationNamePayload(const String& message, const String& stationName);
30 String GetStationName() const;
31
32private:
33 // Do not change the order of the field initialization!
34 size_t indexStationName = this->AddField<String>();
35};
36
37
38}}}}} // namespace Arp::System::NmPayload::Io::ProfinetStack
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
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
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:44
SpecializedPayload(const Notification &notification)
Creates a view on a Notification object
Definition: SpecializedPayload.hpp:211
Root namespace for the PLCnext API