NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
nvsciipc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2022, 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 
223 /*******************************************************************/
224 /************************ DATA TYPES *******************************/
225 /*******************************************************************/
226 
230 typedef uint64_t NvSciIpcEndpoint;
231 
233 
239  uint32_t nframes;
241  uint32_t frame_size;
242 };
243 
248 #define NVSCIIPC_MAX_ENDPOINT_NAME 64U
249 
250 /* NvSciIPC Event type */
252 #define NV_SCI_IPC_EVENT_READ 0x01U
253 
254 #define NV_SCI_IPC_EVENT_WRITE 0x02U
255 
256 #define NV_SCI_IPC_EVENT_CONN_EST 0x04U
257 
258 #define NV_SCI_IPC_EVENT_CONN_RESET 0x08U
259 
260 #define NV_SCI_IPC_EVENT_WRITE_EMPTY 0x10U
261 
262 #define NV_SCI_IPC_EVENT_CONN_EST_ALL (NV_SCI_IPC_EVENT_CONN_EST | \
263  NV_SCI_IPC_EVENT_WRITE | NV_SCI_IPC_EVENT_WRITE_EMPTY | \
264  NV_SCI_IPC_EVENT_READ)
265 
266 /*******************************************************************/
267 /********************* FUNCTION TYPES ******************************/
268 /*******************************************************************/
269 
294 
319 void NvSciIpcDeinit(void);
320 
366 NvSciError NvSciIpcOpenEndpoint(const char *endpoint, NvSciIpcEndpoint *handle);
367 
417  NvSciIpcEndpoint *handle, NvSciEventService *eventService);
418 
460  NvSciEventNotifier **eventNotifier);
461 
489 
520 
561 
605 
661 NvSciError NvSciIpcRead(NvSciIpcEndpoint handle, void *buf, size_t size,
662  int32_t *bytes);
663 
717 NvSciError NvSciIpcReadSafe(NvSciIpcEndpoint handle, void *buf, uint32_t size,
718  uint32_t *bytes);
719 
767  const volatile void **buf);
768 
815 
868 NvSciError NvSciIpcWrite(NvSciIpcEndpoint handle, const void *buf, size_t size,
869  int32_t *bytes);
870 
920 NvSciError NvSciIpcWriteSafe(NvSciIpcEndpoint handle, const void *buf,
921  uint32_t size, uint32_t *bytes);
922 
969  volatile void **buf);
970 
1018 
1050  NvSciIpcEndpointInfo *info);
1051 
1052 #ifndef __QNX__
1053 
1071 #endif /* !__QNX__ */
1072 
1171 NvSciError NvSciIpcGetEvent(NvSciIpcEndpoint handle, uint32_t *events);
1172 
1173 #ifdef __QNX__
1174 
1236 NvSciError NvSciIpcSetQnxPulseParam(NvSciIpcEndpoint handle,
1237  int32_t coid, int16_t pulsePriority, int16_t pulseCode,
1238  void *pulseValue);
1239 #endif /* __QNX__ */
1240 
1243 #ifdef __cplusplus
1244 }
1245 #endif
1246 #endif /* INCLUDED_NVSCIIPC_H */
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.
NvSciIpcGetEndpointInfo
NvSciError NvSciIpcGetEndpointInfo(NvSciIpcEndpoint handle, NvSciIpcEndpointInfo *info)
Returns endpoint information.
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.
NvSciIpcResetEndpointSafe
NvSciError NvSciIpcResetEndpointSafe(NvSciIpcEndpoint handle)
Resets 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:230
NvSciIpcReadSafe
NvSciError NvSciIpcReadSafe(NvSciIpcEndpoint handle, void *buf, uint32_t size, uint32_t *bytes)
Returns the contents 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.
NvSciIpcInit
NvSciError NvSciIpcInit(void)
Initializes the NvSciIpc library.
NvSciIpcCloseEndpointSafe
NvSciError NvSciIpcCloseEndpointSafe(NvSciIpcEndpoint handle, bool clear)
Closes an endpoint with the given handle (safety version)
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:241
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:239
NvSciIpcEndpointInfo
Defines information about the NvSciIpc endpoint.
Definition: nvsciipc.h:237
NvSciIpcWriteSafe
NvSciError NvSciIpcWriteSafe(NvSciIpcEndpoint handle, const void *buf, uint32_t size, uint32_t *bytes)
Writes a new frame to the endpoint.
NvSciEventService
An abstract interface for a program's event handling infrastructure.
Definition: nvscievent.h:161