Skip to content

Commit

Permalink
Add some more enums
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a027ac)
  • Loading branch information
peternewman committed Mar 16, 2024
1 parent af129a6 commit a6badf3
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 0 deletions.
81 changes: 81 additions & 0 deletions include/ola/acn/ACNVectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,87 @@ enum LLRPVector {
VECTOR_LLRP_RDM_CMD = 3, /**< LLRP RDM Command */
};

/**
* @brief Vectors used at the E1.33 Broker layer.
*/
enum BrokerVector {
VECTOR_BROKER_CONNECT = 0x0001, /**< Broker Client Connect */
VECTOR_BROKER_CONNECT_REPLY = 0x0002, /**< Broker Connect Reply */
VECTOR_BROKER_CLIENT_ENTRY_UPDATE = 0x0003, /**< Broker Client Entry Update */

Check failure on line 108 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_BROKER_REDIRECT_V4 = 0x0004, /**< Broker Client Redirect IPv4 */
VECTOR_BROKER_REDIRECT_V6 = 0x0005, /**< Broker Client Redirect IPv6 */
VECTOR_BROKER_FETCH_CLIENT_LIST = 0x0006, /**< Broker Fetch Client List */
VECTOR_BROKER_CONNECTED_CLIENT_LIST = 0x0007, /**< Broker Connected Client List */

Check failure on line 112 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_BROKER_CLIENT_ADD = 0x0008, /**< Broker Client Incremental Addition */
VECTOR_BROKER_CLIENT_REMOVE = 0x0009, /**< Broker Client Incremental Deletion */

Check failure on line 114 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_BROKER_CLIENT_ENTRY_CHANGE = 0x000A, /**< Broker Client Entry Change */

Check failure on line 115 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_BROKER_REQUEST_DYNAMIC_UIDS = 0x000B, /**< Broker Request Dynamic UID Assignment */

Check failure on line 116 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_BROKER_ASSIGNED_DYNAMIC_UIDS = 0x000C, /**< Broker Dynamic UID Assignment List */

Check failure on line 117 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_BROKER_FETCH_DYNAMIC_UID_LIST = 0x000D, /**< Broker Fetch Dynamic UID Assignment List */

Check failure on line 118 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_BROKER_DISCONNECT = 0x000E, /**< Broker Client Disconnect */
VECTOR_BROKER_NULL = 0x000F, /**< Broker Client Null */
};

// Table A-8, RPT PDU Vector
/**
* @brief Vectors used at the E1.33 RPT layer.
*/
enum RPTVector {
VECTOR_RPT_REQUEST = 1, /**< RPT Request */
VECTOR_RPT_STATUS = 2, /**< RPT Status */
VECTOR_RPT_NOTIFICATION = 3, /**< RPT Notification */
};

// Table A-9, RPT Request PDU Vector
/**
* @brief Vectors used at the E1.33 RPT Request layer.
*/
enum RPTRequestVector {
VECTOR_REQUEST_RDM_CMD = 1, /**< RPT Request RDM Command */
};

// Table A-10, RPT Status PDU Vector
/**
* @brief Vectors used at the E1.33 RPT Status layer.
*/
enum RPTStatusVector {
VECTOR_RPT_STATUS_UNKNOWN_RPT_UID = 0x0001, /**< RPT Status Unknown RPT UID */

Check failure on line 146 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_RPT_STATUS_RDM_TIMEOUT = 0x0002, /**< RPT Status RDM Timeout */
VECTOR_RPT_STATUS_RDM_INVALID_RESPONSE = 0x0003, /**< RPT Status RDM Invalid Response */

Check failure on line 148 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_RPT_STATUS_UNKNOWN_RDM_UID = 0x0004, /**< RPT Status Unknown RDM UID */

Check failure on line 149 in include/ola/acn/ACNVectors.h

View workflow job for this annotation

GitHub Actions / cpplint

Lines should be <= 80 characters long [whitespace/line_length] [2]
VECTOR_RPT_STATUS_UNKNOWN_ENDPOINT = 0x0005, /**< RPT Status Unknown Endpoint */
VECTOR_RPT_STATUS_BROADCAST_COMPLETE = 0x0006, /**< RPT Status Broadcast Complete */
VECTOR_RPT_STATUS_UNKNOWN_VECTOR = 0x0007, /**< RPT Status Unknown Vector */
VECTOR_RPT_STATUS_INVALID_MESSAGE = 0x0008, /**< RPT Status Invalid Message */
VECTOR_RPT_STATUS_INVALID_COMMAND_CLASS = 0x0009, /**< RPT Status Invalid Command Class */
};

