selectDictId

fun selectDictId(cotTypeId: Int, cotTypeStr: String?): Int(source)

Pick the dictionary ID to compress a packet with, based on its CoT type.

Prefers the enum classification (CotTypeMapper.isAircraft); when the type is CotTypeMapper.COTTYPE_OTHER it falls back to the raw type string (CotTypeMapper.isAircraftString). Air-domain types map to DICT_ID_AIRCRAFT, everything else to DICT_ID_NON_AIRCRAFT.

Return

DICT_ID_AIRCRAFT or DICT_ID_NON_AIRCRAFT.

Parameters

cotTypeId

the packet's cot_type_id enum value.

cotTypeStr

the raw CoT type string, used only when cotTypeId is CotTypeMapper.COTTYPE_OTHER; may be null.