using TBF.Rig.TestMethods.iPerlCommunication.communication.C4.diagnosticLed;
namespace TBF.Rig.TestMethods.iPerlCommunication.communication.C4.protocolCommons
{
///
/// Device-specific TouchRead sub-commands.
/// These sub-commands are used together with the
/// (0xFD) command.
///
public enum ProtocolDeviceSubCommand : byte
{
// ==========================================================
// System / Time
// ==========================================================
///
/// View system time.
/// Returns uint32 seconds since 2000-01-01 00:00:00.
///
ViewSystemTime = 0x10,
///
/// Set system time.
/// Payload: uint32 seconds since 2000-01-01.
/// If set to zero, the meter resets and erases data.
/// Protected by meter seal.
///
SetSystemTime = 0x11,
// ==========================================================
// Alarm Mask / Alarm Configuration
// ==========================================================
/// View alarm mask (lower 16 bits).
ViewAlarmMask = 0x31,
/// Set alarm mask (lower 16 bits).
SetAlarmMask = 0x32,
/// View alarm persistence period (days).
ViewPersistence = 0x33,
/// Set alarm persistence period (days).
SetPersistence = 0x34,
/// View leak duration (hours).
ViewLeakDuration = 0x35,
/// Set leak duration (hours).
SetLeakDuration = 0x36,
/// View current alarm states.
ViewAlarms = 0x37,
/// Set alarm states (protected by meter seal).
SetAlarms = 0x38,
// ==========================================================
// Manufacture / Counters
// ==========================================================
/// View manufacture date.
ViewManufactureDate = 0x39,
/// Set manufacture date (protected by meter seal).
SetManufactureDate = 0x3A,
/// View seconds idle.
ViewSecondsIdle = 0x3B,
/// View seconds active.
ViewSecondsActive = 0x3D,
/// View seconds used.
ViewSecondsUsed = 0x3F,
// ==========================================================
// Snapshot / Datalog
// ==========================================================
/// View snapshot data.
ViewSnapshotData = 0x41,
/// View datalog duration.
ViewDatalogDuration = 0x43,
/// Set datalog duration.
SetDatalogDuration = 0x44,
/// Read datalog.
ReadDatalog = 0x45,
/// Clear datalog.
ClearDatalog = 0x46,
// ==========================================================
// History
// ==========================================================
/// View history mask.
ViewHistoryMask = 0x47,
/// Set history mask.
SetHistoryMask = 0x48,
/// Read history.
ReadHistory = 0x49,
/// Clear history.
ClearHistory = 0x4A,
// ==========================================================
// Diagnostics / Status
// ==========================================================
/// View diagnostics.
ViewDiagnostics = 0x4B,
/// Reset diagnostics.
ResetDiagnostics = 0x4C,
/// View status file.
ViewStatusFile = 0x4F,
/// Set status file (protected by meter seal).
SetStatusFile = 0x50,
// ==========================================================
// Calibration / Configuration
// ==========================================================
/// View calibration structure.
ViewCalibrationStructure = 0x51,
/// Set calibration structure (protected by meter seal).
SetCalibrationStructure = 0x52,
///
/// View calibration factor.
/// Response payload: uint16 little-endian calibration factor.
/// Nominal value 4096 represents 100.0 %.
///
ViewCalibration = 0x53,
///
/// Set calibration factor.
/// Payload: uint16 little-endian calibration factor.
/// Protected by meter seal.
///
SetCalibration = 0x54,
/// View reboot count.
ViewRebootCount = 0x55,
/// Set reboot count (protected by meter seal).
SetRebootCount = 0x56,
/// View temperature.
ViewTemperature = 0x57,
/// Set temperature (protected by meter seal).
SetTemperature = 0x58,
// ==========================================================
// Flip mode
// ==========================================================
///
/// View randomized field flip-rate mode.
/// Response payload:
/// 0x00 = randomized flip rate disabled,
/// 0x01 = randomized flip rate enabled.
///
ViewFlipMode = 0xB9,
// ==========================================================
// Diagnostic LED / Hardware
// ==========================================================
///
/// Set diagnostic LED state.
/// Enables or disables high-speed LED serial output.
///
/// See
/// diagnostic LED output modes.
///
///
SetDiagnosticLEDState = 0x60,
// ==========================================================
// Build / Firmware Info
// ==========================================================
/// View iPERL build information.
ViewIPerlBuild = 0x65,
/// Set iPERL build (protected by meter seal).
SetIPerlBuild = 0x66,
// ==========================================================
// Bootloader (DANGEROUS – use with care)
// ==========================================================
/// Enter bootloader mode.
EnterBootloader = 0x81,
/// Read FLASH memory.
ReadFlash = 0x82,
/// Erase all FLASH memory.
EraseAll = 0x83,
/// Erase FLASH segment.
EraseSegment = 0x84,
/// Update firmware code.
UpdateCode = 0x85,
/// Exit bootloader mode.
ExitBootloader = 0x86
}
}