// Table A-11, RPT Notification PDU Vector
/**
* @brief Vectors used at the E1.33 RPT Notification layer.
*/
enum RPTNotificationVector {
VECTOR_NOTIFICATION_RDM_CMD = 1, /**< RPT Notification RDM Command */
};

/**
* @brief Vectors used at the E1.33 RDM Command layer.
*/
enum RDMCommandVector {
VECTOR_RDM_CMD_RDM_DATA = 0xCC, /**< E1.33 RDM Command */
};

// Table A-21, Client Protocol Codes
// These aren't fully named as vectors in the standard, but are used as such so
// we put them in here
/**
* @brief Vectors used at the E1.33 Broker Client Entry layer.
*/
enum ClientProtocolCode {
CLIENT_PROTOCOL_RPT = 0x00000005, /**< Broker RPT Client Entry */
CLIENT_PROTOCOL_EPT = 0x0000000B, /**< Broker EPT Client Entry */
};

/**
* @}
*/
Expand Down
39 changes: 39 additions & 0 deletions include/ola/e133/E133Enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ enum EndpointMode {
ENDPOINT_MODE_OUTPUT = 2,
};

// TODO(Peter): Check that this no longer exists
// Table A-9 E1.33 Status Codes
enum E133StatusCode {
SC_E133_ACK = 0x0000,
Expand All @@ -53,6 +54,44 @@ enum E133StatusCode {
SC_E133_BROADCAST_COMPLETE = 0x0009,
};

// Table A-19 E1.33 Connection Status Codes for Broker Connect
enum E133ConnectStatusCode {
CONNECT_OK = 0x0000,
CONNECT_SCOPE_MISMATCH = 0x0001,
CONNECT_CAPACITY_EXCEEDED = 0x0002,
CONNECT_DUPLICATE_UID = 0x0003,
CONNECT_INVALID_CLIENT_ENTRY = 0x0004,
CONNECT_INVALID_UID = 0x0005,
};

// Table A-20 E1.33 Status Codes for Dynamic UID Mapping
enum E133DynamicUIDStatusCode {
DYNAMIC_UID_STATUS_OK = 0x0000,
DYNAMIC_UID_STATUS_INVALID_REQUEST = 0x0001,
DYNAMIC_UID_STATUS_UID_NOT_FOUND = 0x0002,
DYNAMIC_UID_STATUS_DUPLICATE_RID = 0x0003,
DYNAMIC_UID_STATUS_CAPACITY_EXHAUSTED = 0x0004,
};

// Table A-22 E1.33 RPT Client Type Codes
enum E133RPTClientTypeCode {
RPT_CLIENT_TYPE_DEVICE = 0x00,
RPT_CLIENT_TYPE_CONTROLLER = 0x01,
};

// Table A-24 E1.33 Client Disconnect Reason Codes
enum E133DisconnectStatusCode {
DISCONNECT_SHUTDOWN = 0x0000,
DISCONNECT_CAPACITY_EXHAUSTED = 0x0001,
DISCONNECT_HARDWARE_FAULT = 0x0002,
DISCONNECT_SOFTWARE_FAULT = 0x0003,
DISCONNECT_SOFTWARE_RESET = 0x0004,
DISCONNECT_INCORRECT_SCOPE = 0x0005,
DISCONNECT_RPT_RECONFIGURE = 0x0006,
DISCONNECT_LLRP_RECONFIGURE = 0x0007,
DISCONNECT_USER_RECONFIGURE = 0x0008,
};

// The max size of an E1.33 Status string.
enum {
MAX_E133_STATUS_STRING_SIZE = 64
Expand Down

0 comments on commit a6badf3

Please sign in to comment.