> Date: Sun, 11 Jul 2004 18:33:23 GMT
> From: "Dave Raven" <[EMAIL PROTECTED]>
> Subject: RE: [U2] terminal on universe
> 
> I need to collect data from a phone switch, i want to run a phantom that can capture 
> a line at a time form the switch and write it to a transaction file and then run a 
> bp to parse it the items into
> a data base then create reports on phone calls for management reports. we are a 
> telemarketing company. now we are re-keying the information in to the computer

This is really easy with a very short perl script.  I do it all the time with my truck 
scales.  There is a perl module for windows serial handling, and a different one for 
unix, so get the appropriate 
one.  After that it's just:

use Device::SerialPort 0.05;
my $file = "/dev/ttyS0";
my $obS0 = Device::SerialPort->new ($file) || die "Can't open $file: $!";
$obS0->baudrate(9600); 
$obS0->parity("none");
$obS0->databits(8);
$obS0->stopbits(1);
$obS0->handshake("none");
$obS0->write_settings;

$loc = $obS0->input;

(etc)

Then just write it out to the file system in your favorite perly way.  You could even 
do some text processing of the data in perl first.

-mark
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to