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

This class implements a ipc event for the bidirectional exchange of realtime events. More...

#include <RtEvent.hpp>

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

Public Types

typedef RtEventManagerSharedData::Ptr< RtEventPtr
 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 name identifier of the event. More...
 
void Set (void)
 Signals the event. More...
 
void Done (void)
 Signals that the event was processed. More...
 
bool WaitOne (unsigned long timeoutArg=0, bool setSubscriberReadyArg=true)
 Waits blocking on signal of the event. More...
 
bool SetAndWaitOne (unsigned long timeoutArg=0)
 Fires the event and waits blocking on that the event has been processed. More...
 
void SetSubscriberReady (bool isSubscriberReadyArg=true)
 Sets the state of the event subscriber. More...
 
bool IsSubscriberReady (void)
 Returns state of the event subscriber. More...
 

Detailed Description

This class implements a ipc event for the bidirectional exchange of realtime events.

Member Typedef Documentation

◆ Ptr

Shared pointer type of RtEvent.

Constructor & Destructor Documentation

◆ RtEvent() [1/2]

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

Constructs an RtEvent instance.

◆ RtEvent() [2/2]

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.

Member Function Documentation

◆ Done()

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

Signals that the event was processed.

◆ GetName()

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

Returns name identifier of the event.

Returns
The name identifier of the event.

◆ IsSubscriberReady()

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

Returns state of the event subscriber.

Returns
The state of the event subscriber. "true" marks the event subscriber is ready.

◆ 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.

◆ SetAndWaitOne()

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

Fires the event and waits blocking on that the event has been processed.

Parameters
timeoutArgTimeout in milliseconds to wait for the event to become processed. If the value is set to 0 (default) the calling thread will wait infinitly 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 is the timeout was reached before the event was processed, otherwise true is returned.

◆ SetSubscriberReady()

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

Sets the state of the event subscriber.

Parameters
isSubscriberReadyArgThe state of the event subscriber. "true" marks the event subscriber is ready.

◆ WaitOne()

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

Waits blocking on signal of the event.

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

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