33 uint32_t timestamp_ms,
34 uint8_t *buffer,
size_t buffer_size);
54 uint32_t timestamp_ms,
55 uint8_t *buffer,
size_t buffer_size);
70 uint8_t *buffer,
size_t buffer_size);
90 uint8_t reference_voltage,
91 bool necessary_for_abort,
92 uint32_t controller_ip,
93 uint8_t enable_serial_printing,
94 uint32_t timestamp_ms,
95 uint8_t *buffer,
size_t buffer_size);
109 uint32_t timestamp_ms,
110 uint8_t *buffer,
size_t buffer_size);
125 const std::vector<SelfTestResult> &results,
126 uint32_t timestamp_ms,
127 uint8_t *buffer,
size_t buffer_size);
136 uint32_t pressure_pa,
138 uint32_t timestamp_ms,
139 uint8_t *buffer,
size_t buffer_size);
147 uint32_t timestamp_ms,
148 uint8_t *buffer,
size_t buffer_size);
166 uint32_t timestamp_ms,
167 uint8_t *buffer,
size_t buffer_size);
178 PacketHeader &header_out,
179 BoardHeartbeatPacket &data_out);
186 PacketHeader &header_out,
187 ServerHeartbeatPacket &data_out);
194 PacketHeader &header_out,
195 std::vector<SensorDataChunkCollection> &chunks_out);
202 PacketHeader &header_out);
209 PacketHeader &header_out,
210 std::vector<ActuatorCommand> &commands_out);
218 PacketHeader &header_out,
219 uint8_t &adc_good_out,
220 std::vector<SelfTestResult> &results_out);
227 PacketHeader &header_out,
228 EnvironmentalDataPacket &data_out);
235 PacketHeader &header_out,
236 StacklightCommandPacket &data_out);
247 PacketHeader &header_out,
248 std::vector<uint8_t> &sensor_ids_out,
249 uint8_t &reference_voltage_out,
250 bool &necessary_for_abort_out,
251 uint32_t &controller_ip_out,
252 uint8_t &enable_serial_printing_out);
266 uint32_t timestamp_ms,
267 uint8_t *buffer,
size_t buffer_size);
274 PacketHeader &header_out,
275 std::vector<PWMActuatorCommand> &commands_out);
295 const std::vector<AbortActuatorLocation> &abort_actuators,
296 const std::vector<AbortPTLocation> &abort_pts,
297 uint8_t enable_serial_printing,
298 uint32_t timestamp_ms,
299 uint8_t *buffer,
size_t buffer_size);
307 PacketHeader &header_out,
308 uint8_t &is_abort_controller_out,
309 std::vector<AbortActuatorLocation> &abort_actuators_out,
310 std::vector<AbortPTLocation> &abort_pts_out,
311 uint8_t &enable_serial_printing_out);
327 PacketHeader &header_out,
329 const uint8_t *&text_out,
330 uint16_t &text_len_out);
std::vector< daq::SensorDataChunkCollection > chunks
static bool is_abort_controller
static osMessageQueueId_t commands
bool parse_self_test_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, uint8_t &adc_good_out, std::vector< SelfTestResult > &results_out)
Parses a Self Test packet from buffer.
size_t create_sensor_data_packet(const std::vector< SensorDataChunkCollection > &chunks, const uint8_t num_sensors, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete Sensor Data packet in the provided buffer.
bool parse_server_heartbeat_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, ServerHeartbeatPacket &data_out)
Parses a Server Heartbeat packet from buffer.
bool parse_log_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, uint8_t &flags_out, const uint8_t *&text_out, uint16_t &text_len_out)
Parses a LOGS packet (type 15) from buffer.
size_t create_abort_done_packet(uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a simple Abort Done packet.
bool parse_sensor_config_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, std::vector< uint8_t > &sensor_ids_out, uint8_t &reference_voltage_out, bool &necessary_for_abort_out, uint32_t &controller_ip_out, uint8_t &enable_serial_printing_out)
Parses a Sensor Config packet from buffer.
size_t create_log_packet(uint8_t flags, const uint8_t *text, uint16_t text_len, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a LOGS packet (type 15): buffered board log text for the server.
bool parse_board_heartbeat_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, BoardHeartbeatPacket &data_out)
Parses a Board Heartbeat packet from buffer.
size_t create_board_heartbeat_packet(const BoardHeartbeatPacket &data, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete Board Heartbeat packet in the provided buffer.
bool parse_pwm_actuator_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, std::vector< PWMActuatorCommand > &commands_out)
Parses a PWM Actuator Command packet from buffer.
size_t create_pwm_actuator_packet(const std::vector< PWMActuatorCommand > &commands, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete PWM Actuator Command packet in the provided buffer.
size_t create_stacklight_command_packet(const StacklightCommandPacket &data, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete Stacklight Command packet in the provided buffer.
bool parse_stacklight_command_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, StacklightCommandPacket &data_out)
Parses a Stacklight Command packet from buffer.
size_t create_environmental_data_packet(float temperature_c, uint32_t pressure_pa, float humidity_rh, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete Environmental Data packet in the provided buffer.
bool parse_actuator_command_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, std::vector< ActuatorCommand > &commands_out)
Parses an Actuator Command packet from buffer.
size_t create_sensor_config_packet(const std::vector< uint8_t > &sensor_ids, uint8_t reference_voltage, bool necessary_for_abort, uint32_t controller_ip, uint8_t enable_serial_printing, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete Sensor Config packet in the provided buffer.
bool parse_environmental_data_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, EnvironmentalDataPacket &data_out)
Parses an Environmental Data packet from buffer.
size_t create_self_test_packet(uint8_t adc_good, const std::vector< SelfTestResult > &results, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete Self Test packet in the provided buffer.
bool parse_abort_done_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out)
Parses an Abort Done packet from buffer.
size_t create_actuator_config_packet(uint8_t is_abort_controller, const std::vector< AbortActuatorLocation > &abort_actuators, const std::vector< AbortPTLocation > &abort_pts, uint8_t enable_serial_printing, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete Actuator Config packet in the provided buffer.
bool parse_actuator_config_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, uint8_t &is_abort_controller_out, std::vector< AbortActuatorLocation > &abort_actuators_out, std::vector< AbortPTLocation > &abort_pts_out, uint8_t &enable_serial_printing_out)
Parses an Actuator Config packet from buffer.
bool parse_sensor_data_packet(const uint8_t *buffer, size_t buffer_size, PacketHeader &header_out, std::vector< SensorDataChunkCollection > &chunks_out)
Parses a Sensor Data packet from buffer into chunk collections.
size_t create_actuator_command_packet(const std::vector< ActuatorCommand > &commands, uint32_t timestamp_ms, uint8_t *buffer, size_t buffer_size)
Creates a complete Actuator Command packet in the provided buffer.