using System.Collections.Generic;
namespace HC_APTBS.Models
{
///
/// Describes how a multi-bit status word returned by the pump ECU should be
/// displayed in the UI. Each maps to one
/// CAN status parameter and contains a set of bit-field
/// definitions.
///
public class PumpStatusDefinition
{
/// Numeric identifier of this status word.
public int Id { get; set; }
/// Display label for the status word group.
public string Name { get; set; } = "-";
/// Bit-field definitions within this status word.
public List Bits { get; set; } = new();
}
///
/// Defines the meaning of a single bit (or bit-group) within a pump status word.
///
public class StatusBit
{
/// Bit position (0-based) within the status word.
public int Bit { get; set; }
/// When false, this bit position is ignored in the display.
public bool Enabled { get; set; } = true;
/// Possible states and their display colours.
public List Values { get; set; } = new();
}
///
/// A single state value for a : a numeric state code
/// mapped to a display colour and human-readable description.
///
public class StatusBitValue
{
/// Numeric state (0 or 1 for single-bit fields).
public int State { get; set; }
/// HTML hex colour used to paint the indicator (e.g. "26C200" for green).
public string Color { get; set; } = "26C200";
/// Human-readable description of this state.
public string Description { get; set; } = string.Empty;
}
}