NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only
nvsciipc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
11 #ifndef INCLUDED_NVSCIIPC_H
12 #define INCLUDED_NVSCIIPC_H
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #include <stdint.h>
19 #include <stddef.h>
20 #include <nvscierror.h>
21 #include <nvscievent.h>
22 
214 /*******************************************************************/
215 /************************ DATA TYPES *******************************/
216 /*******************************************************************/
217 /* implements_unitdesign QNXBSP_NVSCIIPC_LIBNVSCIIPC_40 */
218 
222 typedef uint64_t NvSciIpcEndpoint;
223 
229  uint32_t nframes;
231  uint32_t frame_size;
232 };
233 
238 #define NVSCIIPC_MAX_ENDPOINT_NAME 64U
239 
240 /* NvSciIPC Event type */
242 #define NV_SCI_IPC_EVENT_READ 1U
243 
244 #define NV_SCI_IPC_EVENT_WRITE 2U
245 
246 #define NV_SCI_IPC_EVENT_CONN_EST 4U
247 
248 #define NV_SCI_IPC_EVENT_CONN_RESET 8U
249 
250 #define NV_SCI_IPC_EVENT_CONN_EST_ALL (NV_SCI_IPC_EVENT_CONN_EST | NV_SCI_IPC_EVENT_WRITE | NV_SCI_IPC_EVENT_READ)
251 
252 /*******************************************************************/
253 /********************* FUNCTION TYPES ******************************/
254 /*******************************************************************/
255 
280 
305 void NvSciIpcDeinit(void);
306 
350 NvSciError NvSciIpcOpenEndpoint(const char *endpoint, NvSciIpcEndpoint *handle);
351 
398  NvSciIpcEndpoint *handle, NvSciEventService *eventService);
399 
441  NvSciEventNotifier **eventNotifier);
442 
467 
501 
554 NvSciError NvSciIpcRead(NvSciIpcEndpoint handle, void *buf, size_t size,
555  int32_t *bytes);
556 
604  const volatile void **buf);
605 
651 
701 NvSciError NvSciIpcWrite(NvSciIpcEndpoint handle, const void *buf, size_t size,
702  int32_t *bytes);
703 
750  volatile void **buf);
751 
799 
831  struct NvSciIpcEndpointInfo *info);
832 
833 #ifndef __QNX__
834 
852 #endif /* !__QNX__ */
853 
951 NvSciError NvSciIpcGetEvent(NvSciIpcEndpoint handle, uint32_t *events);
952 
953 #ifdef __QNX__
954 
1015 NvSciError NvSciIpcSetQnxPulseParam(NvSciIpcEndpoint handle,
1016  int32_t coid, int16_t pulsePriority, int16_t pulseCode,
1017  void *pulseValue);
1018 #endif /* __QNX__ */
1019 
1022 #ifdef __cplusplus
1023 }
1024 #endif
1025 #endif /* INCLUDED_NVSCIIPC_H */
NvSciIpcGetEndpointInfo
NvSciError NvSciIpcGetEndpointInfo(NvSciIpcEndpoint handle, struct NvSciIpcEndpointInfo *info)
Returns endpoint information.
NvSciError
NvSciError
Return/error codes for all NvSci functions.
Definition: nvscierror.h:45
NvSciIpcWriteAdvance
NvSciError NvSciIpcWriteAdvance(NvSciIpcEndpoint handle)
Writes the next frame to the endpoint.
nvscievent.h
NVIDIA Software Communications Interface (SCI) : NvSci Event Service
NvSciIpcDeinit
void NvSciIpcDeinit(void)
De-initializes the NvSciIpc library.
NvSciIpcCloseEndpoint
void NvSciIpcCloseEndpoint(NvSciIpcEndpoint handle)
Closes an endpoint with the given handle.
NvSciIpcOpenEndpoint
NvSciError NvSciIpcOpenEndpoint(const char *endpoint, NvSciIpcEndpoint *handle)
Opens an endpoint with the given name.
NvSciIpcOpenEndpointWithEventService
NvSciError NvSciIpcOpenEndpointWithEventService(const char *endpoint, NvSciIpcEndpoint *handle, NvSciEventService *eventService)
Opens an endpoint with the given name and event service.
NvSciIpcRead
NvSciError NvSciIpcRead(NvSciIpcEndpoint handle, void *buf, size_t size, int32_t *bytes)
Returns the contents of the next frame from an endpoint.
NvSciEventNotifier
An abstract interface to notify event to event consumer and to register event handler of the event co...
Definition: nvscievent.h:309
NvSciIpcGetLinuxEventFd
NvSciError NvSciIpcGetLinuxEventFd(NvSciIpcEndpoint handle, int32_t *fd)
Returns the NvSciIpc file descriptor for a given endpoint.
NvSciIpcReadAdvance
NvSciError NvSciIpcReadAdvance(NvSciIpcEndpoint handle)
Removes the next frame from an endpoint.
NvSciIpcResetEndpoint
void NvSciIpcResetEndpoint(NvSciIpcEndpoint handle)
Resets an endpoint.
NvSciIpcGetEvent
NvSciError NvSciIpcGetEvent(NvSciIpcEndpoint handle, uint32_t *events)
Get Events.
NvSciIpcReadGetNextFrame
NvSciError NvSciIpcReadGetNextFrame(NvSciIpcEndpoint handle, const volatile void **buf)
Returns a pointer to the location of the next frame from an endpoint.
NvSciIpcEndpoint
uint64_t NvSciIpcEndpoint
Handle to the NvSciIpc endpoint.
Definition: nvsciipc.h:222
NvSciIpcWriteGetNextFrame
NvSciError NvSciIpcWriteGetNextFrame(NvSciIpcEndpoint handle, volatile void **buf)
Returns a pointer to the location of the next frame for writing data.
NvSciIpcInit
NvSciError NvSciIpcInit(void)
Initializes the NvSciIpc library.
NvSciIpcWrite
NvSciError NvSciIpcWrite(NvSciIpcEndpoint handle, const void *buf, size_t size, int32_t *bytes)
Writes a new frame to the endpoint.
NvSciIpcEndpointInfo::frame_size
uint32_t frame_size
Holds the frame size in bytes.
Definition: nvsciipc.h:231
NvSciIpcGetEventNotifier
NvSciError NvSciIpcGetEventNotifier(NvSciIpcEndpoint handle, NvSciEventNotifier **eventNotifier)
Get NvSciIpc event notifier.
nvscierror.h
NvSciIpcEndpointInfo::nframes
uint32_t nframes
Holds the number of frames.
Definition: nvsciipc.h:229
NvSciIpcEndpointInfo
Defines information about the NvSciIpc endpoint.
Definition: nvsciipc.h:227
NvSciEventService
An abstract interface for a program's event handling infrastructure.
Definition: nvscievent.h:161