PLCnext API Documentation  20.0.0.24462
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | List of all members
Arp::System::Nm::Notification Class Reference

Contains meta data and paylod of a Notification More...

#include <Notification.hpp>

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

Public Member Functions

 Notification ()=default
 Creates an empty Notification More...
 
 Notification (NotificationIdType id, NotificationNameIdType notificationNameId, const DateTime &timestamp, Severity severity, PayloadTypeIdType payloadTypeId, const RawPayloadType &payload)
 Constructor with all data More...
 
void Serialize (Arp::System::Rsc::Services::RscWriter &writer) const override
 Serializes the datatype. All fields of the datatype have to be serialized in use of RscWriter. More...
 
void Deserialize (Arp::System::Rsc::Services::RscReader &reader) override
 Deserializes the datatype. All fields of the datatype have to be deserialized in use of RscReader. More...
 
NotificationIdType GetId () const
 Returns the id More...
 
NotificationNameIdType GetNotificationNameId () const
 Returns the NotificationNameId More...
 
DateTime GetTimestamp () const
 Returns the timestamp More...
 
Severity GetSeverity () const
 Returns the Severity More...
 
PayloadTypeIdType GetPayloadTypeId () const
 Returns the PayloadTypeId More...
 
const RawPayloadTypeGetPayload () const
 Returns a reference to the raw payload More...
 
template<typename PayloadType >
const PayloadType GetPayloadAs () const
 Returns a view to the Payload using the defined PayloadType More...
 
- Public Member Functions inherited from Arp::System::Rsc::Services::IRscSerializable
virtual ~IRscSerializable ()=default
 default destructor More...
 

Static Public Member Functions

static size_t GetFieldCount (void)
 
- Static Public Member Functions inherited from Arp::System::Rsc::Services::IRscSerializable
static size_t GetFieldCount (void)
 Returns the count of fields of the struct type More...
 

Detailed Description

Contains meta data and paylod of a Notification

Constructor & Destructor Documentation

◆ Notification() [1/2]

Arp::System::Nm::Notification::Notification ( )
default

Creates an empty Notification

◆ Notification() [2/2]

Arp::System::Nm::Notification::Notification ( NotificationIdType  id,
NotificationNameIdType  notificationNameId,
const DateTime timestamp,
Severity  severity,
PayloadTypeIdType  payloadTypeId,
const RawPayloadType payload 
)

Constructor with all data

This function is used internally

Member Function Documentation

◆ Deserialize()

void Arp::System::Nm::Notification::Deserialize ( Arp::System::Rsc::Services::RscReader reader)
overridevirtual

Deserializes the datatype. All fields of the datatype have to be deserialized in use of RscReader.

Parameters
readerReference to RscReader.

Implements Arp::System::Rsc::Services::IRscSerializable.

◆ GetId()

NotificationIdType Arp::System::Nm::Notification::GetId ( ) const

Returns the id

◆ GetNotificationNameId()

NotificationNameIdType Arp::System::Nm::Notification::GetNotificationNameId ( ) const

Returns the NotificationNameId

◆ GetPayload()

const RawPayloadType& Arp::System::Nm::Notification::GetPayload ( ) const

Returns a reference to the raw payload

◆ GetPayloadAs()

template<typename PayloadType >
const PayloadType Arp::System::Nm::Notification::GetPayloadAs ( ) const
inline

Returns a view to the Payload using the defined PayloadType

Throws an exception if the PayloadType does not match the PayloadTypeId of the Notification.

◆ GetPayloadTypeId()

PayloadTypeIdType Arp::System::Nm::Notification::GetPayloadTypeId ( ) const

Returns the PayloadTypeId

◆ GetSeverity()

Severity Arp::System::Nm::Notification::GetSeverity ( ) const

Returns the Severity

◆ GetTimestamp()

DateTime Arp::System::Nm::Notification::GetTimestamp ( ) const

Returns the timestamp

◆ Serialize()

void Arp::System::Nm::Notification::Serialize ( Arp::System::Rsc::Services::RscWriter writer) const
overridevirtual

Serializes the datatype. All fields of the datatype have to be serialized in use of RscWriter.

Parameters
writerReference to RscWriter

Implements Arp::System::Rsc::Services::IRscSerializable.


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