BACnet
view release on metacpan or search on metacpan
lib/BACnet/Socket.pm view on Meta::CPAN
use Data::Dumper;
use Future::AsyncAwait;
use IO::Async::Socket;
use IO::Async::Loop;
use Socket qw(unpack_sockaddr_in inet_ntoa pack_sockaddr_in inet_aton);
use BACnet::Device;
use Scalar::Util 'weaken';
my $BACNET_PORT = 0xBAC0; # 47808
sub new {
my ( $class, $device, %args ) = @_;
weaken { $device };
my $self = {
retries => $args{retries} // 3,
timeout => $args{timeout} // 3,
loop => $args{io_loop} // IO::Async::Loop->new,
debug => $args{debug},
stime => time, # for debugging timestamps
device => $device,
locks => {},
};
( run in 1.666 second using v1.01-cache-2.11-cpan-39bf76dae61 )