Device::ProXR::RelayControl - A subclass of Device::ProXR object for relay control.
Version 0.06
* Before comitting this file to the repository, ensure Perl Critic can be invoked at the HARSH [3] level with no errors
use Device::ProXR::RelayControl; my $board = Device::ProXR::RelayControl->new(port => qq{COM2}); $board->all_off; $board->relay_on(1, 1);
See Device::ProXR for attributes and methods of the base class.
Returns the current mode of operation
NONE
Value indicating run mode
Turn on the relay
$bank - Bank number of the relay to control (1 based) $relay - Relay number of the relay to control (0 based)
UNDEF on error (with last_error set)
If only one parameter is specified, it is treated as a 0 based relay number and the bank is calculated as (relay / 8) + 1, and the relay within the bank is caluclated as (relay % 8)
Turn off the relay of the specified bank
Get the status of the relay of the specified bank
$bank - Bank number of the relay to control $relay - Relay number of the relay to control
UNDEF on error (with last_error set) 0 == Relay is OFF 1 == Relay is ON
Turn the relay on or off
$on - Indicates if the relay should be turned on or off $bank - Bank number of the relay to control (1 based) $relay - Relay number of the relay to control (0 based)
If only two parameters are specified, the second parameter is treated as a 0 based relay number and the bank is calculated as (relay / 8) + 1, and the relay within the bank is caluclated as (relay % 8)
Turn on all relays on all banks
Turn off all relays on all banks
Turn on all relays on the specified bank
$bank - Bank number of bank to control
Turn off all relays on the specified bank
Invert the status of all relays on the specified bank
Reverse / mirror the status of all relays on the specified bank
Return a byte with the statTurn on all relays on the specified bank
SCALAR - Each bit represents relay 0-7 status
Paul Durden <alabamapaul AT gmail.com>
Copyright (C) 2015 by Paul Durden.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Device::ProXR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::ProXR
CPAN shell
perl -MCPAN -e shell install Device::ProXR
For more information on module installation, please visit the detailed CPAN module installation guide.