Safe Communication Framework 0.1.0 build feea4f9
ERTMS/ETCS safe communication (Subset-037 EuroRadio, Subset-098 RBC/RBC), CENELEC EN 50128 SIL 4 oriented
Loading...
Searching...
No Matches
status.h File Reference

Common status codes for the Safe Communication Framework. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  safecomm_status_t {
  SAFECOMM_STATUS_OK = 0 , SAFECOMM_STATUS_INVALID_PARAM , SAFECOMM_STATUS_NOT_INITIALISED , SAFECOMM_STATUS_STATE ,
  SAFECOMM_STATUS_TIMEOUT , SAFECOMM_STATUS_TRANSPORT , SAFECOMM_STATUS_AUTH_FAILED , SAFECOMM_STATUS_MAC_MISMATCH ,
  SAFECOMM_STATUS_SEQ_ERROR , SAFECOMM_STATUS_PEER_DISCONNECT , SAFECOMM_STATUS_BUFFER_TOO_SMALL , SAFECOMM_STATUS_NOT_IMPLEMENTED
}
 Result of a Safe Communication Framework operation. More...

Functions

const char * safecomm_status_to_string (safecomm_status_t status)
 Human-readable name of a status code (for logs, never for control flow).

Detailed Description

Common status codes for the Safe Communication Framework.

REQ-SC-CORE-001: every public function that can fail returns a safecomm_status_t; success is always 0 (SAFECOMM_STATUS_OK).

Definition in file status.h.

Enumeration Type Documentation

◆ safecomm_status_t

Result of a Safe Communication Framework operation.

Enumerator
SAFECOMM_STATUS_OK 

Operation completed successfully.

SAFECOMM_STATUS_INVALID_PARAM 

A NULL / out-of-range argument.

SAFECOMM_STATUS_NOT_INITIALISED 

Module used before its init call.

SAFECOMM_STATUS_STATE 

Call not legal in the current SaF state.

SAFECOMM_STATUS_TIMEOUT 

A supervision / response timer expired.

SAFECOMM_STATUS_TRANSPORT 

The transport callback reported a failure.

SAFECOMM_STATUS_AUTH_FAILED 

Peer authentication (AU1/2/3) rejected.

SAFECOMM_STATUS_MAC_MISMATCH 

Received MAC did not verify.

SAFECOMM_STATUS_SEQ_ERROR 

Sequence number outside the accepted window.

SAFECOMM_STATUS_PEER_DISCONNECT 

Peer sent an orderly Sa-DISCONNECT.

SAFECOMM_STATUS_BUFFER_TOO_SMALL 

Caller buffer cannot hold the result.

SAFECOMM_STATUS_NOT_IMPLEMENTED 

Skeleton entry point — no logic yet.

Definition at line 16 of file status.h.

Function Documentation

◆ safecomm_status_to_string()

const char * safecomm_status_to_string ( safecomm_status_t status)

Human-readable name of a status code (for logs, never for control flow).

Parameters
statusa safecomm_status_t value.
Returns
a static, never-NULL string; "UNKNOWN" for an unrecognised value.

Definition at line 13 of file version.c.