NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release

Detailed Description

IO Stream API.

Typedefs

typedef enum dwIOStreamFlags dwIOStreamFlags
 Enumerated type for IO Stream flags. More...
 
typedef struct dwIOStreamObject * dwIOStreamHandle_t
 Stream handle. More...
 

Enumerations

enum  dwIOStreamFlags {
  DW_IOSTREAM_READ = 1 << 0,
  DW_IOSTREAM_WRITE = 1 << 1,
  DW_IOSTREAM_APPEND = 1 << 2,
  DW_IOSTREAM_FORCE_BUFFERED = 1 << 3
}
 Enumerated type for IO Stream flags. More...
 

Functions

DW_API_PUBLIC dwStatus dwIOStream_openFile (dwIOStreamHandle_t *stream, const char8_t *path, uint64_t flags, dwContextHandle_t context)
 Open a file stream with the given path and read / write parameters. More...
 
DW_API_PUBLIC dwStatus dwIOStream_wrapFileDescriptor (dwIOStreamHandle_t *stream, int posixFd)
 Adopt a currently open POSIX file descriptor. More...
 
DW_API_PUBLIC dwStatus dwIOStream_close (dwIOStreamHandle_t stream)
 Close a file stream that was opened with dwIOStream_openFile. More...
 

Typedef Documentation

◆ dwIOStreamFlags

Enumerated type for IO Stream flags.

◆ dwIOStreamHandle_t

typedef struct dwIOStreamObject* dwIOStreamHandle_t

Stream handle.

Definition at line 54 of file IOStream.h.

Enumeration Type Documentation

◆ dwIOStreamFlags

Enumerated type for IO Stream flags.

Enumerator
DW_IOSTREAM_READ 

Stream flag for read access.

DW_IOSTREAM_WRITE 

Stream flag for write access.

DW_IOSTREAM_APPEND 

Stream flag for append access.

DW_IOSTREAM_FORCE_BUFFERED 

Stream flag to forcing buffered underlying filestream.

Definition at line 44 of file IOStream.h.

Function Documentation

◆ dwIOStream_close()

DW_API_PUBLIC dwStatus dwIOStream_close ( dwIOStreamHandle_t  stream)

Close a file stream that was opened with dwIOStream_openFile.

Parameters
streamA dwIOStreamHandle_t to a currently open IO Stream handle.
Returns
DW_SUCCESS If the stream is successfully closed.
DW_INVALID_HANDLE If the stream is NULL.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: Yes

◆ dwIOStream_openFile()

DW_API_PUBLIC dwStatus dwIOStream_openFile ( dwIOStreamHandle_t *  stream,
const char8_t *  path,
uint64_t  flags,
dwContextHandle_t  context 
)

Open a file stream with the given path and read / write parameters.

Parameters
[out]streamA dwIOStreamHandle_t that will be updated with the newly opened IO Stream.
[in]pathThe path to the stream to be opened.
[in]flagsThe create flags used to open the stream.
[in]contextThe DriveWorks context.
Returns
DW_SUCCESS If the file is successfully opened and the stream is updated.
DW_INVALID_ARGUMENT If the stream is NULL.
DW_INVALID_HANDLE If the context is a nullptr.
DW_FILE_NOT_FOUND If the file could not be opened.
DW_FILE_INVALID If the requested flags are invalid for the file.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwIOStream_wrapFileDescriptor()

DW_API_PUBLIC dwStatus dwIOStream_wrapFileDescriptor ( dwIOStreamHandle_t *  stream,
int  posixFd 
)

Adopt a currently open POSIX file descriptor.

Parameters
[out]streamA dwIOStreamHandle_t that will be updated with the newly adopted IO Stream.
[in]posixFdA POSIX file descriptor to a currently open file.
Returns
DW_SUCCESS If the POSIX file descriptor is successfully adopted.
DW_INVALID_ARGUMENT If the stream is NULL or the POSIX file descriptor is invalid.
DW_INVALID_HANDLE If the newly opened file stream is a nullptr and the stream output parameter cannot be updated.
DW_FAILURE If the stream fails to open the backing file.
Note
This function will allocate memory to hold the stream backed by the adopted file.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No