PLCnext API Documentation 25.0.2.69
InterfaceAddressPayload.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6
7#pragma once
8
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
20class ARP_CXX_SYMBOL_EXPORT InterfaceAddressPayload : public Arp::System::Nm::SpecializedPayload<InterfaceAddressPayload>
21{
22public:
24 using ArgumentsType = std::tuple<const char*, const char*, const char*, bool>;
26 explicit InterfaceAddressPayload(const ArgumentsType& args);
28 const String ipAddress, const String& netmask, const String& gateway, bool isVolatile);
29 String GetIpAddress() const;
30 String GetNetmask() const;
31 String GetGateway() const;
32 bool IsVolatile() const;
33
34private:
35 // Do not change the order of the field initialization!
36 size_t indexIpAddress = this->AddField<String>();
37 size_t indexNetmask = this->AddField<String>();
38 size_t indexGateway = this->AddField<String>();
39 size_t indexIsVolatile = this->AddField<bool>();
40};
41
42
43}}}}} // 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 with information of the interface address of a Profinet station
Definition: InterfaceAddressPayload.hpp:21
std::tuple< const char *, const char *, const char *, bool > ArgumentsType
ArgumentsType to be used with NonBlockingNotificationRegistration3
Definition: InterfaceAddressPayload.hpp:24
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