Schema

The schema that's used in the Hamilton communication is the following:

syntax = "proto3";

message Command {
    int32 command = 1;
    optional int32 parameter = 2;
    optional string filter = 3;
}

message Project {
    UID project_id = 10;
    int32 seq_num = 11;
    int32 client_code = 12;
    int32 site_code = 13;
    repeated Result results = 14;
    optional int32 last_update = 15;
    optional string name = 16;
}

message Station {
    UID station_id = 20;
    int32 seq_num = 21;
    repeated Setting settings = 22;
    UID project_id = 23;
    repeated Result results = 24;
    float earth_bond_limit_connection_point_1 = 25;
    optional float earth_bond_limit_connection_point_2 = 26;
    repeated float earth_bond_limit_test_point = 27;
    optional int32 last_update = 28;
    repeated int32 mfts_used = 29;
    bool marked_for_deletion = 30;
    optional float loop_line_limit = 31;
    optional string name = 32;
}

message Test {
    UID test_id = 30;
    int32 test_type = 31;
    int32 station_part = 32;
    int32 last_update = 33;
    repeated Result results = 34;
    UID station_id = 35;
}

message Measurement {
    UID measurement_id = 40;
    repeated Setting settings = 41;
    repeated Result results = 42;
    optional Graph graph = 43;
    UID test_id = 44;
}

message Graph {
    bytes byte_array = 50;
}

message Result {
    int32 name_enum = 60;
    optional string limit_low = 61;
    optional string limit_high = 62;
    optional float raw_numeric_value = 63;
    optional int32 enum_value = 64;
    int32 evaluation = 65;
    optional int32 unit = 66;
    optional int32 user_forced_state = 67;
    optional string rendered_numeric_value = 68;
}

message Setting {
    int32 name_enum = 70;
    optional float float_value = 71;
    optional int32 enum_value = 72;
}

message Ota {
    int32 seq_num = 80;
    int32 address = 81;
    bytes byte_array = 82;
}

message UID {
    int32 serial_counter = 90;
    int32 timestamp = 91;
}

message TesterInfo {
    string fw_stm = 100;
    string fw_bt = 101;
    string protocol_version = 102;
    int32 serial_number = 103;
    string model = 104;
    int32 last_calibration_date = 105;
}

message OtaInfo {
    int32 number_of_packets = 110;
    int32 overall_crc32 = 111;
    string firmware_version = 112;
}

message UpdatePacket {
    OtaInfo info = 120;
    repeated Ota packets = 121;
}

message ExportCommand {
    int32 parameter = 130;
    optional UID project = 131;
    optional UID station = 132;
    optional UID test = 133;
    optional UID measurement = 134;
}

message ImportCommand {
    int32 parameter = 130;
    optional UID project = 131;
    optional UID station = 132;
    optional UID test = 133;
    optional UID measurement = 134;
}