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

Rt event for bidirectional exchange of events in the ESM context. 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.
 

Public Member Functions

 RtEvent ()
 Constructs an RtEvent instance.
 
 RtEvent (const RtEvent &arg)=delete
 Copy constructor.
 
RtEventoperator= (const RtEvent &arg)=delete
 Assignment operator.
 
 ~RtEvent (void)
 Destructs this instance and frees all resources.
 
void Set (void)
 Signals the event to the subscriber.
 
bool SetAndWaitOne (unsigned long timeout=0)
 Signals the event to the subscriber and waits blocking on the done by the subscriber. More...
 
bool IsSubscriberReady (void) const
 Returns state of the subscriber to processing incoming signaled events. More...
 
bool WaitOne (unsigned long timeout=0, bool setSubscriberReady=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.
 
void SetSubscriberReady (bool isSubscriberReady)
 Sets the state of the subscriber to processing incoming signaled events. More...
 
Impl & GetImpl (void)
 For internal use only.
 
const Impl & GetImpl (void) const
 

Detailed Description

Rt event for bidirectional exchange of events in the ESM context. Instances of this will be created by the configuration of ESM and can be get with the RtEventManagerProxy.

Member Function Documentation

◆ IsSubscriberReady()

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

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.

◆ SetAndWaitOne()

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

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

Parameters
timeoutTimeout 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  isSubscriberReady)

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

Parameters
isSubscriberReadyThe 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  timeout = 0,
bool  setSubscriberReady = true 
)

Waits blocking on the signal of the sender.

Parameters
timeoutTimeout 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.
setSubscriberReadyIf 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 files: