IQRF Gateway Daemon
|
Provides basic message handling. More...
#include <BaseService.h>
Public Member Functions | |
BaseService ()=delete | |
BaseService (const std::string &name) | |
parametric constructor More... | |
virtual | ~BaseService () |
void | setDaemon (IDaemon *daemon) override |
Set IDaemon instance reference. More... | |
virtual void | setSerializer (ISerializer *serializer) override |
Set ISerializer instance reference. More... | |
virtual void | setMessaging (IMessaging *messaging) override |
Set IMessaging instance reference. More... | |
const std::string & | getName () const override |
Get name of the instance. More... | |
void | update (const rapidjson::Value &cfg) override |
Update configuration. More... | |
void | start () override |
Start IService instance. More... | |
void | stop () override |
Stop IService instance. More... | |
![]() | |
virtual | ~IService () |
Provides basic message handling.
Implements IService interface. It is basic implementation and works just as proxy between IQRF mesh and outside world. It uses IDaemon to communicate via DPA messages with IQRF mesh. It registers to IMessaging to communicate via general messages with outside world. It is possible to set more ISerializer instances for parsing or encoding messages received via IMessaging. It selects appropriate ISerializer instance according incoming messages types. It gets via IDaemon IScheduler to access scheduler methods.
Configurable via its update() method accepting JSON properties:
|
delete |
BaseService::BaseService | ( | const std::string & | name | ) |
parametric constructor
[in] | name | unique name of this instance |
Copyright 2016-2017 MICRORISC s.r.o.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
virtual |
|
inlineoverridevirtual |
Get name of the instance.
Returns unique name of the instance
Implements IService.
|
overridevirtual |
|
overridevirtual |
Set IMessaging instance reference.
[in] | messaging | referenced instance |
Set IMessaging instance reference to access its interface
Implements IService.
|
overridevirtual |
Set ISerializer instance reference.
[in] | serializer | referenced instance |
Set ISerializer instance reference to access its interface
Implements IService.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Update configuration.
[in] | cfg | configuration data |
Configuration data are taken from passed cfg and the instance is configured accordingly
Implements IService.