srv2 tweak: CSB params now configurable

This commit is contained in:
Robin Müller 2020-07-07 17:21:47 +02:00
parent 7698f3f13e
commit 684b56ac88
2 changed files with 10 additions and 10 deletions

View File

@ -12,9 +12,10 @@
Service2DeviceAccess::Service2DeviceAccess(object_id_t objectId, Service2DeviceAccess::Service2DeviceAccess(object_id_t objectId,
uint16_t apid, uint8_t serviceId, object_id_t tcSource, uint16_t apid, uint8_t serviceId, object_id_t tcSource,
object_id_t tmDestination): object_id_t tmDestination, uint8_t numberOfParallelCommands,
uint16_t commandTimeoutSeconds):
CommandingServiceBase(objectId, apid, serviceId, CommandingServiceBase(objectId, apid, serviceId,
NUM_OF_PARALLEL_COMMANDS, COMMAND_TIMEOUT_SECONDS, numberOfParallelCommands, commandTimeoutSeconds,
tcSource, tmDestination) {} tcSource, tmDestination) {}
Service2DeviceAccess::~Service2DeviceAccess() {} Service2DeviceAccess::~Service2DeviceAccess() {}

View File

@ -14,12 +14,12 @@
* This service provides the capability to communicate with devices in their * This service provides the capability to communicate with devices in their
* native protocols with raw commands through the DeviceHandlerIF. * native protocols with raw commands through the DeviceHandlerIF.
* *
* This is a gateway service. It relays device commands using the software bus. * This is a gateway service. It relays device commands to the software bus.
* This service is very closely tied to the Commanding Service Base * This service is very closely tied to the CommandingServiceBase
* template class. There is constant interaction between this Service Base und * template class.
* a Subclass like this service *
* There are 4 adaption points for component implementation through the * There are 4 adaption points for component implementation through the
* Commanding Service Base. * CommandingServiceBase.
* *
* This service employs custom subservices exclusively. This includes a * This service employs custom subservices exclusively. This includes a
* wiretapping subservice to monitor all traffic between target devices and * wiretapping subservice to monitor all traffic between target devices and
@ -37,11 +37,10 @@ class Service2DeviceAccess : public CommandingServiceBase,
public: public:
Service2DeviceAccess(object_id_t objectId, uint16_t apid, Service2DeviceAccess(object_id_t objectId, uint16_t apid,
uint8_t serviceId, object_id_t tcSource, uint8_t serviceId, object_id_t tcSource,
object_id_t tmDestination); object_id_t tmDestination, uint8_t numberOfParallelCommands = 4,
uint16_t commandTimeoutSeconds = 60);
virtual ~Service2DeviceAccess(); virtual ~Service2DeviceAccess();
static constexpr uint8_t NUM_OF_PARALLEL_COMMANDS = 4;
static constexpr uint16_t COMMAND_TIMEOUT_SECONDS = 60;
protected: protected:
//! CommandingServiceBase (CSB) abstract functions. See CSB documentation. //! CommandingServiceBase (CSB) abstract functions. See CSB documentation.
ReturnValue_t isValidSubservice(uint8_t subservice) override; ReturnValue_t isValidSubservice(uint8_t subservice) override;