PLCnext API Documentation  22.9.0.33
NetworkConfigurationChangedPayload.hpp
1 //
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 
14 namespace Arp { namespace System { namespace NmPayload { namespace Device
15 {
16 
17 
21  : public Arp::System::Nm::SpecializedPayload<NetworkConfigurationChangedPayload>
22 {
23 public:
25  using ArgumentsType = std::tuple<uint32, const char*, const char*, bool>;
26 
27 
28  using SpecializedPayload::SpecializedPayload;
29 
32 
39  uint32 deviceId, const String& parameter, const String& value, bool successful);
40 
43 
46 
47  ARP_DEPRECATED("Use GetValue()")
50  String GetValued() const;
51 
53  String GetValue() const;
54 
55 private:
56  static String GetFormatString(bool successful);
57 
58 private:
59  // Do not change the order of the field initialization!
60  size_t indexDeviceId = this->AddField<uint32>();
61  size_t indexChangedParameter = this->AddField<String>();
62  size_t indexValue = this->AddField<String>();
63 };
64 
65 
66 }}}} // namespace Arp::System::NmPayload::Device
Payload class for changes of the network configuration
Definition: NetworkConfigurationChangedPayload.hpp:22
NetworkConfigurationChangedPayload(uint32 deviceId, const String &parameter, const String &value, bool successful)
Creates a payload object
NetworkConfigurationChangedPayload(const ArgumentsType &args)
Creates a payload object
std::tuple< uint32, const char *, const char *, bool > ArgumentsType
ArgumentsType to be used with NonBlockingNotificationRegistration3
Definition: NetworkConfigurationChangedPayload.hpp:25
String GetValue() const
Returns the new value of the changed parameter
String GetChangedParameter() const
Returns the name of the changed parameter
String GetValued() const
Returns the new value of the changed parameter
uint32 GetDeviceId() const
Returns the id of the affected device
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:43
size_t AddField()
Adds a payload field
Definition: SpecializedPayload.hpp:106
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:35
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API