| 
    PLCnext API Documentation 25.6.0.37
    
   | 
 
Generic access to a IPayload More...
#include <GenericPayload.hpp>

Public Types | |
| using | ValueType = RawPayloadType::value_type | 
| using | FieldType = Arp::Base::Rsc::Commons::RscType | 
Public Member Functions | |
| GenericPayload (const Notification ¬ification) | |
| Read only access to a notification More... | |
| GenericPayload (PayloadTypeIdType id, const String &name) | |
| Manually create a payload | |
| GenericPayload (PayloadTypeIdType id, const String &name, const RawPayloadType &payloadArg) | |
| Manually create a payload | |
| GenericPayload (PayloadTypeIdType id, const String &name, const Notification ¬ification) | |
| Manually create a payload | |
| PayloadTypeIdType | GetId () const override | 
| Returns the PayloadTypeId More... | |
| const String | GetName () const override | 
| Returns the PayloadTypeName More... | |
| const RawPayloadType & | GetAsRawPayloadType () const override | 
| Returns a reference to the raw payload object More... | |
| const String | ToString () const override | 
| Get a human readable string representation More... | |
| RawPayloadType && | MoveOutRawPayload () | 
| bool | IsReadOnly () const | 
| Returns true if this object is a view to a Notification | |
| size_t | GetFieldCount () const | 
| Returns the number of fields of the Payload | |
| const ValueType & | GetFieldValue (size_t fieldIndex) const | 
| Returns the raw value of a field More... | |
| FieldType | GetFieldType (size_t fieldIndex) const | 
| Returns the FieldType for the given field More... | |
| size_t | GetFieldIndexFormatString () const | 
| Returnsd the field index of the format string | |
| size_t | AddField (FieldType type) | 
| Adds a field with the given FieldType More... | |
| void | SetFieldValue (size_t fieldIndex, const ValueType &value) | 
| virtual PayloadTypeIdType | GetId () const =0 | 
| Returns the PayloadTypeId More... | |
| virtual const String | GetName () const =0 | 
| Returns the PayloadTypeName More... | |
| virtual const RawPayloadType & | GetAsRawPayloadType () const =0 | 
| Returns a reference to the raw payload object More... | |
| virtual const String | ToString () const =0 | 
| Get a human readable string representation More... | |
Generic access to a IPayload
      
  | 
  explicit | 
Read only access to a notification
The access to the Notification is by const reference. The Notification object must available as long as this object lives to avoid a dangling reference!
| size_t Arp::System::Nm::GenericPayload::AddField | ( | GenericPayload::FieldType | type | ) | 
Adds a field with the given FieldType
      
  | 
  overridevirtual | 
Returns a reference to the raw payload object
The reference object must not be destroyed while the reference is used!
Implements Arp::System::Nm::IPayload.
| GenericPayload::FieldType Arp::System::Nm::GenericPayload::GetFieldType | ( | size_t | fieldIndex | ) | const | 
Returns the FieldType for the given field
| fieldIndex | index of the field as returned by AddField | 
| const GenericPayload::ValueType & Arp::System::Nm::GenericPayload::GetFieldValue | ( | size_t | fieldIndex | ) | const | 
Returns the raw value of a field
| fieldIndex | index of the field as returned by AddField | 
      
  | 
  overridevirtual | 
Returns the PayloadTypeId
Implements Arp::System::Nm::IPayload.
      
  | 
  overridevirtual | 
Returns the PayloadTypeName
Implements Arp::System::Nm::IPayload.
      
  | 
  overridevirtual | 
Get a human readable string representation
Implements Arp::System::Nm::IPayload.