diff -r 298db85d9c1d -r 7690e12fafda lib/Quancom.pm --- a/lib/Quancom.pm Wed Jan 21 19:44:38 2009 +0100 +++ b/lib/Quancom.pm Thu Jan 22 03:57:27 2009 +0100 @@ -161,6 +161,8 @@ if ($result->error) { die $result->error_message } else { print $result->data } + $q->set(1 .. 64 => 1); # switch on all the lights + =head1 METHODS @@ -187,6 +189,10 @@ all bits on the first relais. Some other (untested) string for setting just the lowest bit on the first relais should be "WB010001". +B This function is provided for functionality not covered by the +above L function. Whenever possible, you should avoid using this +L, since it binds you tightly to the specific hardware. + =item B( ) This resets the device by setting the reset control flag. @@ -198,7 +204,6 @@ This clears the outputs AND resets timeouts by writing zero to all control bits. - =item B( ) This returns an object containing the last result. @@ -206,11 +211,25 @@ =back -=head1 MORE EXAMPLES +=head1 EXAMPLES use Quancom; my $quancom = new Quancom("172.20.20.1"); - die "Sorry" if $quancom->cmd("xxxx")->error; + + my $result; + + $result = $quancom->set(1, 7 => 1); + die $quancom->error_message if $quancom->error; + + $result = $quancom->set(23 => 0); + die $quancom->error_message if not $quancom->ok; + + $quancom->set(12 => 1); + $result = $quancom->last_result; + die $quancom->error_message if not $quancom->ok; + + $quancom->set(1..63 => 1)->ok + or die $quancom->last_result->error_message; =head1 SEE ALSO @@ -218,8 +237,8 @@ =head1 AUTHOR - Maik Schueller - Heiko Schlittermann + Maik Schueller + Heiko Schlittermann =head1 THANKS