mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-10 16:55:58 +00:00
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
/**
|
|
* @file
|
|
* @brief Event interface definition.
|
|
*/
|
|
#ifndef STA_CORE_EVENT_HPP
|
|
#define STA_CORE_EVENT_HPP
|
|
|
|
|
|
namespace sta
|
|
{
|
|
/**
|
|
* @brief Interface for event objects.
|
|
*
|
|
* @ingroup sta_core
|
|
*/
|
|
class Event
|
|
{
|
|
public:
|
|
/**
|
|
* @brief Set event flag.
|
|
*
|
|
* @param flags nr. to set
|
|
*/
|
|
virtual void set(uint32_t flags) = 0;
|
|
/**
|
|
* @brief Clear event flag.
|
|
*
|
|
* @param flags nr. to clear
|
|
*/
|
|
virtual void clear(uint32_t flags) = 0;
|
|
/**
|
|
* @brief Check event flag state w/o changing it.
|
|
*
|
|
* @return Value of event flag
|
|
*/
|
|
virtual uint32_t get() = 0;
|
|
/**
|
|
* @brief Wait until event flag is set. Timeout default to forever.
|
|
*
|
|
* @param flags flag nr. to wait for.
|
|
* @param timeout timeout in ms., default to forever.
|
|
*/
|
|
virtual uint32_t wait(uint32_t flags, uint32_t timeout = osWaitForever) = 0;
|
|
};
|
|
} // namespace sta
|
|
|
|
|
|
#endif //STA_CORE_EVENT_HPP
|