Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Test::Device::SerialPort
Serial port mock object to be used for testing

Test::Device::SerialPort - Serial port mock object to be used for testing


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

Device::SerialPort
Win32::SerialPort


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.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy