UNPKG

@tak-ps/node-cot

Version:

Lightweight JavaScript library for parsing and manipulating TAK messages

56 lines (55 loc) 1.47 kB
export declare enum Domain { ATOM = "a", BITS = "b", REFERENCE = "r", TASK = "t", CAPABILITY = "c", REPLY = "y" } export declare enum StandardIdentity { PENDING = "p", UNKNOWN = "u", ASSUMED_FRIEND = "a", FRIEND = "f", NEUTRAL = "n", SUSPECT = "s", HOSTILE = "h", JOKER = "j", FAKER = "k", NONE = "o" } /** * @class * * Convert a COT Atom Type to/from Symbol Identification Code (SIDC) * Migrated to TypeScript from the original Kotlin verison * @ https://github.com/cyberpython/kotcot under the MIT License */ export default class Type2525 { /** * Check a given COT Type to see if it is compatible with conversion to SIDC * * @param cotType - Cursor On Target Type to test */ static is2525BConvertable(cotType: string): boolean; static domain(cotType: string): Domain; static standardIdentity(cotType: string): StandardIdentity; /** * Given a COT Atom Type, return an SIDC * * @param cotType - Cursor On Target Type (Note must start with atomic "a") */ static to2525B(cotType: string): string; /** * Check a given SIDC to see if it is compatible with conversion to CoT Type * * @param sidc - SIDC to test */ static isTypeConvertable(sidc: string): boolean; /** * Given an SIDC, return a CoT Type * * @param sidc - SIDC to convert */ static from2525B(sidc: string): string; }