22 #include "gateway/devicenode/devicenodegateway.h" 23 #include "functionjob.h" 27 DeviceNodeGateway::DeviceNodeGateway(std::shared_ptr<ContainerAbstractInterface> container) :
28 Gateway(ID, container, true )
36 if (!dev.
parse(element)) {
37 log_error() <<
"Could not parse device node configuration";
41 return m_logic.updateDeviceList(dev);
46 auto devlist = m_logic.getDevList();
47 if (devlist.empty()) {
48 log_info() <<
"Activate was called when no devices has been configured.";
52 for (
auto &dev : devlist) {
53 if (!dev->activate(getContainer())) {
virtual bool activateGateway() override
Implements Gateway::activateGateway.
virtual bool teardownGateway() override
Implements Gateway::teardownGateway.
bool parse(const json_t *element)
Configures this device by parsing the supplied JSON configuration string.
Developers guide to adding a config item:
virtual bool readConfigElement(const json_t *element) override
Gateway specific parsing of config elements.