SmarTak® Status Code Overview

SmarTak API v4.0.0

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

FieldBitsDescription
TYPE4Type code that describes the asset.
ASSET_STAT4Unique asset status related to its mission or operation.
RESERVED8Reserved for future use.
MOTION_TYPE4Current motion state of the asset (e.g., walking, flying).
BATL_STAT5Current battle status (e.g., aiming, reloading).
SHOT_FIRE1Indicates if the weapon has been fired (Binary: 1 for yes, 0 for no).
WPN_OK1Indicates if the weapon is operational (Binary: 1 for yes, 0 for no).
SYS_HEALTH5Health status of the asset, primarily for personnel.
SYS_ERR1Indicates 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

MacroValue (Hex)Description
WnA_TYP_CODE_MED0x00Medical
WnA_TYP_CODE_HGUN0x01Handgun
WnA_TYP_CODE_RIF0x02Rifle
WnA_TYP_CODE_CREW0x03Crew Served Weapon
WnA_TYP_CODE_ANT0x04Anti-Tank
WnA_TYP_CODE_MORT0x05Mortar
WnA_TYP_CODE_DRON0x06Drone Payload
WnA_TYP_CODE_MISS0x07Missile
WnA_TYP_CODE_EW0x08Electronic Warfare
WnA_TYP_CODE_PYRO0x09Pyrotechnic
WnA_TYP_CODE_DEMO0x0ADemolition
WnA_TYP_CODE_DIR0x0BDirected Energy
WnA_TYP_CODE_RES1...40x0C - 0x0FReserved

`ASSET_STAT` Field Definitions

`ASSET_STAT`

MacroValue (Hex)Description
SMTK_TEAM_LEADER0x00User assigned Team Leader
SMTK_SQUAD_LEADER0x01User assigned Squad Leader
SMTK_PLATOON_LEADER0x02User assigned Platoon Leader

`MOTION_TYPE` Field Definitions

`MOTION_TYPE`

MacroValue (Hex)Description
SMTK_No motion0x00No motion
SMTK_Walking0x01User is walking
SMTK_Running0x02User is running
SMTK_Falling0x03User is falling
SMTK_Driving0x04User is in a vehicle
SMTK_Flying0x05User is in an aircraft

`BATL_STAT` Field Definitions

`MOTION_TYPE`

MacroValue (Hex)Description
SMTK_USER_NO_BATTLE0x00User not in battle
SMTK_USER_ADS0x01User is Aiming Down Sights
SMTK_UAS_LOITER0x1EUAS is in loiter mode
SMTK_WPN_DRAW0x1FWeapon drawn from holster

`SYS_HEALTH` Field Definitions

`MOTION_TYPE`

MacroValue (Hex)Description
SMTK_HEALTH_OK0x00User is healthy
SMTK_USER_HR_LOW0x01User has low heart rate
SMTK_USER_HR_HIGH0x02User has high heart rate
SMTK_USER_SPO20x03User SPO2 is low
SMTK_USER_BODY_ARMOR0x05Body armor impact or penetration
SMTK_USER_HELMET0x06Helmet impact or penetration