NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release

Detailed Description

An abstract interface that event consumer can wait for events using event notifier in event loop.

Definition at line 709 of file nvscievent.h.

Collaboration diagram for NvSciEventLoopService:

Data Fields

NvSciEventService EventService
 
NvSciError(* WaitForEvent )(NvSciEventNotifier *eventNotifier, int64_t microseconds)
 Waits up to a configurable timeout for a particular event notification, servicing events with configured callbacks in the interim. More...
 
NvSciError(* WaitForMultipleEvents )(NvSciEventNotifier *const *eventNotifierArray, size_t eventNotifierCount, int64_t microseconds, bool *newEventArray)
 Waits up to a configurable timeout for any of a set of particular event notifications, servicing events with configured callbacks in the interim. More...
 
NvSciError(* WaitForMultipleEventsExt )(NvSciEventService *eventService, NvSciEventNotifier *const *eventNotifierArray, size_t eventNotifierCount, int64_t microseconds, bool *newEventArray)
 Waits up to a configurable timeout for any of a set of particular event notifications, servicing events with configured callbacks in the interim. More...
 
NvSciError(* WaitForAnyEvent )(NvSciEventNotifier *const *eventNotifierArray, size_t eventNotifierCount, int64_t microseconds, bool *newEventArray)
 Waits up to a configurable timeout for the first occurence of any of a set of particular event notifications Any asynchronous event notifiers that are pending before calling this function will be claimed by some thread for handling before this function returns. More...
 

Field Documentation

◆ EventService

NvSciEventService NvSciEventLoopService::EventService

Definition at line 710 of file nvscievent.h.

◆ WaitForAnyEvent

NvSciError(* NvSciEventLoopService::WaitForAnyEvent) (NvSciEventNotifier *const *eventNotifierArray, size_t eventNotifierCount, int64_t microseconds, bool *newEventArray)

Waits up to a configurable timeout for the first occurence of any of a set of particular event notifications Any asynchronous event notifiers that are pending before calling this function will be claimed by some thread for handling before this function returns.

Definition at line 1023 of file nvscievent.h.

◆ WaitForEvent

NvSciError(* NvSciEventLoopService::WaitForEvent) (NvSciEventNotifier *eventNotifier, int64_t microseconds)

Waits up to a configurable timeout for a particular event notification, servicing events with configured callbacks in the interim.

Any asynchronous event notifiers that are pending before calling this function will be claimed by the current thread for handling before this function returns.

eventNotifier must have been created through EventService.

This function waits up to a configurable timeout to receive a pulse event which is configured on NvSciQnxEventService_CreateNativeEventNotifier(). eventNotifier must have been created through EventService before calling.

Parameters
[in]eventNotifierNvSciEventNotifier object pointer. Valid value: thisEventNotifier must be non-NULL and should be obtained from a successful call to NvSciIpcGetEventNotifier() or NvSciEventService::CreateLocalEvent() and has not yet been freed using eventNotifier->Delete().
[in]microsecondsA 64-bit integer timeout in microsecond. Timeout must be 2msec or greater as high precision timer is not supported in DRIVE OS. Valid value: NVSCIIPC_INFINITE_WAIT, 0 to INT64_MAX.
Returns
::NvSciError, the completion code of operations:
  • ::NvSciError_Success Indicates a successful operation.
  • ::NvSciError_BadParameter Indicates an invalid input parameter.
  • ::NvSciError_InvalidState Indicates an invalid operation state.
  • ::NvSciError_NotSupported Indicates another thread already waiting for event.
  • ::NvSciError_Timeout Indicates a timeout occurrence.
  • ::NvSciError_ResourceError Indicates not enough system resources.
  • ::NvSciError_InterruptedCall Indicates an interrupt occurred.
Precondition
Invocation of NvSciEventLoopServiceCreateSafe() must be successful. Invocation of NvSciIpcGetEventNotifier() must be successful for NvSciNativeEvent. Invocation of NvSciEventService::CreateLocalEvent() must be successful for NvSciLocalEvent.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Async/Sync: Sync
  • Required privileges(QNX): None
  • Allowed execution state
    • Initialization: No
    • Operational: Yes
    • Reinit/Deinit Preparation: No
  • Implementation ASIL: ASIL D
  • Maturity: GA

Definition at line 783 of file nvscievent.h.

◆ WaitForMultipleEvents

NvSciError(* NvSciEventLoopService::WaitForMultipleEvents) (NvSciEventNotifier *const *eventNotifierArray, size_t eventNotifierCount, int64_t microseconds, bool *newEventArray)

Waits up to a configurable timeout for any of a set of particular event notifications, servicing events with configured callbacks in the interim.

Any asynchronous event notifiers that are pending before calling this function will be claimed by the current thread for handling before this function returns.

Each event notifier in eventNotifierArray must have been created through EventService.

On a successful return, for each integer i in the range [0, eventNotifierCount-1], newEventArray[i] will be true only if eventNotifierArray[i] had a new event.

