11#pragma once
22
33#include " HVSCU/Actuators/Contactors.hpp"
4+ #include " HVSCU/Sensors/IMD.hpp"
45#include " ST-LIB.hpp"
56
67namespace HVSCU ::Communication {
@@ -87,6 +88,9 @@ class Ethernet {
8788 double *average_current_v;
8889 double *average_current_w;
8990
91+ Sensors::IMD ::State *imd_state;
92+ float *imd_isolation_resistance;
93+
9094 static void on_close_contactors () { has_received_close_contactors = true ; }
9195
9296 static void on_open_contactors () { has_received_open_contactors = true ; }
@@ -338,6 +342,8 @@ class Ethernet {
338342 HeapPacket bcu_current_sense_packet{1703 , average_current_u,
339343 average_current_v, average_current_w};
340344
345+ HeapPacket imd_state_packet{1610 , imd_isolation_resistance, imd_state};
346+
341347 public:
342348 Ethernet (float *total_supercaps_voltage,
343349 std::array<std::array<float *, 48 >, 3 > cells_voltage,
@@ -357,12 +363,14 @@ class Ethernet {
357363 float *average_dc_link_voltage, float *dc_link_voltage_1,
358364 float *dc_link_voltage_2, float *dc_link_voltage_3,
359365 float *dc_link_voltage_4, double *average_current_u,
360- double *average_current_v, double *average_current_w);
366+ double *average_current_v, double *average_current_w,
367+ Sensors::IMD ::State *imd_state, float *imd_isolation_resistance);
361368
362369 void send_supercaps_data ();
363370 void send_sdc_data ();
364371 void send_contactors_data ();
365372 void send_current_sense ();
373+ void send_imd_data ();
366374 void send_bcu_data ();
367375 bool is_connected ();
368376};
0 commit comments