Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions common/rdm/ResponderHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "ola/network/MACAddress.h"
#include "ola/network/NetworkUtils.h"
#include "ola/rdm/RDMEnums.h"
#include "ola/rdm/ResponderEndpointManager.h"
#include "ola/rdm/ResponderHelper.h"
#include "ola/rdm/ResponderSensor.h"
#include "ola/strings/Utils.h"
Expand Down Expand Up @@ -1303,56 +1302,6 @@ RDMResponse *ResponderHelper::GetMetadataJSON(
queued_message_count);
}

RDMResponse *ResponderHelper::GetEndpointList(
const RDMRequest *request,
const ola::rdm::EndpointManager *endpoint_manager,
uint8_t queued_message_count) {
PACK(
struct endpoint_info_s {
uint16_t endpoint_id;
uint8_t endpoint_type;
});
STATIC_ASSERT(sizeof(endpoint_info_s) == 3);

PACK(
struct endpoint_list_s {
uint32_t list_change_number;
endpoint_info_s endpoints[5];
});
STATIC_ASSERT(sizeof(endpoint_list_s) == (4 + (sizeof(endpoint_info_s) * 5)));

struct endpoint_list_s endpoint_list;
endpoint_list.list_change_number = HostToNetwork(endpoint_manager->list_change_number());

vector<uint16_t> endpoints;

endpoint_manager->EndpointIDs(&endpoints);
for (unsigned int i = 0; i < endpoints.size(); i++) {
endpoint_list.endpoints[i].endpoint_id = HostToNetwork(endpoints[i]);
}

unsigned int param_data_size = (
sizeof(endpoint_list) -
sizeof(endpoint_list.endpoints) + (sizeof(endpoint_info_s) * endpoints.size()));

return GetResponseFromData(
request,
reinterpret_cast<uint8_t*>(&endpoint_list),
param_data_size,
RDM_ACK,
queued_message_count);
}

RDMResponse *ResponderHelper::GetEndpointListChange(
const RDMRequest *request,
const ola::rdm::EndpointManager *endpoint_manager,
uint8_t queued_message_count) {
return GetUInt32Value(request,
NetworkToHost(endpoint_manager->list_change_number()),
queued_message_count);
}


/**
* @brief Handle a request that returns a string
* @note this truncates the string to max_length
Expand Down
11 changes: 0 additions & 11 deletions include/ola/rdm/ResponderHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,6 @@ class ResponderHelper {
const std::string &json,
uint8_t queued_message_count = 0);

// E1.37-7 Helpers
static RDMResponse *GetEndpointList(
const RDMRequest *request,
const ola::rdm::EndpointManager *endpoint_manager,
uint8_t queued_message_count = 0);

static RDMResponse *GetEndpointListChange(
const RDMRequest *request,
const ola::rdm::EndpointManager *endpoint_manager,
uint8_t queued_message_count = 0);

// Generic Helpers.
static RDMResponse *GetString(
const RDMRequest *request,
Expand Down
Loading