Note
This function will be deprecated in future and user must use the newer version of the API which is NvSciEventWaitForMultipleEventsExt
Parameters
[in]eventNotifierArrayArray of NvSciEventNotifier object pointers. Valid value: eventNotifierArray must be non-NULL and each event notifier of array must be non-NULL and should be obtained from a successful call to NvSciIpcGetEventNotifier() or NvSciEventService::CreateLocalEvent() and has not yet been freed using eventNotifierArray[n]->Delete().
[in]eventNotifierCountEvent notifier count in eventNotifierArray.
[in]microsecondsA 64-bit integer timeout in microsecond. Timeout must be 2msec or greater as high precision timer is not supported in DRIVE OS. Valid value: NVSCIIPC_INFINITE_WAIT, 0 to INT64_MAX.
[out]newEventArrayArray of event occurrence. Valid value: newEventArray must be non-NULL
Returns
::NvSciError, the completion code of operations:
  • ::NvSciError_Success Indicates a successful operation.
  • ::NvSciError_BadParameter Indicates an invalid input parameter.
  • ::NvSciError_InvalidState Indicates an invalid operation state.
  • ::NvSciError_NotSupported Indicates another thread already waiting for events.
  • ::NvSciError_Timeout Indicates a timeout occurrence.
  • ::NvSciError_ResourceError Indicates not enough system resources.
  • ::NvSciError_InterruptedCall Indicates an interrupt occurred.
Precondition
Invocation of NvSciEventLoopServiceCreateSafe() must be successful. Invocation of NvSciIpcGetEventNotifier() must be successful for NvSciNativeEvent. Invocation of NvSciEventService::CreateLocalEvent() must be successful for NvSciLocalEvent.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Async/Sync: Sync
  • Required privileges(QNX): None
  • Allowed execution state
    • Initialization: No
    • Operational: Yes
    • Reinit/Deinit Preparation: No
  • Implementation ASIL: ASIL D
  • Maturity: GA

Definition at line 854 of file nvscievent.h.

◆ WaitForMultipleEventsExt

NvSciError(* NvSciEventLoopService::WaitForMultipleEventsExt) (NvSciEventService *eventService, NvSciEventNotifier *const *eventNotifierArray, size_t eventNotifierCount, int64_t microseconds, bool *newEventArray)

Waits up to a configurable timeout for any of a set of particular event notifications, servicing events with configured callbacks in the interim.

Any asynchronous event notifiers that are pending before calling this function will be claimed by the current thread for handling before this function returns.

Each event notifier in eventNotifierArray must have been created through EventService.

On a successful return, for each integer i in the range [0, eventNotifierCount-1], newEventArray[i] will be true only if eventNotifierArray[i] had a new event.

eventNotifierArray can be NULL then this function will not update newEventArray but still service events with configured callbacks, which are created with eventService until the specified timeout period. For this NULL case, timeout in microseconds works in this way.

  1. microseconds > 0 Callbacks will continue to be served until the timeout happens. If any callback takes long more than timeout, other callbacks associated with events which arrives before timeout will be served even after timeout.
  2. microseconds = -1 (NV_SCI_EVENT_INFINITE_WAIT) Callbacks will continue to be served and this API will never returns.
  3. microseconds == 0 Callbacks will be polled and served immediately if events are pending. This is a non-blocking call that returns immediately after servicing any pending events.
Parameters
[in]eventServicePointer to the event service object Valid value: thisEventService must be non-NULL and should be obtained from a successful call to NvSciEventLoopServiceCreateSafe() API and has not yet been freed using NvSciEventService::Delete().
[in]eventNotifierArrayArray of NvSciEventNotifier object pointers. Valid value: NULL or non-NULL. if eventNotifierArray is non-NULL, each event notifier of array must be non-NULL and should be obtained from a successful call to NvSciIpcGetEventNotifier() or NvSciEventService::CreateLocalEvent() and has not yet been freed using eventNotifierArray[n]->Delete().
[in]eventNotifierCountEvent notifier count in eventNotifierArray. Valid value: 0 if eventNotifierArray is NULL or must be non-0 if eventNotifierArray is non-NULL
[in]microsecondsA 64-bit integer timeout in microsecond. Timeout must be 2msec or greater as high precision timer is not supported in DRIVE OS. Valid value: NVSCIIPC_INFINITE_WAIT, 0 to INT64_MAX.
[out]newEventArrayArray of event occurrence. Valid vlaue: NULL if eventNotifierArray is NULL or must be non-NULL if eventNotifierArray is non-NULL
Returns
::NvSciError, the completion code of operations:
  • ::NvSciError_Success Indicates a successful operation.
  • ::NvSciError_BadParameter Indicates an invalid input parameter.
  • ::NvSciError_InvalidState Indicates an invalid operation state.
  • ::NvSciError_NotSupported Indicates another thread already waiting for events.
  • ::NvSciError_Timeout Indicates a timeout occurrence.
  • ::NvSciError_ResourceError Indicates not enough system resources.
  • ::NvSciError_InterruptedCall Indicates an interrupt occurred.
Precondition
Invocation of NvSciEventLoopServiceCreateSafe() must be successful. Invocation of NvSciIpcGetEventNotifier() must be successful for NvSciNativeEvent. Invocation of NvSciEventService::CreateLocalEvent() must be successful for NvSciLocalEvent.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: Yes
    • Async/Sync: Sync
  • Required privileges(QNX): None
  • Allowed execution state
    • Initialization: No
    • Operational: Yes
    • Reinit/Deinit Preparation: No
  • Implementation ASIL: ASIL D
  • Maturity: GA

Definition at line 947 of file nvscievent.h.


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