NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release

Detailed Description

An abstract interface to notify event to event consumer and to register event handler of the event consumer client process.

Definition at line 457 of file nvscievent.h.

Data Fields

NvSciError(* SetHandler )(NvSciEventNotifier *thisEventNotifier, void(*callback)(void *cookie), void *cookie, uint32_t priority)
 Registers or unregisters a handler for a particular event notifier. More...
 
void(* Delete )(NvSciEventNotifier *thisEventNotifier)
 Unregisters any previously-registered event handler and delete this event notifier. More...
 

Field Documentation

◆ Delete

void(* NvSciEventNotifier::Delete) (NvSciEventNotifier *thisEventNotifier)

Unregisters any previously-registered event handler and delete this event notifier.

If the event handler's callback is concurrently executing in another thread, then this function will still return immediately, but the event handler will not be deleted until after the callback returns.

This function releases the NvSciEventNotifier and unregisters the event handler. It should be called when the NvSciEventNotifier is no longer required.

Note
This API can be called in Init mode to release resources in error handling or to test functionality.
Parameters
[in]thisEventNotifierThe event handler to unregister and delete. Valid value: thisEventNotifier must be non-NULL and should be obtained from a successful call to NvSciIpcGetEventNotifier() or NvSciEventService::CreateLocalEvent().
Returns
void
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: Yes
    • Operational: No
    • Reinit/Deinit Preparation: Yes
  • Implementation ASIL: ASIL D
  • Maturity: GA

Definition at line 556 of file nvscievent.h.

◆ SetHandler

NvSciError(* NvSciEventNotifier::SetHandler) (NvSciEventNotifier *thisEventNotifier, void(*callback)(void *cookie), void *cookie, uint32_t priority)

Registers or unregisters a handler for a particular event notifier.

In general, handlers for distinct event notifiers may run concurrently with one another. The NvSciEventService promises however that no single event notifier will have its handler invoked concurrently.

Handlers for both NvSciNativeEvent and NvSciLocalEvent can be registered.

Parameters
[in]thisEventNotifierThe event notifier that reports each event. Must not already be in use by another event loop. 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 thisEventNotifier->Delete().
[in]callbackThe function to call to handle the event. If NULL, handler will be unregistered. Valid value: non-NULL is to register handler and NULL is to unregister handler
[in]cookieThe parameter to pass to the callback.
[in]priorityThe parameter is not supported and any value is ignored.
Returns
::NvSciError, the completion code of operations:
  • ::NvSciError_Success Indicates a successful operation.
  • ::NvSciError_BadParameter Indicates an invalid or NULL argument.
  • ::NvSciError_NotPermitted Indicates incorrect API group usage.
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: Yes
    • Signal handler: Yes
    • Thread-safe: Yes
    • Async/Sync: Sync
  • Required privileges(QNX): None
  • Allowed execution state
    • Initialization: Yes
    • Operational: No
    • Reinit/Deinit Preparation: No
  • Implementation ASIL: ASIL D
  • Maturity: GA

Definition at line 508 of file nvscievent.h.


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