Accept functional broadcast responses to a range of arb IDs.
[apps/agl-service-can-low-level.git] / src / obd2 / obd2_types.h
index 5260fa8..0699fc4 100644 (file)
@@ -12,6 +12,7 @@ extern "C" {
 // TODO This isn't true for multi frame messages - we may need to dynamically
 // allocate this in the future
 #define MAX_OBD2_PAYLOAD_LENGTH 7
+#define MAX_RESPONDING_ECU_COUNT 8
 #define VIN_LENGTH 17
 
 /* Private: The four main types of diagnositc requests that determine how the
@@ -149,7 +150,8 @@ typedef struct {
     // Private
     IsoTpShims isotp_shims;
     IsoTpSendHandle isotp_send_handle;
-    IsoTpReceiveHandle isotp_receive_handle;
+    IsoTpReceiveHandle isotp_receive_handles[MAX_RESPONDING_ECU_COUNT];
+    uint8_t isotp_receive_handle_count;
     DiagnosticResponseReceived callback;
     // DiagnosticMilStatusReceived mil_status_callback;
     // DiagnosticVinReceived vin_callback;