From: Romain Forlot Date: Wed, 8 Mar 2017 21:22:41 +0000 (+0100) Subject: Remove moved functions into configuration class X-Git-Tag: 5.0.2~546 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=9f6e6be87701898472db48186c767d23cc7b0f0a;p=apps%2Fagl-service-can-low-level.git Remove moved functions into configuration class Change-Id: Ia8aa6a9f6211c2e040f53972ba689aecdeda9011 Signed-off-by: Romain Forlot --- diff --git a/src/can/can-bus.hpp b/src/can/can-bus.hpp index 0c3709fa..308d83b2 100644 --- a/src/can/can-bus.hpp +++ b/src/can/can-bus.hpp @@ -91,29 +91,3 @@ public: std::map> get_can_devices(); }; -/// TODO: implement this function as method into can_bus class -/// @brief Pre initialize actions made before CAN bus initialization -/// @param[in] bus A CanBus struct defining the bus's metadata -/// @param[in] writable Configure the controller in a writable mode. If false, it will be configured as "listen only" and will not allow writes or even CAN ACKs. -/// @param[in] buses An array of all CAN buses. -/// @param[in] busCount The length of the buses array. -void pre_initialize(can_bus_dev_t* bus, bool writable, can_bus_dev_t* buses, const int busCount); - -/// TODO: implement this function as method into can_bus class -/// @brief Post-initialize actions made after CAN bus initialization -/// @param[in] bus A CanBus struct defining the bus's metadata -/// @param[in] writable Configure the controller in a writable mode. If false, it will be configured as "listen only" and will not allow writes or even CAN ACKs. -/// @param[in] buses An array of all CAN buses. -/// @param[in] busCount The length of the buses array. -void post_initialize(can_bus_dev_t* bus, bool writable, can_bus_dev_t* buses, const int busCount); - -/// TODO: implement this function as method into can_bus class -/// @brief Check if the device is connected to an active CAN bus, i.e. it's received a message in the recent past. -/// @return true if a message was received on the CAN bus within CAN_ACTIVE_TIMEOUT_S seconds. -bool isBusActive(can_bus_dev_t* bus); - -/// TODO: implement this function as method into can_bus class -/// @brief Log transfer statistics about all active CAN buses to the debug log. -/// @param[in] buses An array of active CAN buses. -/// @param[in] busCount The length of the buses array. -void logBusStatistics(can_bus_dev_t* buses, const int busCount); diff --git a/src/configuration.hpp b/src/configuration.hpp index 13f42008..4a41f24a 100644 --- a/src/configuration.hpp +++ b/src/configuration.hpp @@ -110,4 +110,32 @@ class configuration_t void post_initialize(can_bus_dev_t* bus, bool writable, can_bus_dev_t* buses, const int busCount); void logBusStatistics(can_bus_dev_t* buses, const int busCount); bool isBusActive(can_bus_dev_t* bus); -}; \ No newline at end of file +}; + +/// TODO: implement this function as method into can_bus class +/// @brief Pre initialize actions made before CAN bus initialization +/// @param[in] bus A CanBus struct defining the bus's metadata +/// @param[in] writable Configure the controller in a writable mode. If false, it will be configured as "listen only" and will not allow writes or even CAN ACKs. +/// @param[in] buses An array of all CAN buses. +/// @param[in] busCount The length of the buses array. +void pre_initialize(can_bus_dev_t* bus, bool writable, can_bus_dev_t* buses, const int busCount); + +/// TODO: implement this function as method into can_bus class +/// @brief Post-initialize actions made after CAN bus initialization +/// @param[in] bus A CanBus struct defining the bus's metadata +/// @param[in] writable Configure the controller in a writable mode. If false, it will be configured as "listen only" and will not allow writes or even CAN ACKs. +/// @param[in] buses An array of all CAN buses. +/// @param[in] busCount The length of the buses array. +void post_initialize(can_bus_dev_t* bus, bool writable, can_bus_dev_t* buses, const int busCount); + +/// TODO: implement this function as method into can_bus class +/// @brief Check if the device is connected to an active CAN bus, i.e. it's received a message in the recent past. +/// @return true if a message was received on the CAN bus within CAN_ACTIVE_TIMEOUT_S seconds. +bool isBusActive(can_bus_dev_t* bus); + +/// TODO: implement this function as method into can_bus class +/// @brief Log transfer statistics about all active CAN buses to the debug log. +/// @param[in] buses An array of active CAN buses. +/// @param[in] busCount The length of the buses array. +void logBusStatistics(can_bus_dev_t* buses, const int busCount); +