s7-server
Version:
TypeScript S7 PLC Server Simulator
45 lines • 1.31 kB
TypeScript
/**
* S7 Address Parser Utility
* Handles parsing of S7 PLC address strings into structured format
*/
import { S7Area, S7WordLength } from '../types/s7-types';
export interface ParsedAddress {
area: S7Area;
index: number;
start: number;
wordLen: S7WordLength;
size: number;
}
export interface AddressParseResult {
success: boolean;
address?: ParsedAddress;
error?: string;
}
/**
* S7 Address Parser Class
* Provides comprehensive parsing of S7 address strings
*/
export declare class S7AddressParser {
/**
* Parse S7 address string into structured format
* Supports full S7 addressing formats including data types
*/
static parseAddress(address: string): AddressParseResult;
/**
* Validate if an address string is a valid S7 address
*/
static isValidAddress(address: string): boolean;
/**
* Get the byte count required for a word length
*/
static getByteCountFromWordLen(wordLen: S7WordLength): number;
/**
* Extract bit offset from address string for bit addressing
*/
static extractBitOffset(address: string): number;
/**
* Check if an address represents a signed data type
*/
static isSignedDataType(address: string): boolean;
}
//# sourceMappingURL=address-parser.d.ts.map