NAME

AnyEvent::RFXCOM::RX - AnyEvent module for an RFXCOM receiver

VERSION

version 1.103270

SYNOPSIS

# Create simple RFXCOM message reader with logging callback
AnyEvent::RFXCOM::RX->new(callback => sub { print $_[0]->summary },
                          device => '/dev/ttyUSB0');

# start event loop
AnyEvent->condvar->recv;

DESCRIPTION

AnyEvent module for handling communication with an RFXCOM receiver.

METHODS

new(%params)

Constructs a new AnyEvent::RFXCOM::RX object. The supported parameters are:

device

The name of the device to connect to. The value can be a tty device name or a hostname:port for TCP-based RFXCOM receivers. The default is /dev/rfxcom-rx. See Device::RFXCOM::RX for more information.

callback

The callback to execute when a message is received.

cleanup()

This method attempts to destroy any resources in the event of a disconnection or fatal error.

anyevent_read_type()

This method is used to register an AnyEvent::Handle read type method to read RFXCOM messages.

THANKS

Special thanks to RFXCOM, http://www.rfxcom.com/, for their excellent documentation and for giving me permission to use it to help me write this code. I own a number of their products and highly recommend them.

SEE ALSO

AnyEvent(3)

RFXCOM website: http://www.rfxcom.com/

AUTHOR

Mark Hindess <soft-cpan@temporalanomaly.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Mark Hindess.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.