WPILibC++ 2023.4.3-108-ge5452e3
wpi::Event Class Referencefinal

An atomic signaling event for synchronization. More...

#include <wpi/Synchronization.h>

Public Member Functions

 Event (bool manualReset=false, bool initialState=false)
 Constructor. More...
 
 ~Event ()
 
 Event (const Event &)=delete
 
Eventoperator= (const Event &)=delete
 
 Event (Event &&rhs)
 
Eventoperator= (Event &&rhs)
 
 operator WPI_Handle () const
 Gets the event handle (e.g. More...
 
WPI_EventHandle GetHandle () const
 Gets the event handle (e.g. More...
 
void Set ()
 Sets the event to signaled state. More...
 
void Reset ()
 Sets the event to non-signaled state. More...
 

Detailed Description

An atomic signaling event for synchronization.

Events have binary state (signaled or not signaled) and may be either automatically reset or manually reset. Automatic-reset events go to non-signaled state when a WaitForObject is woken up by the event; manual-reset events require Reset() to be called to set the event to non-signaled state; if Reset() is not called, any waiter on that event will immediately wake when called.

Constructor & Destructor Documentation

◆ Event() [1/3]

wpi::Event::Event ( bool  manualReset = false,
bool  initialState = false 
)
inlineexplicit

Constructor.

Parameters
manualResettrue for manual reset, false for automatic reset
initialStatetrue to make the event initially in signaled state

◆ ~Event()

wpi::Event::~Event ( )
inline

◆ Event() [2/3]

wpi::Event::Event ( const Event )
delete

◆ Event() [3/3]

wpi::Event::Event ( Event &&  rhs)
inline

Member Function Documentation

◆ GetHandle()

WPI_EventHandle wpi::Event::GetHandle ( ) const
inline

Gets the event handle (e.g.

for WaitForObject).

Returns
handle

◆ operator WPI_Handle()

wpi::Event::operator WPI_Handle ( ) const
inlineexplicit

Gets the event handle (e.g.

for WaitForObject).

Returns
handle

◆ operator=() [1/2]

Event & wpi::Event::operator= ( const Event )
delete

◆ operator=() [2/2]

Event & wpi::Event::operator= ( Event &&  rhs)
inline

◆ Reset()

void wpi::Event::Reset ( )
inline

Sets the event to non-signaled state.

◆ Set()

void wpi::Event::Set ( )
inline

Sets the event to signaled state.


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