• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - CDP Core
  • OSAPIEvent
  • 4.11.14

OSAPIEvent Class

The OSAPIEvent is a synchronisation semaphore based on event. More...

Header: #include <OSAPI/Process/OSAPIEvent.h>
  • List of all members, including inherited members

Public Functions

OSAPIEvent()
virtual ~OSAPIEvent()
void Destroy()
int IsSignalled()
void Reset()
void Set()
int TimedWait(int64_t delayInNs)
int Wait()

Detailed Description

The OSAPIEvent is a synchronisation semaphore based on event.

Note: By default created in non-signalled state.

Usage

OSAPIEvent m_event;
<some thread>
m_event.Wait(); // waits for event to be set
m_event.Reset(); // resets event so it can be reused
<some other thread>
m_event.Set(); // sets the event

See also OSAPIEventWithFd.

Member Function Documentation

OSAPIEvent::OSAPIEvent()

Constructs an event.

[virtual] OSAPIEvent::~OSAPIEvent()

Destructs the event.

void OSAPIEvent::Destroy()

Deletes the event and releases allocated resources.

int OSAPIEvent::IsSignalled()

Checks if event is signalled.

If object is signalled, return value is 1. If not, return value is 0.

void OSAPIEvent::Reset()

Clears the event.

void OSAPIEvent::Set()

Sets the event. A task waiting for the event will continue.

int OSAPIEvent::TimedWait(int64_t delayInNs)

Waits for event to occur or for the specified delay.

Returns 1 if event occured or 0 on timeout.

int OSAPIEvent::Wait()

Waits for event to occur and clears the event.

Returns 1 if event occured, else 0 is returned.

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top