diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-15 23:30:37 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:21:57 +0100 |
commit | 7175a87b640b9920e666bce53f46002ac19d4c21 (patch) | |
tree | 9381404327f826e35b33626ee379cd37b0b9dde3 /src/diagnostic/diagnostic-manager.hpp | |
parent | 5d7fbc236e5778a54c39afd51ed353c0e8761dec (diff) |
Finalization of decoding part of diagnostic messages.
Diagnostic request must have a name to be subscribed. Else, we
can't decode or event push for now.
Change-Id: I0901a71da31320d8598e512614437aceb552713d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic/diagnostic-manager.hpp')
-rw-r--r-- | src/diagnostic/diagnostic-manager.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/diagnostic/diagnostic-manager.hpp b/src/diagnostic/diagnostic-manager.hpp index 1db83636..5a4278dc 100644 --- a/src/diagnostic/diagnostic-manager.hpp +++ b/src/diagnostic/diagnostic-manager.hpp @@ -80,19 +80,23 @@ public: void checkSupportedPids(const active_diagnostic_request_t& request, const DiagnosticResponse& response, float parsedPayload); + // Subscription parts 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); - - - openxc_VehicleMessage relay_diagnostic_response(active_diagnostic_request_t* adr, const DiagnosticResponse& response) const; + // Sendig requests part bool conflicting(active_diagnostic_request_t* request, active_diagnostic_request_t* candidate) const; bool clear_to_send(active_diagnostic_request_t* request) const; static int send_request(sd_event_source *s, uint64_t usec, void *userdata); + + // Decoding part + openxc_VehicleMessage relay_diagnostic_response(active_diagnostic_request_t* adr, const DiagnosticResponse& response) const; + openxc_VehicleMessage relay_diagnostic_handle(active_diagnostic_request_t* entry, const can_message_t& cm); + openxc_VehicleMessage find_and_decode_adr(const can_message_t& cm); bool is_diagnostic_response(const can_message_t& cm); + }; |