mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-11-03 12:17:56 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -110,6 +110,7 @@ namespace OpenWifi {
|
||||
void (RESTAPI_device_commandHandler::*funPtr)(const std::string &, std::uint64_t);
|
||||
};
|
||||
|
||||
/*
|
||||
const static std::vector<PostDeviceCommand> PostCommands
|
||||
{
|
||||
{ RESTAPI::Protocol::PERFORM, false, true, &RESTAPI_device_commandHandler::ExecuteCommand },
|
||||
@@ -126,6 +127,7 @@ namespace OpenWifi {
|
||||
{ RESTAPI::Protocol::PING, false, true, &RESTAPI_device_commandHandler::Ping },
|
||||
{ RESTAPI::Protocol::SCRIPT, false, true, &RESTAPI_device_commandHandler::Script }
|
||||
};
|
||||
*/
|
||||
|
||||
void RESTAPI_device_commandHandler::DoPost() {
|
||||
if(!ValidateParameters()) {
|
||||
@@ -143,6 +145,23 @@ namespace OpenWifi {
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
const std::vector<PostDeviceCommand> PostCommands
|
||||
{
|
||||
{ RESTAPI::Protocol::PERFORM, false, true, &RESTAPI_device_commandHandler::ExecuteCommand },
|
||||
{ RESTAPI::Protocol::CONFIGURE, false, false, &RESTAPI_device_commandHandler::Configure },
|
||||
{ RESTAPI::Protocol::UPGRADE, false, false, &RESTAPI_device_commandHandler::Upgrade },
|
||||
{ RESTAPI::Protocol::REBOOT, false, true, &RESTAPI_device_commandHandler::Reboot },
|
||||
{ RESTAPI::Protocol::FACTORY, false, false, &RESTAPI_device_commandHandler::Factory },
|
||||
{ RESTAPI::Protocol::LEDS, false, true, &RESTAPI_device_commandHandler::LEDs },
|
||||
{ RESTAPI::Protocol::TRACE, false, true, &RESTAPI_device_commandHandler::Trace },
|
||||
{ RESTAPI::Protocol::REQUEST, false, true, &RESTAPI_device_commandHandler::MakeRequest },
|
||||
{ RESTAPI::Protocol::WIFISCAN, false, true, &RESTAPI_device_commandHandler::WifiScan },
|
||||
{ RESTAPI::Protocol::EVENTQUEUE, false, true, &RESTAPI_device_commandHandler::EventQueue },
|
||||
{ RESTAPI::Protocol::TELEMETRY, false, true, &RESTAPI_device_commandHandler::Telemetry },
|
||||
{ RESTAPI::Protocol::PING, false, true, &RESTAPI_device_commandHandler::Ping },
|
||||
{ RESTAPI::Protocol::SCRIPT, false, true, &RESTAPI_device_commandHandler::Script }
|
||||
};
|
||||
|
||||
for(const auto &Command:PostCommands) {
|
||||
if(Command_==Command.Command) {
|
||||
Poco::Thread::current()->setName(Command.Command);
|
||||
|
||||
Reference in New Issue
Block a user