diff --git a/tools/e133/E133Endpoint.cpp b/tools/e133/E133Endpoint.cpp index f0fbd4492..58efa583f 100644 --- a/tools/e133/E133Endpoint.cpp +++ b/tools/e133/E133Endpoint.cpp @@ -44,7 +44,7 @@ E133Endpoint::E133Endpoint(DiscoverableRDMControllerInterface *controller, m_is_physical(properties.is_physical), m_universe(UNPATCHED_UNIVERSE), m_endpoint_label(""), - m_device_list_change(0), + m_responder_list_change(0), m_controller(controller) { } diff --git a/tools/e133/E133Endpoint.h b/tools/e133/E133Endpoint.h index d57a6830f..7b8b58c16 100644 --- a/tools/e133/E133Endpoint.h +++ b/tools/e133/E133Endpoint.h @@ -81,11 +81,11 @@ class E133EndpointInterface // ENDPOINT_TIMING_DESCRIPTION - // ENDPOINT_DEVICE_LIST_CHANGE - virtual uint32_t device_list_change() const = 0; + // ENDPOINT_RESPONDER_LIST_CHANGE + virtual uint32_t responder_list_change() const = 0; - // ENDPOINT_DEVICES - virtual void EndpointDevices(UIDSet *uids) const = 0; + // ENDPOINT_RESPONDERS + virtual void EndpointResponders(UIDSet *uids) const = 0; // BINDING_AND_CONTROL_FIELDS @@ -141,8 +141,8 @@ class E133Endpoint: public E133EndpointInterface { m_endpoint_label = endpoint_label; } - uint32_t device_list_change() const { return m_device_list_change; } - void EndpointDevices(UIDSet *uids) const { *uids = m_uids; } + uint32_t responder_list_change() const { return m_responder_list_change; } + void EndpointResponders(UIDSet *uids) const { *uids = m_uids; } virtual void RunFullDiscovery(ola::rdm::RDMDiscoveryCallback *callback); virtual void RunIncrementalDiscovery( @@ -156,7 +156,7 @@ class E133Endpoint: public E133EndpointInterface { const bool m_is_physical; uint16_t m_universe; string m_endpoint_label; - uint32_t m_device_list_change; + uint32_t m_responder_list_change; UIDSet m_uids; DiscoverableRDMControllerInterface *m_controller; }; diff --git a/tools/e133/ManagementEndpoint.cpp b/tools/e133/ManagementEndpoint.cpp index af67274a5..1ed6127da 100644 --- a/tools/e133/ManagementEndpoint.cpp +++ b/tools/e133/ManagementEndpoint.cpp @@ -59,9 +59,9 @@ const ola::rdm::ResponderOps::ParamHandler { ola::rdm::PID_ENDPOINT_LIST_CHANGE, &ManagementEndpoint::GetEndpointListChange, NULL}, - { ola::rdm::PID_ENDPOINT_IDENTIFY, - &ManagementEndpoint::GetEndpointIdentify, - &ManagementEndpoint::SetEndpointIdentify}, + { ola::rdm::PID_IDENTIFY_ENDPOINT, + &ManagementEndpoint::GetIdentifyEndpoint, + &ManagementEndpoint::SetIdentifyEndpoint}, { ola::rdm::PID_ENDPOINT_TO_UNIVERSE, &ManagementEndpoint::GetEndpointToUniverse, &ManagementEndpoint::SetEndpointToUniverse}, @@ -76,11 +76,11 @@ const ola::rdm::ResponderOps::ParamHandler // PID_BACKGROUND_DISCOVERY // PID_ENDPOINT_TIMING // PID_ENDPOINT_TIMING_DESCRIPTION - { ola::rdm::PID_ENDPOINT_LIST_CHANGE, - &ManagementEndpoint::GetEndpointDeviceListChange, + { ola::rdm::PID_ENDPOINT_RESPONDER_LIST_CHANGE, + &ManagementEndpoint::GetEndpointResponderListChange, NULL}, - { ola::rdm::PID_ENDPOINT_DEVICES, - &ManagementEndpoint::GetEndpointDevices, + { ola::rdm::PID_ENDPOINT_RESPONDERS, + &ManagementEndpoint::GetEndpointResponders, NULL}, // PID_BINDING_AND_CONTROL_FIELDS { ola::rdm::PID_TCP_COMMS_STATUS, @@ -222,9 +222,9 @@ RDMResponse *ManagementEndpoint::GetEndpointListChange( /** - * Handle PID_ENDPOINT_IDENTIFY + * Handle PID_IDENTIFY_ENDPOINT */ -RDMResponse *ManagementEndpoint::GetEndpointIdentify( +RDMResponse *ManagementEndpoint::GetIdentifyEndpoint( const RDMRequest *request) { uint16_t endpoint_id; if (!ResponderHelper::ExtractUInt16(request, &endpoint_id)) { @@ -243,41 +243,41 @@ RDMResponse *ManagementEndpoint::GetEndpointIdentify( uint16_t endpoint_number; uint8_t identify_mode; }); - IdentifyEndpointParamData endpoint_identify_message = { + IdentifyEndpointParamData identify_endpoint_message = { HostToNetwork(endpoint_id), endpoint->identify_mode() }; return GetResponseFromData( request, - reinterpret_cast(&endpoint_identify_message), - sizeof(endpoint_identify_message)); + reinterpret_cast(&identify_endpoint_message), + sizeof(identify_endpoint_message)); } -RDMResponse *ManagementEndpoint::SetEndpointIdentify( +RDMResponse *ManagementEndpoint::SetIdentifyEndpoint( const RDMRequest *request) { PACK( struct IdentifyEndpointParamData { uint16_t endpoint_number; uint8_t identify_mode; }); - IdentifyEndpointParamData endpoint_identify_message; + IdentifyEndpointParamData identify_endpoint_message; - if (request->ParamDataSize() != sizeof(endpoint_identify_message)) { + if (request->ParamDataSize() != sizeof(identify_endpoint_message)) { return NackWithReason(request, NR_FORMAT_ERROR); } - memcpy(reinterpret_cast(&endpoint_identify_message), + memcpy(reinterpret_cast(&identify_endpoint_message), request->ParamData(), - sizeof(endpoint_identify_message)); + sizeof(identify_endpoint_message)); E133Endpoint *endpoint = m_endpoint_manager->GetEndpoint( - ola::network::NetworkToHost(endpoint_identify_message.endpoint_number)); + ola::network::NetworkToHost(identify_endpoint_message.endpoint_number)); // endpoint not found if (!endpoint) { return NackWithReason(request, ola::rdm::NR_ENDPOINT_NUMBER_INVALID); } - endpoint->set_identify_mode(endpoint_identify_message.identify_mode); + endpoint->set_identify_mode(identify_endpoint_message.identify_mode); return GetResponseFromData(request, NULL, 0); } @@ -324,9 +324,9 @@ RDMResponse *ManagementEndpoint::SetEndpointLabel(const RDMRequest *request) { } /** - * Handle PID_ENDPOINT_DEVICE_LIST_CHANGE + * Handle PID_ENDPOINT_RESPONDER_LIST_CHANGE */ -RDMResponse *ManagementEndpoint::GetEndpointDeviceListChange( +RDMResponse *ManagementEndpoint::GetEndpointResponderListChange( const RDMRequest *request) { uint16_t endpoint_id; if (!ResponderHelper::ExtractUInt16(request, &endpoint_id)) { @@ -340,7 +340,7 @@ RDMResponse *ManagementEndpoint::GetEndpointDeviceListChange( return NackWithReason(request, ola::rdm::NR_ENDPOINT_NUMBER_INVALID); } - uint32_t list_change_id = HostToNetwork(endpoint->device_list_change()); + uint32_t list_change_id = HostToNetwork(endpoint->responder_list_change()); return GetResponseFromData( request, reinterpret_cast(&list_change_id), @@ -348,9 +348,9 @@ RDMResponse *ManagementEndpoint::GetEndpointDeviceListChange( } /** - * Handle PID_ENDPOINT_DEVICES + * Handle PID_ENDPOINT_RESPONDERS */ -RDMResponse *ManagementEndpoint::GetEndpointDevices(const RDMRequest *request) { +RDMResponse *ManagementEndpoint::GetEndpointResponders(const RDMRequest *request) { uint16_t endpoint_id; if (!ResponderHelper::ExtractUInt16(request, &endpoint_id)) { return NackWithReason(request, NR_FORMAT_ERROR); @@ -369,20 +369,20 @@ RDMResponse *ManagementEndpoint::GetEndpointDevices(const RDMRequest *request) { } UIDSet uids; - uint32_t list_change_id = HostToNetwork(endpoint->device_list_change()); - endpoint->EndpointDevices(&uids); + uint32_t list_change_id = HostToNetwork(endpoint->responder_list_change()); + endpoint->EndpointResponders(&uids); - struct DeviceListParamData { + struct ResponderListParamData { uint16_t endpoint; uint32_t list_change; uint8_t data[0]; }; // TODO(simon): fix this - we can overflow an RDM packet if there are too - // many devices! + // many responders! unsigned int param_data_size = 2 + 4 + uids.Size() * UID::UID_SIZE; uint8_t *raw_data = new uint8_t[param_data_size]; - DeviceListParamData *param_data = reinterpret_cast( + ResponderListParamData *param_data = reinterpret_cast( raw_data); // TODO(simon): fix this to track changes. diff --git a/tools/e133/ManagementEndpoint.h b/tools/e133/ManagementEndpoint.h index d54b508eb..79ccc80cf 100644 --- a/tools/e133/ManagementEndpoint.h +++ b/tools/e133/ManagementEndpoint.h @@ -30,7 +30,7 @@ using ola::rdm::RDMResponse; using ola::rdm::RDMCallback; /** - * The ManagementEndpoint handles RDMCommands directed at this E1.33 device. It + * The ManagementEndpoint handles RDMCommands directed at this E1.33 Component. It * can also pass through commands to another controller if there is one * supplied. */ @@ -50,7 +50,7 @@ class ManagementEndpoint: public E133Endpoint { private: /** - * The RDM Operations for the MovingLightResponder. + * The RDM Operations for the ManagementEndpoint. */ class RDMOps : public ola::rdm::ResponderOps { public: @@ -74,16 +74,16 @@ class ManagementEndpoint: public E133Endpoint { // RDM PID handlers. RDMResponse *GetEndpointList(const RDMRequest *request); RDMResponse *GetEndpointListChange(const RDMRequest *request); - RDMResponse *GetEndpointIdentify(const RDMRequest *request); - RDMResponse *SetEndpointIdentify(const RDMRequest *request); + RDMResponse *GetIdentifyEndpoint(const RDMRequest *request); + RDMResponse *SetIdentifyEndpoint(const RDMRequest *request); RDMResponse *GetEndpointToUniverse(const RDMRequest *request); RDMResponse *SetEndpointToUniverse(const RDMRequest *request); RDMResponse *GetEndpointMode(const RDMRequest *request); RDMResponse *SetEndpointMode(const RDMRequest *request); RDMResponse *GetEndpointLabel(const RDMRequest *request); RDMResponse *SetEndpointLabel(const RDMRequest *request); - RDMResponse *GetEndpointDeviceListChange(const RDMRequest *request); - RDMResponse *GetEndpointDevices(const RDMRequest *request); + RDMResponse *GetEndpointResponderListChange(const RDMRequest *request); + RDMResponse *GetEndpointResponders(const RDMRequest *request); RDMResponse *GetTCPCommsStatus(const RDMRequest *request); RDMResponse *SetTCPCommsStatus(const RDMRequest *request);