mirror of https://github.com/infosecn1nja/C3.git
Add docs
parent
d56d876993
commit
21069e66e9
|
@ -1001,12 +1001,12 @@ void MWR::C3::Core::Profiler::Gateway::EnsureCreateExists(json& interface)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void MWR::C3::Core::Profiler::Gateway::AddBuildInCommands(json& def, bool isDevice)
|
||||
void MWR::C3::Core::Profiler::Gateway::AddBuildInCommands(json& interface, bool isDevice)
|
||||
{
|
||||
def["commands"].push_back(json{ {"name", isDevice ? "Close" : "TurnOff"}, {"id", static_cast<std::underlying_type_t<Command>>(Command::Close) }, {"arguments", json::array()} });
|
||||
interface["commands"].push_back(json{ {"name", isDevice ? "Close" : "TurnOff"}, {"id", static_cast<std::underlying_type_t<Command>>(Command::Close) }, {"arguments", json::array()} });
|
||||
|
||||
if (isDevice)
|
||||
def["commands"].push_back(json{ {"name", "Set UpdateDelayJitter"}, {"description", "Set delay between receiving function calls."}, {"id", static_cast<std::underlying_type_t<Command>>(Command::UpdateJitter) },
|
||||
interface["commands"].push_back(json{ {"name", "Set UpdateDelayJitter"}, {"description", "Set delay between receiving function calls."}, {"id", static_cast<std::underlying_type_t<Command>>(Command::UpdateJitter) },
|
||||
{"arguments", {
|
||||
{{"type", "float"}, {"name", "Min"}, {"description", "Minimal delay in seconds"}, {"min", 0.03}},
|
||||
{{"type", "float"}, {"name", "Max"}, {"description", "Maximal delay in seconds. "}, {"min", 0.03}}
|
||||
|
|
|
@ -378,9 +378,14 @@ namespace MWR::C3::Core
|
|||
/// @return Network Profile in JSON format.
|
||||
json CreateProfileSnapshot() const override;
|
||||
|
||||
/// Adds a default 'create' property
|
||||
/// @param interface - json definition of interface
|
||||
static void EnsureCreateExists(json& interface);
|
||||
|
||||
static void AddBuildInCommands(json& def, bool isDevice);
|
||||
/// Adds built-in command definitions (Close/TurnOff and UpdateDelay)
|
||||
/// @param interface - json definition of interface
|
||||
/// @param isDevice - whether interfce is a device (channel/peripheral) or not (connstors)
|
||||
static void AddBuildInCommands(json& interface, bool isDevice);
|
||||
|
||||
/// Get JSON representing available Commands.
|
||||
/// @return Network's Capability in JSON format.
|
||||
|
|
Loading…
Reference in New Issue