Libargus API Libargus Camera API

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions
Argus::IEventProvider Class Reference
CaptureSession

Interface for an object which generates Events (such as CaptureSession). More...

`#include <EventProvider.h>`

Inheritance diagram for Argus::IEventProvider:

List of all members.

## Public Member Functions

virtual Status | getAvailableEventTypes (std::vector< EventType > *types) const =0
| Returns a list of event types that this provider can generate.
virtual EventQueue * | createEventQueue (const std::vector< EventType > &eventTypes, Status *status=NULL)=0
| Creates an event queue for events of the given type(s)
virtual Status | waitForEvents (const std::vector< EventQueue * > &queues, uint64_t timeout=TIMEOUT_INFINITE)=0
| Waits for and transfers any pending events from the provider to the provided queues.
virtual Status | waitForEvents (EventQueue *queue, uint64_t timeout=TIMEOUT_INFINITE)=0
| Variant of waitForEvents() that waits for only one EventQueue.

## Static Public Member Functions

static const InterfaceID & | id ()

## Protected Member Functions

| ~IEventProvider ()
Protected Member Functions inherited from Argus::Interface
| Interface ()
| ~Interface ()

## Detailed Description

Interface for an object which generates Events (such as CaptureSession).

Any generated Events are initially stored by the provider itself, and they are not copied out to public EventQueues until waitForEvents() is called. If at any time there is an event type offered by a provider that is not accepted by an active EventQueue created by that provider, all events of that type will be discarded.

Definition at line 56 of file EventProvider.h.

## Constructor & Destructor Documentation

Argus::IEventProvider::~IEventProvider | ( |  | ) |

inline protected

Definition at line 117 of file EventProvider.h.

## Member Function Documentation

virtual EventQueue* Argus::IEventProvider::createEventQueue | ( | const std::vector< EventType > & | eventTypes,
|  | Status * | status = `NULL`
| ) |  |

pure virtual

Creates an event queue for events of the given type(s)

Parameters:

  [in] | eventTypes | The list of event types for the queue.
  [out] | status | An optional pointer to return success/status.

Returns:
  the new EventQueue object, or NULL on failure.

virtual Status Argus::IEventProvider::getAvailableEventTypes | ( | std::vector< EventType > * | types | ) | const

pure virtual

Returns a list of event types that this provider can generate.

Parameters:

  [out] | types | A vector that will be populated by the available event types.

Returns:
  success/status of the call.

static const InterfaceID& Argus::IEventProvider::id | ( |  | ) |

inline static

Definition at line 59 of file EventProvider.h.

virtual Status Argus::IEventProvider::waitForEvents | ( | const std::vector< EventQueue * > & | queues,
|  | uint64_t | timeout = `TIMEOUT_INFINITE`
| ) |  |

pure virtual

Waits for and transfers any pending events from the provider to the provided queues.

Ownership of all events transfered to a queue will be passed from the provider to the queue, and these event object pointers will remain valid until the queue is destroyed or until the next call to this function with that queue. In other words, any events in a queue will be destroyed when the queue is provided to another call of this function, regardless of whether or not it receives any new events, or when the queue is destroyed.

If more than one given queue accepts events of the same type, only the first of these queues will receive events of that type.

Any events that are not copied to queues by this function are left in the provider until they are queried using a queue receiving events of that type.

If there are no pending events of the requested types at the time this function is called, it will block until one is available or a timeout occurs.

Parameters:

  [in] | queues | The list of queues to transfer events to.
  [in] | timeout | The maximum time (in nanoseconds) to wait for new events.

Returns:
  success/status of the call.

virtual Status Argus::IEventProvider::waitForEvents | ( | EventQueue * | queue,
|  | uint64_t | timeout = `TIMEOUT_INFINITE`
| ) |  |

pure virtual

Variant of waitForEvents() that waits for only one EventQueue.

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

- include/Argus/EventProvider.h