272 lines
8.3 KiB
C++
272 lines
8.3 KiB
C++
/*
|
|
E1.37-7.h.h
|
|
|
|
Copyright (c) 2021 Kevin Matz (kevin.matz@gmail.com)
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include "parameterdescription.h"
|
|
|
|
/**
|
|
* \ingroup RDM
|
|
* \details ANSI E1.37-7
|
|
* Additional Message Sets for ANSI E1.20 (RDM) -
|
|
* Gateway & Splitter Configuration Messages
|
|
*/
|
|
namespace RDM {
|
|
// Appendix A: Defined Parameters (Normative)
|
|
|
|
// Table A-1: RDM Parameter ID
|
|
/// \cite e137-7 6.1 Get Endpoint List (ENDPOINT_LIST)
|
|
constexpr ParameterDescription ENDPOINT_LIST = {
|
|
.pid = 0x0900,
|
|
.pdl = {
|
|
.get_response = 7,
|
|
},
|
|
.command_class = CC_GET,
|
|
.description = "Endpoint List",
|
|
};
|
|
/// \cite e137-7 6.2 Get Endpoint List Change (ENDPOINT_LIST_CHANGE)
|
|
constexpr ParameterDescription ENDPOINT_LIST_CHANGE = {
|
|
.pid = 0x0901,
|
|
.pdl = {
|
|
.get_response = 4,
|
|
},
|
|
.command_class = CC_GET,
|
|
.description = "Endpoint List Change",
|
|
};
|
|
/// \cite e137-7 6.3 Get/Set Identify Endpoint (IDENTIFY_ENDPOINT)
|
|
constexpr ParameterDescription IDENTIFY_ENDPOINT = {
|
|
.pid = 0x0902,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 3,
|
|
.set = 3,
|
|
.set_response = 2,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Identify Endpoint",
|
|
};
|
|
/// \cite e137-7 6.4 Get/Set Endpoint to Universe (ENDPOINT_TO_UNIVERSE)
|
|
constexpr ParameterDescription ENDPOINT_TO_UNIVERSE = {
|
|
.pid = 0x0903,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 4,
|
|
.set = 4,
|
|
.set_response = 2,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Endpoint to Universe",
|
|
};
|
|
/// \cite e137-7 6.5 Get/Set Endpoint Mode (ENDPOINT_MODE)
|
|
constexpr ParameterDescription ENDPOINT_MODE = {
|
|
.pid = 0x0904,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 3,
|
|
.set = 3,
|
|
.set_response = 2,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Endpoint Mode",
|
|
};
|
|
/// \cite e137-7 6.6 Get/Set Endpoint Label (ENDPOINT_LABEL)
|
|
constexpr ParameterDescription ENDPOINT_LABEL = {
|
|
.pid = 0x0905,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 2,
|
|
.set = 2,
|
|
.set_response = 2,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Endpoint Label",
|
|
};
|
|
/// \cite e137-7 6.7 Get/Set Enable RDM Traffic on Endpoint (RDM_TRAFFIC_ENABLE)
|
|
constexpr ParameterDescription RDM_TRAFFIC_ENABLE = {
|
|
.pid = 0x0906,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 3,
|
|
.set = 3,
|
|
.set_response = 2,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Enable RDM Traffic on Endpoint",
|
|
};
|
|
/// \cite e137-7 6.8 Get/Set Discovery State (DISCOVERY_STATE)
|
|
constexpr ParameterDescription DISCOVERY_STATE = {
|
|
.pid = 0x0907,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 5,
|
|
.set = 3,
|
|
.set_response = 2,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Discovery State",
|
|
};
|
|
/// \cite e137-7 6.9 Get/Set Background Discovery (BACKGROUND_DISCOVERY)
|
|
constexpr ParameterDescription BACKGROUND_DISCOVERY = {
|
|
.pid = 0x0908,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 3,
|
|
.set = 3,
|
|
.set_response = 2,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Background Discovery",
|
|
};
|
|
/// \cite e137-7 6.10 Get/Set Endpoint Timing (ENDPOINT_TIMING)
|
|
constexpr ParameterDescription ENDPOINT_TIMING = {
|
|
.pid = 0x0909,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 4,
|
|
.set = 3,
|
|
.set_response = 2,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Endpoint Timing",
|
|
};
|
|
/// \cite e137-7 6.11 Get Endpoint Timing Description (ENDPOINT_TIMING_DESCRIPTION)
|
|
constexpr ParameterDescription ENDPOINT_TIMING_DESCRIPTION = {
|
|
.pid = 0x090A,
|
|
.pdl = {
|
|
.get = 1,
|
|
.get_response = 1,
|
|
},
|
|
.command_class = CC_GET,
|
|
.description = "Endpoint Timing Description",
|
|
};
|
|
/// \cite e137-7 6.12 Get Endpoint Responders (ENDPOINT_RESPONDERS)
|
|
constexpr ParameterDescription ENDPOINT_RESPONDERS = {
|
|
.pid = 0x090B,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 6,
|
|
},
|
|
.command_class = CC_GET,
|
|
.description = "Endpoint Responders",
|
|
};
|
|
/// \cite e137-7 6.13 Get Endpoint Responder List Change (ENDPOINT_RESPONDER_LIST_CHANGE)
|
|
constexpr ParameterDescription ENDPOINT_RESPONDER_LIST_CHANGE = {
|
|
.pid = 0x090C,
|
|
.pdl = {
|
|
.get = 2,
|
|
.get_response = 6,
|
|
},
|
|
.command_class = CC_GET,
|
|
.description = "Endpoint Responder List Change",
|
|
};
|
|
/// \cite e137-7 6.14 Get Binding and Control Fields (BINDING_CONTROL_FIELDS)
|
|
constexpr ParameterDescription BINDING_CONTROL_FIELDS = {
|
|
.pid = 0x090D,
|
|
.pdl = {
|
|
.get = 8,
|
|
.get_response = 0x10,
|
|
},
|
|
.command_class = CC_GET,
|
|
.description = "Binding and Control Fields",
|
|
};
|
|
/// \cite e137-7 7.1 Get/Set Background Queued/Status Message Collection Policy
|
|
constexpr ParameterDescription BACKGROUND_QUEUED_STATUS_POLICY = {
|
|
.pid = 0x090E,
|
|
.pdl = {
|
|
.get_response = 2,
|
|
.set = 1,
|
|
},
|
|
.command_class = CC_GET_SET,
|
|
.description = "Message Collection Policy",
|
|
};
|
|
/// \cite e137-7 7.2 Get Background Queued/Status Message Policy Description
|
|
constexpr ParameterDescription BACKGROUND_QUEUED_STATUS_POLICY_DESCRIPTION = {
|
|
.pid = 0x090F,
|
|
.pdl = {
|
|
.get = 1,
|
|
.get_response = 1,
|
|
},
|
|
.command_class = CC_GET,
|
|
.description = "Message Policy Description",
|
|
};
|
|
|
|
/// \cite e137-7 Table A-1: RDM Parameter ID Defines
|
|
constexpr const ParameterDescription *PIDs_E137_7[] =
|
|
{
|
|
// RDMnet and RDM Splitter Management
|
|
&ENDPOINT_LIST,
|
|
&ENDPOINT_LIST_CHANGE,
|
|
&IDENTIFY_ENDPOINT,
|
|
&ENDPOINT_TO_UNIVERSE,
|
|
&ENDPOINT_MODE,
|
|
&ENDPOINT_LABEL,
|
|
&RDM_TRAFFIC_ENABLE,
|
|
&DISCOVERY_STATE,
|
|
&BACKGROUND_DISCOVERY,
|
|
&ENDPOINT_TIMING,
|
|
&ENDPOINT_TIMING_DESCRIPTION,
|
|
&ENDPOINT_RESPONDERS,
|
|
&ENDPOINT_RESPONDER_LIST_CHANGE,
|
|
&BINDING_CONTROL_FIELDS,
|
|
&BACKGROUND_QUEUED_STATUS_POLICY,
|
|
&BACKGROUND_QUEUED_STATUS_POLICY_DESCRIPTION,
|
|
};
|
|
|
|
|
|
// Table A-2: Discovery State
|
|
|
|
static const uint8_t DISCOVERY_INCOMPLETE = 0x00;
|
|
static const uint8_t DISCOVERY_INCREMENTAL = 0x01;
|
|
static const uint8_t DISCOVERY_FULL = 0x02;
|
|
static const uint8_t DISCOVERY_NOT_ACTIVE = 0x04;
|
|
|
|
|
|
// Table A-3: Discovery Status
|
|
|
|
static const uint16_t DISCOVERY_COUNT_INCOMPLETE = 0x0000;
|
|
static const uint16_t DISCOVERY_COUNT_UNKNOWN = 0xFFFF;
|
|
|
|
|
|
// Table A-4: Endpoint Mode
|
|
|
|
static const uint8_t ENDPOINT_MODE_DISABLED = 0x00;
|
|
static const uint8_t ENDPOINT_MODE_INPUT = 0x01;
|
|
static const uint8_t ENDPOINT_MODE_OUTPUT = 0x02;
|
|
|
|
|
|
// Table A-5: Endpoint Types
|
|
|
|
static const uint8_t ENDPOINT_TYPE_VIRTUAL = 0x00;
|
|
static const uint8_t ENDPOINT_TYPE_PHYSICAL = 0x01;
|
|
|
|
|
|
// Table A-6: Additional Response NACK Reason Codes
|
|
|
|
static const uint16_t NR_ACTION_NOT_SUPPORTED = 0x000B; // also defined in E1.37-2
|
|
static const uint16_t NR_ENDPOINT_NUMBER_INVALID = 0x000C;
|
|
static const uint16_t NR_INVALID_ENDPOINT_MODE = 0x000D;
|
|
static const uint16_t NR_UNKNOWN_UID = 0x000E;
|
|
|
|
} // namespace RDM
|