4.2 KiB
4.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-17T15:45:02.925780+00:00 | zai-org/GLM-5-FP8 | 1 | 2dc83337f53d0fe1 |
CANFDApiProxy.Messages Documentation
1. Purpose
This module defines Data Transfer Objects (DTOs) for serializing and deserializing messages exchanged with a CAN-FD (Controller Area Network Flexible Data-rate) device API. It provides strongly-typed representations of device state, configuration, diagnostics, and control messages for hardware components including CAN bus interfaces, battery systems, USB storage, LEDs, network interfaces, and system services. The module serves as the message contract layer between the API proxy and downstream consumers.
2. Public Interface
Simple Message Classes
| Class | Properties | Notes |
|---|---|---|
StatusMessage |
status (string) |
Generic status response |
ErrorMessage |
Error (string) |
Error response container |
NtpMessage |
Ntp (string), Fallback (string) |
NTP server configuration |
LEDsPostMessage |
status (string), reply (string) |
LED POST operation response |
DiagnosticsMessageRequest |
format (string) |
Overrides ToString() |
ClocksMessage |
Rtc_present (bool?), Rtc_setup (bool?), System (string), Status (string) |
Real-time clock status |
DeviceInfoMessage |
Kernel_version, Os_release, Serial_number, Version_number (all string) |
Device identification |
SerialMessage |
Serial (string), Status (string) |
Overrides ToString() |
NetworkMessage |
Current_address, Interface, Mac_address, Set_address, Ok (string); Dhcp (bool) |
Network configuration |
CalibrationMessage |
Calibration_date (int), Calibration_date_string (string) |
Overrides ToString() |
RecordingMessage |
Recording, Recording_dir, Ok, Reply (string); Autoarm (bool) |
Overrides ToString() |
PowerMessage |
Battery_enable, Nvin_pin, On_pin, Power_fault (bool); Status (string) |
Overrides ToString() |
EventPinMessage |
Armed, Event, Event_pin (bool?); File_name, Ok, Reply (string) |
Overrides ToString() |
BatteryMessage |
LoadV, Current, Power, Percent (decimal); Enable (bool) |
Overrides ToString() |
Collection-Based Message Classes
ServicesMessage
services(Service[])- Nested class
Service:Enabled(bool),Name(string),Status(string)
CANInfoMessage
CANInfoList(List<CANInfo>)- Nested class
CANInfo: Constructor(string name, string info), read-only propertiesName,Info
CANStateMessage
CANStateList(List<CANState>)- Nested class
CANState: Constructor(string name, string state, float last_updated),Name(read-only),State,Last_updated(settable)
CANStatsMessage
CANStatsList(List<CANStats>)- Nested class
CANStats: Constructor with parameters `(string name, int std_data, int std_remote, int ext_data, int ext_remote, int err_frame, float bus