1//=============================================================================
2//! @file
3//! @author GEMS
4//! @date 7 October 2026
5//! @brief CDX API status values compatible with generated model code.
6//=============================================================================
7// (c) Copyright 2026 General Engine Management Systems (GEMS) Ltd
8//=============================================================================
9
10#ifndef CDX_STATUS_H_INCLUDED
11#define CDX_STATUS_H_INCLUDED
12//=============================================================================
13
14//=============================================================================
15// Includes
16//=============================================================================
17
18#if defined(CDX_USER_HEADER) && !defined(CDX_USER_H_INCLUDED)
19#include CDX_USER_HEADER
20#endif
21
22#include <stdint.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28//=============================================================================
29// Definitions
30//=============================================================================
31
32//! @brief API result code; zero means success, nonzero values are call-specific.
33typedef uint16_t CDX_STATUS;
34//! @brief Operation succeeded.
35#define CDX_STATUS_OK 0u
36//! @brief Operation accepted but not yet complete.
37#define CDX_STATUS_IN_PROGRESS 1u
38//! @brief Deadline or timeout expired.
39#define CDX_STATUS_TIMEOUT 2u
40//! @brief Bounded queue or registry is full; new request was not accepted.
41#define CDX_STATUS_QUEUE_FULL 3u
42//! @brief No data available; also a non-faulting RX callback result.
43#define CDX_STATUS_NO_DATA 4u
44//! @brief Requested API feature is not implemented.
45#define CDX_STATUS_NOT_IMPLEMENTED 5u
46//! @brief RX message intentionally ignored without faulting the runtime.
47#define CDX_STATUS_MESSAGE_IGNORED 6u
48//! @brief Invalid pointer, value, identifier, permission or range.
49#define CDX_STATUS_BAD_PARAM 7u
50//! @brief Invalid data length; not interchangeable with BAD_PARAM for all APIs.
51#define CDX_STATUS_BAD_LENGTH 8u
52//! @brief Generated decoder has no matching case; faults a runtime RX callback.
53#define CDX_STATUS_CASE_NOT_HANDLED 12u
54//! @brief Unselected multiplexed signal ignored without faulting the runtime.
55#define CDX_STATUS_MULTIPLEX_IGNORED 13u
56//! @brief Model IPC is not RUNNING or its session is unavailable.
57#define CDX_STATUS_IPC_OFFLINE 41u
58
59#ifdef __cplusplus
60}
61#endif
62
63//=============================================================================
64#endif // CDX_STATUS_H_INCLUDED
65//=============================================================================
66// End of File
67//=============================================================================