You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
809 B
TypeScript
29 lines
809 B
TypeScript
export declare const HEADER_LENGTH = 6;
|
|
export interface SpacePacketHeader {
|
|
versionNumber: string | number;
|
|
identification: {
|
|
apid: number;
|
|
secondaryHeader: number;
|
|
type: number;
|
|
};
|
|
sequenceControl: {
|
|
packetName: number;
|
|
sequenceFlags: number;
|
|
};
|
|
dataLength: number;
|
|
}
|
|
export interface SpacePacket {
|
|
header: SpacePacketHeader;
|
|
secondaryHeader?: {
|
|
timeCode?: string;
|
|
ancillaryData?: string;
|
|
};
|
|
data: string;
|
|
}
|
|
/**
|
|
* Converts a Buffer of any length to an Object representation of a Space Packet header, provided
|
|
* the received data is in the correct format.
|
|
* @param buf - The buffer containing the Space Packet Header Data
|
|
*/
|
|
export declare const convertHeaderBufferToObj: (buf: Buffer) => SpacePacketHeader;
|