8 #include "Arp/System/Commons/Logging.h" 9 #include "Arp/Plc/Commons/Esm/RtEventManagerSharedData.hpp" 10 #include "boost/interprocess/sync/interprocess_semaphore.hpp" 12 namespace Arp {
namespace Plc {
namespace Commons {
namespace Esm
58 bool WaitOne(
unsigned long timeoutArg = 0,
bool setSubscriberReadyArg =
true);
68 boost::interprocess::interprocess_semaphore semaphore1;
69 boost::interprocess::interprocess_semaphore semaphore2;
70 std::atomic<bool> isSubscriberReady;
83 this->isSubscriberReady = isSubscriberReadyArg;
88 return this->isSubscriberReady;
bool WaitOne(unsigned long timeoutArg=0, bool setSubscriberReadyArg=true)
Waits blocking on the signal of the sender.
RtEvent & operator=(const RtEvent &arg)=delete
Assignment operator.
void SetSubscriberReady(bool isSubscriberReadyArg)
Sets the state of the subscriber to processing incoming signaled events.
Definition: RtEvent.hpp:81
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:35
bool IsSubscriberReady(void)
Returns state of the subscriber to processing incoming signaled events.
Definition: RtEvent.hpp:86
void Set(void)
Signals the event to the subscriber.
Definition: Loggable.hxx:18
boost::interprocess::offset_ptr< T > Ptr
Returned pointer types are shared memory based offset pointer.
Definition: SharedMemory.hpp:26
String GetName()
Returns the identifier of the rt event.
Definition: RtEvent.hpp:76
bool SetAndWaitOne(unsigned long timeoutArg=0)
Signals the event to the subscriber and waits blocking on the done by the subscriber.
Root namespace for the PLCnext API
void Done(void)
Signals that the event was processed by the subscriber to the sender.
~RtEvent(void)=default
Destructs this instance and frees all resources.
RtEventManagerSharedData::Ptr< RtEvent > Ptr
Shared pointer type of RtEvent.
Definition: RtEvent.hpp:24
RtEvent(const String &nameArg)
Constructs an RtEvent instance.
Rt event for bidirectional exchange of events in the ESM context. E.g. this is used to trigger a task...
Definition: RtEvent.hpp:20