VectorNav C Library
Data Structures | Functions
event.h File Reference
#include "vn/int.h"
#include "vn/error.h"
#include "vn/bool.h"

Go to the source code of this file.

Data Structures

struct  VnEvent
 Structure representing an event. More...
 

Functions

VnError VnEvent_initialize (VnEvent *event)
 Initializes a VnEvent structure. More...
 
VnError VnEvent_wait (VnEvent *event)
 Causes the calling thread to wait on an event until the event is signalled. More...
 
VnError VnEvent_waitUs (VnEvent *event, uint32_t timeoutUs)
 Causes the calling thread to wait on an event until the event is signalled. More...
 
VnError VnEvent_waitMs (VnEvent *event, uint32_t timeoutMs)
 Causes the calling thread to wait on an event until the event is signalled. More...
 
VnError VnEvent_signal (VnEvent *event)
 Signals an event. More...
 

Detailed Description

{COMMON_HEADER}

DESCRIPTION

This header file contains structures and functions useful events and signals.

Function Documentation

VnError VnEvent_initialize ( VnEvent event)

Initializes a VnEvent structure.

Parameters
[in]eventThe VnEvent structure to initialize.
Returns
Any errors encountered.
VnError VnEvent_signal ( VnEvent event)

Signals an event.

Parameters
[in]eventThe associated event.
Returns
Any errors encountered.
VnError VnEvent_wait ( VnEvent event)

Causes the calling thread to wait on an event until the event is signalled.

If the event is signalled, the value E_SIGNALED will be returned.

Parameters
[in]eventThe associated VnEvent.
Returns
Any errors encountered.
VnError VnEvent_waitMs ( VnEvent event,
uint32_t  timeoutMs 
)

Causes the calling thread to wait on an event until the event is signalled.

If the event is signalled, the value E_SIGNALED will be returned.

Parameters
[in]eventThe associated VnEvent.
[in]timeoutMsThe number of milliseconds to wait before the thread stops waiting on the event. If a timeout does occur, the value E_TIMEOUT will be returned.
Returns
Any errors encountered.
VnError VnEvent_waitUs ( VnEvent event,
uint32_t  timeoutUs 
)

Causes the calling thread to wait on an event until the event is signalled.

If the event is signalled, the value E_SIGNALED will be returned.

Parameters
[in]eventThe associated VnEvent.
[in]timeoutUsThe number of microseconds to wait before the thread stops waiting on the event. If a timeout does occur, the value E_TIMEOUT will be returned.
Returns
Any errors encountered.