XDEVOPN
XDEVOPN( $dev , $conf )
XDEVOPN öffnet die Verbindung zum Device $dev mit dr Konfiguration $conf.
$conf = 'COM(9600,8,N,1)';
XDEVOPN( '/dev/ttyS1' , $conf )
$regex = '~^(ST|US|OL|UL),(GS|NT), *([0-9\.\-]{1,8}),(kg|lb)\r\n~i';
XDEVSNDRCV( "READ\r\n" , "\r\n" , 30 , $regex )
if (empty($syserror))
{
$weight = $sysmatch[3];
$unit = $sysmatch[4];
XLOGW( "$weight $unit" )
}
XDEVCLS( 0 )
XDEVCLS
XDEVSNDRCV
XLOGW
$syserror
$sysmatch