NVIDIA DRIVE OS Linux SDK API Reference

5.2.3 Release
For Test and Development only
nvsciipc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020, 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 
77 /*******************************************************************/
78 /************************ DATA TYPES *******************************/
79 /*******************************************************************/
80 /* implements_unitdesign QNXBSP_NVSCIIPC_LIBNVSCIIPC_40 */
81 
86 typedef uint64_t NvSciIpcEndpoint;
87 
94  uint32_t nframes;
96  uint32_t frame_size;
97 };
98 
104 #define NVSCIIPC_MAX_ENDPOINT_NAME 64U
105 
106 /* NvSciIPC Event type */
108 #define NV_SCI_IPC_EVENT_READ 1U
109 
110 #define NV_SCI_IPC_EVENT_WRITE 2U
111 
112 #define NV_SCI_IPC_EVENT_CONN_EST 4U
113 
114 #define NV_SCI_IPC_EVENT_CONN_RESET 8U
115 
116 #define NV_SCI_IPC_EVENT_CONN_EST_ALL \
117  (NV_SCI_IPC_EVENT_CONN_EST | \
118  NV_SCI_IPC_EVENT_WRITE | \
119  NV_SCI_IPC_EVENT_READ)
120 
121 /*******************************************************************/
122 /********************* FUNCTION TYPES ******************************/
123 /*******************************************************************/
124 
149 
175 void NvSciIpcDeinit(void);
176 
215 NvSciError NvSciIpcOpenEndpoint(const char *endpoint, NvSciIpcEndpoint *handle);
216 
259 NvSciError NvSciIpcOpenEndpointWithEventService(const char *endpoint,
261  NvSciIpcEndpoint *handle, NvSciEventService *eventService);
263 
300 NvSciError NvSciIpcGetEventNotifier(NvSciIpcEndpoint handle,
302  NvSciEventNotifier **eventNotifier);
304 
330 
365 
420 NvSciError NvSciIpcRead(NvSciIpcEndpoint handle, void *buf, size_t size,
421  int32_t *bytes);
422 
469  const volatile void **buf);
470 
511 
563 NvSciError NvSciIpcWrite(NvSciIpcEndpoint handle, const void *buf, size_t size,
564  int32_t *bytes);
565 
610  volatile void **buf);
611 
653 
685  struct NvSciIpcEndpointInfo *info);
686 
706 
796 NvSciError NvSciIpcGetEvent(NvSciIpcEndpoint handle, uint32_t *events);
797 
856  int32_t coid, int16_t pulsePriority, int16_t pulseCode,
857  void *pulseValue);
858 
861 #ifdef __cplusplus
862 }
863 #endif
864 #endif /* INCLUDED_NVSCIIPC_H */
NvSciIpcWriteAdvance
NvSciError NvSciIpcWriteAdvance(NvSciIpcEndpoint handle)
Writes the next frame to the endpoint.
NvSciError
NvSciError
Return/error codes for all NvSci functions.
Definition: nvscierror.h:45
NvSciIpcInit
NvSciError NvSciIpcInit(void)
Initializes the NvSciIpc library.
NvSciIpcGetLinuxEventFd
NvSciError NvSciIpcGetLinuxEventFd(NvSciIpcEndpoint handle, int32_t *fd)
NvSciIpcOpenEndpoint
NvSciError NvSciIpcOpenEndpoint(const char *endpoint, NvSciIpcEndpoint *handle)
Opens an endpoint with the given name.
NvSciIpcSetQnxPulseParam
NvSciError NvSciIpcSetQnxPulseParam(NvSciIpcEndpoint handle, int32_t coid, int16_t pulsePriority, int16_t pulseCode, void *pulseValue)
Sets the event pulse parameters for QNX.
NvSciIpcWrite
NvSciError NvSciIpcWrite(NvSciIpcEndpoint handle, const void *buf, size_t size, int32_t *bytes)
Writes a new frame to the endpoint.
NvSciIpcReadGetNextFrame
NvSciError NvSciIpcReadGetNextFrame(NvSciIpcEndpoint handle, const volatile void **buf)
Returns a pointer to the location of the next frame from an endpoint.
NvSciIpcWriteGetNextFrame
NvSciError NvSciIpcWriteGetNextFrame(NvSciIpcEndpoint handle, volatile void **buf)
Returns a pointer to the location of the next frame for writing data.
NvSciIpcGetEvent
NvSciError NvSciIpcGetEvent(NvSciIpcEndpoint handle, uint32_t *events)
Get Events.
NvSciIpcRead
NvSciError NvSciIpcRead(NvSciIpcEndpoint handle, void *buf, size_t size, int32_t *bytes)
Returns the contents of the next frame from an endpoint.
NvSciIpcEndpoint
uint64_t NvSciIpcEndpoint
Handle to the NvSciIpc endpoint.
Definition: nvsciipc.h:86
NvSciIpcDeinit
void NvSciIpcDeinit(void)
De-initializes the NvSciIpc library.
NvSciIpcGetEndpointInfo
NvSciError NvSciIpcGetEndpointInfo(NvSciIpcEndpoint handle, struct NvSciIpcEndpointInfo *info)
Returns endpoint information.
NvSciIpcCloseEndpoint
void NvSciIpcCloseEndpoint(NvSciIpcEndpoint handle)
Closes an endpoint with the given handle.
NvSciIpcReadAdvance
NvSciError NvSciIpcReadAdvance(NvSciIpcEndpoint handle)
Removes the next frame from an endpoint.
NvSciIpcEndpointInfo::frame_size
uint32_t frame_size
Holds the frame size in bytes.
Definition: nvsciipc.h:96
NvSciIpcResetEndpoint
void NvSciIpcResetEndpoint(NvSciIpcEndpoint handle)
Resets an endpoint.
nvscierror.h
NvSciIpcEndpointInfo::nframes
uint32_t nframes
Holds the number of frames.
Definition: nvsciipc.h:94
NvSciIpcEndpointInfo
Defines information about the NvSciIpc endpoint.
Definition: nvsciipc.h:92