NAME
Test::Device::SerialPort - Serial port mock object to be used for testing
SYNOPSIS
use Test::Device::SerialPort;
my $PortObj = Test::Device::SerialPort->new('/dev/ttyS0');
$PortObj->baudrate(19200);
$PortObj->parity('none');
$PortObj->databits(8);
$PortObj->stopbits(1);
# Simulate read from port (can also read nothing)
my($count, $data) = $PortObj->read(100);
print "Read random data from serial [$data]\n";
# Simulate write to serial port
$count = $PortObj->write("MY_MESSAGE\r");
print "Written $count chars to test port\n";
# ...
DESCRIPTION
Nothing more. It's a test object that mimics the real Device::SerialPort thing. Used mainly for testing when I don't have an actual device to test.
STATUS
Just a sketch version...
SEE ALSO
AUTHOR
Cosimo Streppone, <cosimo@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2007 by Cosimo Streppone
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 306:
=over should be: '=over' or '=over positive_number'