PLCnext API Documentation  22.9.0.33
Public Types | Public Member Functions | Protected Member Functions | List of all members
Arp::Plc::Commons::Esm::RtEvent Class Reference

Rt event for bidirectional exchange of events in the ESM context. E.g. this is used to trigger a task execution cycle of PreDefinedEventTask and UserDefinedEventTask. In this case the task is the subscriber of the event. Instances of this will be created by the configuration of ESM and can be get with the RtEventManagerProxy. More...

#include <RtEvent.hpp>

Inheritance diagram for Arp::Plc::Commons::Esm::RtEvent:
Inheritance graph

Public Types

using Ptr = RtEventManagerSharedData::Ptr< RtEvent >
 Shared pointer type of RtEvent. More...
 

Public Member Functions

 RtEvent (const String &nameArg)
 Constructs an RtEvent instance. More...
 
 RtEvent (const RtEvent &arg)=delete
 Copy constructor. More...
 
RtEventoperator= (const RtEvent &arg)=delete
 Assignment operator. More...
 
 ~RtEvent (void)=default
 Destructs this instance and frees all resources. More...
 
String GetName ()
 Returns the identifier of the rt event. More...
 
void Set (void)
 Signals the event to the subscriber. More...
 
bool SetAndWaitOne (unsigned long timeoutArg=0)
 Signals the event to the subscriber and waits blocking on the done by the subscriber. More...
 
bool IsSubscriberReady (void)
 Returns state of the subscriber to processing incoming signaled events. More...
 
bool WaitOne (unsigned long timeoutArg=0, bool setSubscriberReadyArg=true)
 Waits blocking on the signal of the sender. More...
 
void Done (void)
 Signals that the event was processed by the subscriber to the sender. More...
 
void SetSubscriberReady (bool isSubscriberReadyArg)
 Sets the state of the subscriber to processing incoming signaled events. More...
 

Protected Member Functions

 RtEvent (const String &nameArg, uint32 value)
 Constructs an RtEvent instance. - For internal use only! More...
 

Detailed Description

Rt event for bidirectional exchange of events in the ESM context. E.g. this is used to trigger a task execution cycle of PreDefinedEventTask and UserDefinedEventTask. In this case the task is the subscriber of the event. Instances of this will be created by the configuration of ESM and can be get with the RtEventManagerProxy.

Member Typedef Documentation

◆ Ptr

Shared pointer type of RtEvent.

Constructor & Destructor Documentation

◆ RtEvent() [1/3]

Arp::Plc::Commons::Esm::RtEvent::RtEvent ( const String nameArg)

Constructs an RtEvent instance.

◆ RtEvent() [2/3]

Arp::Plc::Commons::Esm::RtEvent::RtEvent ( const RtEvent arg)
delete

Copy constructor.

◆ ~RtEvent()

Arp::Plc::Commons::Esm::RtEvent::~RtEvent ( void  )
default

Destructs this instance and frees all resources.

◆ RtEvent() [3/3]

Arp::Plc::Commons::Esm::RtEvent::RtEvent ( const String nameArg,
uint32  value 
)
protected

Constructs an RtEvent instance. - For internal use only!

Member Function Documentation

◆ Done()

void Arp::Plc::Commons::Esm::RtEvent::Done ( void  )

Signals that the event was processed by the subscriber to the sender.

◆ GetName()

String Arp::Plc::Commons::Esm::RtEvent::GetName ( )
inline

Returns the identifier of the rt event.

Returns
The identifier of the rt event.

◆ IsSubscriberReady()

bool Arp::Plc::Commons::Esm::RtEvent::IsSubscriberReady ( void  )
inline

Returns state of the subscriber to processing incoming signaled events.

Returns
State of the subscriber. "true" marks the subscriber is ready to processing incoming signaled events.

◆ operator=()

RtEvent& Arp::Plc::Commons::Esm::RtEvent::operator= ( const RtEvent arg)
delete

Assignment operator.

◆ Set()

void Arp::Plc::Commons::Esm::RtEvent::Set ( void  )

Signals the event to the subscriber.

◆ SetAndWaitOne()

bool Arp::Plc::Commons::Esm::RtEvent::SetAndWaitOne ( unsigned long  timeoutArg = 0)

Signals the event to the subscriber and waits blocking on the done by the subscriber.

Parameters
timeoutArgTimeout in milliseconds to wait for the done to become processed. If the value is set to 0 (default) the calling thread will wait infinitely or until the event is signaled.
Returns
Returns false if the timeout was reached before the event was signaled, otherwise true is returned.

◆ SetSubscriberReady()

void Arp::Plc::Commons::Esm::RtEvent::SetSubscriberReady ( bool  isSubscriberReadyArg)
inline

Sets the state of the subscriber to processing incoming signaled events.

Parameters
isSubscriberReadyArgThe state of the subscriber. "true" marks the subscriber is ready to processing incoming signaled events.

◆ WaitOne()

bool Arp::Plc::Commons::Esm::RtEvent::WaitOne ( unsigned long  timeoutArg = 0,
bool  setSubscriberReadyArg = true 
)

Waits blocking on the signal of the sender.

Parameters
timeoutArgTimeout in milliseconds to wait for the incoming signal of sender. If the value is set to 0 (default) the calling thread will wait infinitely or until the event is set.
setSubscriberReadyArgIf the parameter true, the method sets the subscriber ready implicit. Default is this parameter true.
Returns
Returns false if the timeout was reached before the event was signaled, otherwise true is returned.

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