X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fdiagnostic%2Fdiagnostic-manager.hpp;h=2b804a47c6e2e8f3ff753004e1fc71f3d4738f22;hb=8871f8ae696035877afcbb3b089fc06219c2ba3a;hp=bb12f6b0e6d6f5fb01a5e990d2a11e3e562eec46;hpb=9099177556d598676e4d6322ae49d22bb2f0c59e;p=apps%2Fagl-service-can-low-level.git diff --git a/src/diagnostic/diagnostic-manager.hpp b/src/diagnostic/diagnostic-manager.hpp index bb12f6b0..2b804a47 100644 --- a/src/diagnostic/diagnostic-manager.hpp +++ b/src/diagnostic/diagnostic-manager.hpp @@ -17,14 +17,15 @@ #pragma once +#include #include #include "uds/uds.h" -#include "can/can-bus-dev.hpp" -#include "can/can-message.hpp" -#include "obd2/active-diagnostic-request.hpp" +#include "../can/can-bus-dev.hpp" +#include "../can/can-message.hpp" +#include "active-diagnostic-request.hpp" -#include "low-can-binding.hpp" +#include "../low-can-binding.hpp" /* Private: Each CAN bus needs its own set of shim functions, so this should * match the maximum CAN controller count. @@ -57,7 +58,7 @@ private: std::vector free_request_entries_; /*!< freeRequestEntries - A list of all available slots for active diagnostic * requests. This free list is backed by statically allocated entries in * the requestListEntries attribute.*/ - std::vector request_list_entries_ /*!< requestListEntries - Static allocation for all active diagnostic requests.*/ + std::vector request_list_entries_; /*!< requestListEntries - Static allocation for all active diagnostic requests.*/ bool initialized_; /*!< * initialized - True if the DiagnosticsManager has been initialized with shims. It will interface with the uds-c lib*/ @@ -72,11 +73,13 @@ public: void checkSupportedPids(const active_diagnostic_request_t& request, const DiagnosticResponse& response, float parsedPayload); - bool addRecurringRequest(DiagnosticRequest* request, const char* name, + bool add_request(DiagnosticRequest* request, const std::string name, + bool waitForMultipleResponses, const DiagnosticResponseDecoder decoder, + const DiagnosticResponseCallback callback); + + bool add_recurring_request(DiagnosticRequest* request, const char* name, bool waitForMultipleResponses, const DiagnosticResponseDecoder decoder, const DiagnosticResponseCallback callback, float frequencyHz); void reset(); - - void add_request(int pid); };