diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-09 16:11:43 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:10:40 +0100 |
commit | 9099177556d598676e4d6322ae49d22bb2f0c59e (patch) | |
tree | 83fdb93382341a84e232836c56d908c18c9f9be4 /src/diagnostic/diagnostic-manager.cpp | |
parent | a18bc8d9ddaa16e5120c0f21cbaf53d2ce5155f8 (diff) |
Added constructor to get vector initialized with default
objects initialized that can be grabed after at runtime.
Don't know the impact on performance for now about maximum
limit.
Change-Id: I220614d479b8254ae0efda66380e96434bcbfbb2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic/diagnostic-manager.cpp')
-rw-r--r-- | src/diagnostic/diagnostic-manager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp index 1feac97..2be9a05 100644 --- a/src/diagnostic/diagnostic-manager.cpp +++ b/src/diagnostic/diagnostic-manager.cpp @@ -19,12 +19,14 @@ #include "../configuration.hpp" #include "../low-can-binding.hpp" +#define MAX_REQUEST_ENTRIES 50 diagnostic_manager_t::diagnostic_manager_t() + : request_list_entries_(MAX_REQUEST_ENTRIES, active_diagnostic_request_t()) {} diagnostic_manager_t::diagnostic_manager_t(can_bus_dev_t& bus) - : bus_(&bus) + : bus_(&bus), request_list_entries_(MAX_REQUEST_ENTRIES, active_diagnostic_request_t()) {} bool shims_send(const uint32_t arbitration_id, const uint8_t* data, const uint8_t size) |