Skip to content

Commit

Permalink
Add some more enums
Browse files Browse the repository at this point in the history
  • Loading branch information
peternewman committed Jul 8, 2023
1 parent 064e2f5 commit 1a027ac
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 1 deletion.
51 changes: 50 additions & 1 deletion include/ola/acn/ACNVectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,55 @@ enum BrokerVector {
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 */
VECTOR_RPT_STATUS_UNKNOWN_RDM_UID = 0x0004, /**< RPT Status Unknown RDM UID */
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
Expand All @@ -128,7 +177,7 @@ enum BrokerVector {
*/
enum ClientProtocolCode {
CLIENT_PROTOCOL_RPT = 0x00000005, /**< Broker RPT Client Entry */
CLIENT_PROTOCOL_EPT = 0x0000000b, /**< Broker EPT Client Entry */
CLIENT_PROTOCOL_EPT = 0x0000000B, /**< Broker EPT Client Entry */
};

/**
Expand Down
33 changes: 33 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,12 +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 1a027ac

Please sign in to comment.