NVIDIA DRIVE OS Linux SDK API Reference

5.2.0 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 
76 /*******************************************************************/
77 /************************ DATA TYPES *******************************/
78 /*******************************************************************/
79 /* implements_unitdesign QNXBSP_NVSCIIPC_LIBNVSCIIPC_40 */
80 
84 typedef uint64_t NvSciIpcEndpoint;
85 
91  uint32_t nframes;
93  uint32_t frame_size;
94 };
95 
99 #define NVSCIIPC_MAX_ENDPOINT_NAME 64U
100 
101 /* NvSciIPC Event type */
103 #define NV_SCI_IPC_EVENT_READ 1U
104 
105 #define NV_SCI_IPC_EVENT_WRITE 2U
106 
107 #define NV_SCI_IPC_EVENT_CONN_EST 4U
108 
109 #define NV_SCI_IPC_EVENT_CONN_RESET 8U
110 
111 #define NV_SCI_IPC_EVENT_CONN_EST_ALL \
112  (NV_SCI_IPC_EVENT_CONN_EST | \
113  NV_SCI_IPC_EVENT_WRITE | \
114  NV_SCI_IPC_EVENT_READ)
115 
116 /*******************************************************************/
117 /********************* FUNCTION TYPES ******************************/
118 /*******************************************************************/
119 
143 
168 void NvSciIpcDeinit(void);
169 
207 NvSciError NvSciIpcOpenEndpoint(const char *endpoint, NvSciIpcEndpoint *handle);
208 
233 
267 
321 NvSciError NvSciIpcRead(NvSciIpcEndpoint handle, void *buf, size_t size,
322  int32_t *bytes);
323 
369  const volatile void **buf);
370 
410 
461 NvSciError NvSciIpcWrite(NvSciIpcEndpoint handle, const void *buf, size_t size,
462  int32_t *bytes);
463 
507  volatile void **buf);
508 
549 
580  struct NvSciIpcEndpointInfo *info);
581 
600 
689 NvSciError NvSciIpcGetEvent(NvSciIpcEndpoint handle, uint32_t *events);
690 
748  int32_t coid, int16_t pulsePriority, int16_t pulseCode,
749  void *pulseValue);
750 
753 #ifdef __cplusplus
754 }
755 #endif
756 #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)
Returns the NvSciIpc file descriptor for a given endpoint.
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:84
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:93
NvSciIpcResetEndpoint
void NvSciIpcResetEndpoint(NvSciIpcEndpoint handle)
Resets an endpoint.
nvscierror.h
NvSciIpcEndpointInfo::nframes
uint32_t nframes
Holds the number of frames.
Definition: nvsciipc.h:91
NvSciIpcEndpointInfo
Defines information about the NvSciIpc endpoint.
Definition: nvsciipc.h:89