UNPKG

enip-ts

Version:

Typescript implementation of the Ethernet/IP™ protocol.

36 lines (35 loc) 985 B
/// <reference types="node" /> export interface ParsedHeader { /** Encapsulation command code */ commandCode: number; /** Encapsulation command string interpretation */ command: string; /** Length of encapsulated data */ length: number; /** Session ID */ session: number; /** Status code */ statusCode: number; /** Status code sitrng interpretation */ status: string; /** Options (Typically 0x00) */ options: number; /** Encapsulated Data buffer */ data: Buffer; } export declare class Header { /** * Build an header * @param cmd command number to use * @param session session id to use * @param data data buffer to send * @returns Encapsulated data */ static build(cmd: number, session?: number, data?: Buffer | number[]): Buffer; /** * Parses an header * @param buf header to parse * @returns parsed header */ static parse(buf: Buffer): ParsedHeader; }