node-djiparsetxt
Version:
command-line application that reads a DJI '.txt' file and outputs a json.
40 lines (39 loc) • 1.51 kB
TypeScript
import BaseService from "./BaseService";
import { RecordTypes } from "./RecordTypes";
export declare enum ParserTypes {
Header = "header",
BaseRecord = "base_record",
StartRecord = "start_record",
Details = "details",
OsdRecord = "osd_record",
HomeRecord = "home_record",
GimbalRecord = "gimbal_record",
RcRecord = "rc_record",
CustomRecord = "custom_record",
DeformRecord = "deform_record",
CenterBatteryRecord = "center_battery_record",
SmartBatteryRecord = "smart_battery_record",
AppTipRecord = "app_tip_record",
AppWarnRecord = "app_warn_record",
RecoverRecord = "recover_record",
AppGpsRecord = "app_gps_record",
FirmwareRecord = "firmware_record"
}
export declare class BinaryParserService extends BaseService {
/**
* Returns an instance of the requested parser by the type of parser.
* @param type Entry in ParserTypes enum for the requested parser.
*/
get_parser(type: ParserTypes): any;
/**
* Returns an instance of a parser based on given record type. This
* parser should be able to parse the given record type.
* @param recordType The type of the record parsed by the parser.
*/
get_record_parser(recordType: RecordTypes): any;
/**
* Mapping between record type and the parser that can parse them.
* @param recordType The type of the record to get its corresponding parser type.
*/
parser_record_mapping(recordType: RecordTypes): ParserTypes | null;
}