NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.2 Release
For Test and Development only
nvsciipc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2019, 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 /*******************************************************************/
82 typedef uint64_t NvSciIpcEndpoint;
83 
89  uint32_t nframes;
91  uint32_t frame_size;
92 };
93 
97 #define NVSCIIPC_MAX_ENDPOINT_NAME 64U
98 
99 /* NvSciIPC Event type */
101 #define NV_SCI_IPC_EVENT_READ 1U
102 
103 #define NV_SCI_IPC_EVENT_WRITE 2U
104 
105 #define NV_SCI_IPC_EVENT_CONN_EST 4U
106 
107 #define NV_SCI_IPC_EVENT_CONN_RESET 8U
108 
109 #define NV_SCI_IPC_EVENT_CONN_EST_ALL \
110  (NV_SCI_IPC_EVENT_CONN_EST | \
111  NV_SCI_IPC_EVENT_WRITE | \
112  NV_SCI_IPC_EVENT_READ)
113 
114 /*******************************************************************/
115 /********************* FUNCTION TYPES ******************************/
116 /*******************************************************************/
117 
141 
166 void NvSciIpcDeinit(void);
167 
203 NvSciError NvSciIpcOpenEndpoint(const char *endpoint, NvSciIpcEndpoint *handle);
204 
229 
263 
315 NvSciError NvSciIpcRead(NvSciIpcEndpoint handle, void *buf, size_t size,
316  int32_t *bytes);
317 
363  const volatile void **buf);
364 
404 
453 NvSciError NvSciIpcWrite(NvSciIpcEndpoint handle, const void *buf, size_t size,
454  int32_t *bytes);
455 
499  volatile void **buf);
500 
541 
570  struct NvSciIpcEndpointInfo *info);
571 
588 
670 NvSciError NvSciIpcGetEvent(NvSciIpcEndpoint handle, uint32_t *events);
671 
727  int32_t coid, int16_t pulsePriority, int16_t pulseCode,
728  void *pulseValue);
729 
732 #ifdef __cplusplus
733 }
734 #endif
735 #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:82
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:91
NvSciIpcResetEndpoint
void NvSciIpcResetEndpoint(NvSciIpcEndpoint handle)
Resets an endpoint.
nvscierror.h
NvSciIpcEndpointInfo::nframes
uint32_t nframes
Holds the number of frames.
Definition: nvsciipc.h:89
NvSciIpcEndpointInfo
Defines information about the NvSciIpc endpoint.
Definition: nvsciipc.h:87