Overview
The `SMTK_Status_Code` is a 32-bit unsigned integer that efficiently packs critical status information about an asset. By using bitwise operations, a wide range of data—from asset type to system health—can be transmitted in a single, compact field. This document provides a detailed breakdown of its structure and the definitions for each field.
Status Code Bitfield Structure
| TYPE | ASSET_STAT | RESERVED | MOTION_TYPE | BATL_STAT | SHOT | WPN_OK | SYS_HEALTH | ERR | |||||||||||||||||||||||
| 31-28 | 27-24 | 23-16 | 15-12 | 11-7 | 6 | 5 | 4-1 | 0 | |||||||||||||||||||||||
Field Descriptions
| Field | Bits | Description |
|---|---|---|
| TYPE | 4 | Type code that describes the asset. |
| ASSET_STAT | 4 | Unique asset status related to its mission or operation. |
| RESERVED | 8 | Reserved for future use. |
| MOTION_TYPE | 4 | Current motion state of the asset (e.g., walking, flying). |
| BATL_STAT | 5 | Current battle status (e.g., aiming, reloading). |
| SHOT_FIRE | 1 | Indicates if the weapon has been fired (Binary: 1 for yes, 0 for no). |
| WPN_OK | 1 | Indicates if the weapon is operational (Binary: 1 for yes, 0 for no). |
| SYS_HEALTH | 5 | Health status of the asset, primarily for personnel. |
| SYS_ERR | 1 | Indicates a general system error (Binary: 1 for yes, 0 for no). |
C Structure Definition (`SMTK_Status_Code_t`)
typedef struct
{
uint32_t status; // The full 32-bit code
uint8_t type; // 4 bits for type code
uint8_t asset; // 4 bits for asset status
uint8_t motion; // 4 bits for motion type
uint8_t battle; // 5 bits for battle status
uint8_t shot; // 1 bit for shot fired
uint8_t wpn_ok; // 1 bit for weapon okay
uint8_t sys_health; // 5 bits for system health
uint8_t sys_err; // 1 bit for system error
} SMTK_Status_Code_t;
`TYPE` Field Definitions
| Macro | Value (Hex) | Description |
|---|---|---|
| WnA_TYP_CODE_MED | 0x00 | Medical |
| WnA_TYP_CODE_HGUN | 0x01 | Handgun |
| WnA_TYP_CODE_RIF | 0x02 | Rifle |
| WnA_TYP_CODE_CREW | 0x03 | Crew Served Weapon |
| WnA_TYP_CODE_ANT | 0x04 | Anti-Tank |
| WnA_TYP_CODE_MORT | 0x05 | Mortar |
| WnA_TYP_CODE_DRON | 0x06 | Drone Payload |
| WnA_TYP_CODE_MISS | 0x07 | Missile |
| WnA_TYP_CODE_EW | 0x08 | Electronic Warfare |
| WnA_TYP_CODE_PYRO | 0x09 | Pyrotechnic |
| WnA_TYP_CODE_DEMO | 0x0A | Demolition |
| WnA_TYP_CODE_DIR | 0x0B | Directed Energy |
| WnA_TYP_CODE_RES1...4 | 0x0C - 0x0F | Reserved |
`ASSET_STAT` Field Definitions
`ASSET_STAT`
| Macro | Value (Hex) | Description |
|---|---|---|
| SMTK_TEAM_LEADER | 0x00 | User assigned Team Leader |
| SMTK_SQUAD_LEADER | 0x01 | User assigned Squad Leader |
| SMTK_PLATOON_LEADER | 0x02 | User assigned Platoon Leader |
`MOTION_TYPE` Field Definitions
`MOTION_TYPE`
| Macro | Value (Hex) | Description |
|---|---|---|
| SMTK_No motion | 0x00 | No motion |
| SMTK_Walking | 0x01 | User is walking |
| SMTK_Running | 0x02 | User is running |
| SMTK_Falling | 0x03 | User is falling |
| SMTK_Driving | 0x04 | User is in a vehicle |
| SMTK_Flying | 0x05 | User is in an aircraft |
`BATL_STAT` Field Definitions
`MOTION_TYPE`
| Macro | Value (Hex) | Description |
|---|---|---|
| SMTK_USER_NO_BATTLE | 0x00 | User not in battle |
| SMTK_USER_ADS | 0x01 | User is Aiming Down Sights |
| SMTK_UAS_LOITER | 0x1E | UAS is in loiter mode |
| SMTK_WPN_DRAW | 0x1F | Weapon drawn from holster |
`SYS_HEALTH` Field Definitions
`MOTION_TYPE`
| Macro | Value (Hex) | Description |
|---|---|---|
| SMTK_HEALTH_OK | 0x00 | User is healthy |
| SMTK_USER_HR_LOW | 0x01 | User has low heart rate |
| SMTK_USER_HR_HIGH | 0x02 | User has high heart rate |
| SMTK_USER_SPO2 | 0x03 | User SPO2 is low |
| SMTK_USER_BODY_ARMOR | 0x05 | Body armor impact or penetration |
| SMTK_USER_HELMET | 0x06 | Helmet impact or penetration |