NAME
Device::ProXR::RelayControl - A subclass of Device::ProXR object for relay control.
VERSION
Version 0.02
NOTES
* Before comitting this file to the repository, ensure Perl Critic can be invoked at the HARSH [3] level with no errors
SYNOPSIS
use Device::ProXR::RelayControl;
my $board = Device::ProXR::RelayControl->new(qq{COM2});
$board->all_off;
$board->relay_on(1, 1);
ATTRIBUTES
METHODS
get_mode()
- Description
-
Returns the current mode of operation
- Parameters
-
NONE
- Return
-
NONE
relay_on($bank, $relay)
- Description
-
Turn on the relay of the specified bank
- Parameters
-
$bank - Bank number of the relay to control $relay - Relay number of the relay to control
- Return
-
UNDEF on error (with last_error set)
relay_off($bank, $relay)
- Description
-
Turn off the relay of the specified bank
- Parameters
-
$bank - Bank number of the relay to control $relay - Relay number of the relay to control
- Return
-
UNDEF on error (with last_error set)
relay_status($bank, $relay)
- Description
-
Get the status of the relay of the specified bank
- Parameters
-
$bank - Bank number of the relay to control $relay - Relay number of the relay to control
- Return
-
UNDEF on error (with last_error set) 0 == Relay is OFF 1 == Relay is ON
all_on()
- Description
-
Turn on all relays on all banks
- Parameters
-
NONE
- Return
-
NONE
all_off()
- Description
-
Turn off all relays on all banks
- Parameters
-
NONE
- Return
-
NONE
bank_on($bank)
- Description
-
Turn on all relays on the specified bank
- Parameters
-
$bank - Bank number of bank to control
- Return
-
NONE
bank_off($bank)
- Description
-
Turn off all relays on the specified bank
- Parameters
-
$bank - Bank number of bank to control
- Return
-
NONE
bank_invert($bank)
- Description
-
Invert the status of all relays on the specified bank
- Parameters
-
$bank - Bank number of bank to control
- Return
-
NONE
bank_reverse($bank)
- Description
-
Reverse / mirror the status of all relays on the specified bank
- Parameters
-
$bank - Bank number of bank to control
- Return
-
NONE
bank_status($bank)
- Description
-
Return a byte with the statTurn on all relays on the specified bank
- Parameters
-
$bank - Bank number of bank to control
- Return
-
SCALAR - Each bit represents relay 0-7 status
AUTHOR
Paul Durden <alabamapaul AT gmail.com>
COPYRIGHT & LICENSE
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.