{
  "topic": "BACnet BitString Status Flags",
  "origin": "本文原创合成数据，未采集真实设备",
  "cases": [
    {
      "case_id": "四状态1001",
      "kind": "正例",
      "input": {
        "hex": "04 90",
        "status_flags": true
      },
      "expected": {
        "bits": [
          1,
          0,
          0,
          1
        ],
        "unused_bits": 4,
        "flags": {
          "in_alarm": true,
          "fault": false,
          "overridden": false,
          "out_of_service": true
        }
      }
    },
    {
      "case_id": "九位一般位串",
      "kind": "正例",
      "input": {
        "hex": "07 A5 80",
        "status_flags": false
      },
      "expected": {
        "bits": [
          1,
          0,
          1,
          0,
          0,
          1,
          0,
          1,
          1
        ],
        "unused_bits": 7
      }
    },
    {
      "case_id": "末尾填充污染",
      "kind": "显式负例",
      "input": {
        "hex": "04 91",
        "status_flags": true
      },
      "expected_error": "位串尾部填充非零"
    },
    {
      "case_id": "状态位数不符",
      "kind": "显式负例",
      "input": {
        "hex": "00 90",
        "status_flags": true
      },
      "expected_error": "StatusFlags应有四位"
    }
  ]
}
