Proactive Safety Framework  1.0
NvPSD.h File Reference
#include "pss_protocol.h"

Go to the source code of this file.

Classes

struct  NvPSDCallbacks
 Structure for PSD callbacks. More...
 

Typedefs

typedef struct NvPSDCtx * NvPSDCtx_t
 

Enumerations

enum  NvPSDErr { NVPSD_SUCCESS , NVPSD_FAIL , NVPSD_NO_RSP }
 Enumeration of PSD error codes. More...
 
enum  NvPSDEndpoint { NVPSD_PSS , NVPSD_CLIENT }
 

Functions

NvPSDCtx * NvPSDCreateContext ()
 Creates a new NvPSD context. More...
 
NvPSDErr NvPSDInitialize (NvPSDCtx *ctx, const char *writeChannel, const char *readChannel, const char *criticalWriteChannel, const char *criticalReadChannel, NvPSDEndpoint endpoint)
 Initializes NvPSD. More...
 
NvPSDErr NvPSDRegisterCallbacks (NvPSDCtx *ctx, NvPSDCallbacks *callbacks)
 Registers callbacks PSD. More...
 
NvPSDErr NvPSDStart (NvPSDCtx *ctx)
 Starts the PSD communication. More...
 
NvPSDErr NvPSDProcessDecisionRequest (NvPSDCtx *ctx, const DecisionRequest *request, DecisionResponse *response)
 
NvPSDErr NvPSDStop (NvPSDCtx *ctx)
 Stops the PSD communication. More...
 
NvPSDErr NvPSDExit (NvPSDCtx *ctx)
 Exits NvPSD. More...
 
void NvPSDDestroyContext (NvPSDCtx *ctx)
 Destroys the NvPSD context. More...
 

Typedef Documentation

◆ NvPSDCtx_t

typedef struct NvPSDCtx* NvPSDCtx_t

NvPSDCtx

Enumeration Type Documentation

◆ NvPSDEndpoint

Enumerator
NVPSD_PSS 
NVPSD_CLIENT 
36 {
37  NVPSD_PSS,
NvPSDEndpoint
Definition: NvPSD.h:36
@ NVPSD_CLIENT
Definition: NvPSD.h:38
@ NVPSD_PSS
Definition: NvPSD.h:37

◆ NvPSDErr

enum NvPSDErr

Enumeration of PSD error codes.

This enumeration defines various error codes that can occur during PSD communication.

Enumerator
NVPSD_SUCCESS 

Operation completed successfully.

NVPSD_FAIL 

Generic failure.

NVPSD_NO_RSP 

No response received.

29 {
31  NVPSD_FAIL,
33 } NvPSDErr;
NvPSDErr
Enumeration of PSD error codes.
Definition: NvPSD.h:29
@ NVPSD_NO_RSP
Definition: NvPSD.h:32
@ NVPSD_FAIL
Definition: NvPSD.h:31
@ NVPSD_SUCCESS
Definition: NvPSD.h:30

Function Documentation

◆ NvPSDCreateContext()

NvPSDCtx* NvPSDCreateContext ( )

Creates a new NvPSD context.

Returns
NvPSDCtx* Pointer to the newly created NvPSD context.

◆ NvPSDDestroyContext()

void NvPSDDestroyContext ( NvPSDCtx *  ctx)

Destroys the NvPSD context.

Parameters
[in]ctxPointer to the NvPSD context to be destroyed.

◆ NvPSDExit()

NvPSDErr NvPSDExit ( NvPSDCtx *  ctx)

Exits NvPSD.

Parameters
[in]ctxPointer to the NvPSD context.
Returns
NvPSDErr Returns an error code indicating the success or failure of the operation.

◆ NvPSDInitialize()

NvPSDErr NvPSDInitialize ( NvPSDCtx *  ctx,
const char *  writeChannel,
const char *  readChannel,
const char *  criticalWriteChannel,
const char *  criticalReadChannel,
NvPSDEndpoint  endpoint 
)

Initializes NvPSD.

This function initializes the PSD-PSS communication using the specified write and read channels.

Parameters
[in]ctxPointer to the NvPSD context.
[in]writeChannelName of the channel used for writing data.
[in]readChannelName of the channel used for reading data.
[in]criticalWriteChannelName of the channel used for writing CRITICAL severtity data.
[in]criticalReadChannelName of the channel used for reading CRITICAL severity data.
[in]endpointParam indicating whether endpoint is PSS or Client
Returns
NvPSDErr Returns an error code indicating the success or failure of the initialization.

◆ NvPSDProcessDecisionRequest()

NvPSDErr NvPSDProcessDecisionRequest ( NvPSDCtx *  ctx,
const DecisionRequest request,
DecisionResponse response 
)

◆ NvPSDRegisterCallbacks()

NvPSDErr NvPSDRegisterCallbacks ( NvPSDCtx *  ctx,
NvPSDCallbacks callbacks 
)

Registers callbacks PSD.

Function to register the specified callbacks for PSD.

Parameters
[in]ctxPointer to the NvPSD context.
[in]callbacksPointer to the structure containing the callbacks to register.
Returns
NvPSDErr Returns an error code indicating the success or failure of the registration.

◆ NvPSDStart()

NvPSDErr NvPSDStart ( NvPSDCtx *  ctx)

Starts the PSD communication.

Function to initiate the PSD communication process.

Parameters
[in]ctxPointer to the NvPSD context.
Returns
NvPSDErr Returns an error code indicating the success or failure of the operation.

◆ NvPSDStop()

NvPSDErr NvPSDStop ( NvPSDCtx *  ctx)

Stops the PSD communication.

Parameters
[in]ctxPointer to the NvPSD context.
Returns
NvPSDErr Returns an error code indicating the success or failure of the operation.