PLCnext API Documentation  21.0.0.35466
InterfaceAddressPayload.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 
7 #pragma once
8 
9 #include "Arp/System/Nm/SpecializedPayload.hpp"
10 
11 
12 namespace Arp { namespace System { namespace NmPayload { namespace Io { namespace ProfinetStack
13 {
14 
15 
18 class InterfaceAddressPayload : public Arp::System::Nm::SpecializedPayload<InterfaceAddressPayload>
19 {
20 public:
21  using SpecializedPayload::SpecializedPayload;
22 
29  const String ipAddress, const String& netmask, const String& gateway, bool isVolatile);
30 
32  String GetIpAddress() const;
33 
35  String GetNetmask() const;
36 
38  String GetGateway() const;
39 
41  bool IsVolatile() const;
42 
43 private:
44  // Do not change the order of the field initialization!
45  size_t indexIpAddress = this->AddField<String>();
46  size_t indexNetmask = this->AddField<String>();
47  size_t indexGateway = this->AddField<String>();
48  size_t indexIsVolatile = this->AddField<bool>();
49 };
50 
51 
52 }}}}} // namespace Arp::System::NmPayload::Io::ProfinetStack
InterfaceAddressPayload(const String ipAddress, const String &netmask, const String &gateway, bool isVolatile)
Creates a payload object
bool IsVolatile() const
Returns true, if the parameters are volatile
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:42
Root namespace for the PLCnext API
System components used by the System, Device, Plc or Io domains.
Payload class with information of the interface address of a Profinet station
Definition: InterfaceAddressPayload.hpp:18