PLCnext API Documentation  22.9.0.33
Public Types | Public Member Functions | List of all members
Arp::System::Nm::StringPayload Class Reference

Payload class to send a String More...

#include <StringPayload.hpp>

Inheritance diagram for Arp::System::Nm::StringPayload:
Inheritance graph

Public Types

using ArgumentsType = const char *
 ArgumentsType to be used with NonBlockingNotificationRegistration3 More...
 
- Public Types inherited from Arp::System::Nm::SpecializedPayload< StringPayload >
using ValueType = RawPayloadType::value_type
 
using FieldType = Arp::System::Rsc::Services::RscType
 

Public Member Functions

 StringPayload (const String &payload)
 Creates a payload with a string More...
 
 StringPayload (const char *payload)
 Creates a payload with a string More...
 
 SpecializedPayload (const Notification &notification)
 Creates a view on a Notification object More...
 
 SpecializedPayload (const GenericPayload &payloadArg)
 Creates a view on a GenericPayload object More...
 
 SpecializedPayload (const String &formatString)
 Creates a SpecializedPayload with an format string More...
 
- Public Member Functions inherited from Arp::System::Nm::SpecializedPayload< StringPayload >
 SpecializedPayload (const Notification &notification)
 Creates a view on a Notification object More...
 
 SpecializedPayload (const GenericPayload &payloadArg)
 Creates a view on a GenericPayload object More...
 
PayloadTypeIdType GetId () const final
 Returns the PayloadTypeId More...
 
const String GetName () const final
 Returns the PayloadTypeName More...
 
const RawPayloadTypeGetAsRawPayloadType () const final
 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 on a Payload More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Arp::System::Nm::SpecializedPayload< StringPayload >
static PayloadTypeIdType GetPayloadTypeId ()
 Returns the PayloadTypeId More...
 
static const String GetPayloadTypeName ()
 Returns the PayloadType name More...
 
- Protected Member Functions inherited from Arp::System::Nm::SpecializedPayload< StringPayload >
 SpecializedPayload (const String &formatString)
 Creates a SpecializedPayload with an format string More...
 
void SetFormatString (const String &formatString)
 
size_t AddField ()
 Adds a payload field More...
 
size_t AddField ()
 Adds a payload field More...
 
void SetFieldValue (size_t fieldIndex, const T &value)
 Sets the value of a payload field More...
 
void SetFieldValue (size_t fieldIndex, T value)
 Sets the value of a payload field More...
 
const T GetFieldValueAs (size_t fieldIndex) const
 Gets a field value with the specified type More...
 
const T GetFieldValueAs (size_t fieldIndex) const
 Gets a field value with the specified type More...
 
size_t GetFieldCount () const
 Gets the number of fields in the payload More...
 
- Static Protected Member Functions inherited from Arp::System::Nm::SpecializedPayload< StringPayload >
static size_t FieldIndexToFormatStringIndex (size_t fieldIndex)
 

Detailed Description

Payload class to send a String

The payload is passed as contructor argument. If the string is longer than the RawPayloadLegth The String is split into multiple payload fields. The format string is adjusted so the string can be reconstructed.

Member Typedef Documentation

◆ ArgumentsType

ArgumentsType to be used with NonBlockingNotificationRegistration3

Constructor & Destructor Documentation

◆ StringPayload() [1/2]

Arp::System::Nm::StringPayload::StringPayload ( const String payload)
explicit

Creates a payload with a string

Parameters
strpayload value

◆ StringPayload() [2/2]

Arp::System::Nm::StringPayload::StringPayload ( const char *  payload)
explicit

Creates a payload with a string

Parameters
strpayload value

Member Function Documentation

◆ SpecializedPayload() [1/3]

Creates a view on a GenericPayload object

The GenericPayload is just referenced so it must stay alive to avoid dangling references.

◆ SpecializedPayload() [2/3]

Creates a view on a Notification object

The Notification is just referenced so it must stay alive to avoid dangling references.

◆ SpecializedPayload() [3/3]

Creates a SpecializedPayload with an format string

Parameters
formatStringFormatstring to generate a huiman readable representation

The documentation for this class was generated from the following file: