Device-WS2500PC
view release on metacpan or search on metacpan
lib/Device/WS2500PC.pm view on Meta::CPAN
sub ws2500_GetDatasetBulk ($;$;$);
sub ws2500_NextDataset;
sub ws2500_FirstDataset ($);
sub ws2500_SetDebug ($);
sub ws2500_InterfaceTest ($);
sub ws2500_InterfaceInit ($;$);
our %data;
%data = ('debug'=>0, 'maxrepeat'=>10,
'commands'=>{'ACTIVATE'=>'0', 'DCF'=>'1', 'NEXTSET'=>'2', 'FIRSTSET'=>'3', 'GETSET'=>'4', 'STATUS'=>'5',
'INTERFACETEST'=>'CTST', 'INTERFACEINIT'=>'D'},
'markers'=>{'SOH'=>"\x01", 'STX'=>"\x02", 'ETX'=>"\x03", 'EOT'=>"\x04",
'ENQ'=>"\x05", 'ACK'=>"\x06",
'DLE'=>"\x10", 'DC2'=>"\x12", 'DC3'=>"\x13",
'NAK'=>"\x15"});
our $VERSION = "0.99";
# ********************************************************
# *** Internal package routines
lib/Device/WS2500PC.pm view on Meta::CPAN
return 0;
# This doesn't seem to work. Acoording to the docu we have to send either
# 'C' or 'CTST'. However both variants fail, and there is either no data
# received at all, or gibberish. Furthermore the interface is not reset.
# If anyone has a clear documentation how to activate this (and what to
# to with it), please send them.
# return 0 unless init_Interface ($port);
# for (my $x=0;$x<$data{'maxrepeat'};$x++) {
# send_Command ('INTERFACETEST');
# sleep (0.04);
# read_Response (1,\%response);
# if ($response{'ok'} and $response{'message'} eq $data{'markers'}->{'ACK'}) {
# $valid=1;
# last;
# }
# }
# close_Interface;
#
# return 1 if $valid;
( run in 1.144 second using v1.01-cache-2.11-cpan-49f99fa48dc )