Files
DP44/DataPRO/CanFDApiProxy/.svn/pristine/2b/2bd1eb8e998786e96e23f19470319d6b10e58320.svn-base
2026-04-17 14:55:32 -04:00

118 lines
3.9 KiB
Plaintext

namespace CANFDApiProxy.Messages
{
public class UsbStatsMessage
{
public Filesystem Filesystem { get; set; }
public Swissbit Swissbit { get; set; }
public Traffic Traffic { get; set; }
public override string ToString()
{
return $"FS: {Filesystem}, SB: {Swissbit}, TR: {Traffic}";
}
}
public class Filesystem
{
public string avail { get; set; }
public string filesystem { get; set; }
public string mounted { get; set; }
public string size { get; set; }
public string type { get; set; }
public string use_pct { get; set; }
public string used { get; set; }
public override string ToString()
{
return $"avail: {avail}, size: {size}, use%: {use_pct}, used: {used}";
}
}
public class Swissbit
{
public Lifetime_Info lifetime_info { get; set; }
public string model { get; set; }
public string path { get; set; }
public string serial { get; set; }
public override string ToString()
{
return $"serial: {serial}, ecc: {lifetime_info.total_ecc_errors}";
}
}
public class Lifetime_Info
{
public string controller_revision { get; set; }
public int correctable_ecc_errors { get; set; }
public Erase_Info[] erase_info { get; set; }
public string firmware_revision { get; set; }
public int flash_lbas_written { get; set; }
public bool global_bad_block_management { get; set; }
public bool global_wear_leveling { get; set; }
public bool overall_health_status { get; set; }
public int power_on_counter { get; set; }
public Spare_Block_Info spare_block_info { get; set; }
public int temperature_current { get; set; }
public int temperature_max { get; set; }
public int temperature_min { get; set; }
public int total_ecc_errors { get; set; }
public int total_erase_count { get; set; }
}
public class Spare_Block_Info
{
public bool count_prefail { get; set; }
public int count_threshold { get; set; }
public bool count_valid { get; set; }
public int count_value { get; set; }
public int minimum { get; set; }
public int number_of_units { get; set; }
public int[] per_unit_current { get; set; }
public int[] per_unit_initial { get; set; }
public int total_current { get; set; }
public int total_initial { get; set; }
public int worst_current { get; set; }
public int worst_initial { get; set; }
}
public class Erase_Info
{
public Average_Erase_Count average_erase_count { get; set; }
public int erase_count { get; set; }
public string flash_cell_mode { get; set; }
public Max_Erase_Count max_erase_count { get; set; }
public bool prefail { get; set; }
public Rated_Erase_Count rated_erase_count { get; set; }
public int threshold { get; set; }
public bool valid { get; set; }
}
public class Average_Erase_Count
{
public bool valid { get; set; }
public int value { get; set; }
}
public class Max_Erase_Count
{
public bool valid { get; set; }
public int value { get; set; }
}
public class Rated_Erase_Count
{
public bool valid { get; set; }
public int value { get; set; }
}
public class Traffic
{
public float average_mbps { get; set; }
public float current_mbps { get; set; }
public float mins_remaining { get; set; }
public override string ToString()
{
return $"ave: {average_mbps}mbps, current: {current_mbps}mbps, remaining: {mins_remaining}mins";
}
}
}