I have a linux PC connected to:
a) several (more or less 50) identical serial-USB (seen as serial ports) devices of type A
b) several (from 2 to 6) identical serial-USB (seen as serial ports) devices of type B, acting as reference
each of these devices produces an ASCII output every second.
I need a threaded perl script that:
1) discovers the connected deviced (by listinng /dev/ttyUSB*)
2) created a thread for each of them (both A and B types)
3) simultaneously captures the output data of each of them and record it on disk (in a separate directory for each device)
4) performs a comparison (algorithm will be given) between the data of each "A" device and the data of one or more "B" device
5) sends an ASCII command back to each "A" device to upload the results.
Each session will last 10 hours, i.e. 36,000 records per device. Each record is about 12 bytes long.
"A" type units will be approximately 50, produced data is in plain ASCII, can be read with "Device::SerialPort". Protocol is minimalistic and will be given.
"B" type will range between 2 and 6, produced data is in plain ASCII, can be read with "Device::SerialPort", but different protocol (given)
The PC will run linux (Debian), and you shell make maximum use of available CPAN libraries; if needed I can suggest some, which I already used for similar projects
All acquired and processed data shall be recorded to file.
For each device (both "A" and "B") you shall create a directory under which you will store their log & processing files
A config file will need to be read, in the format of "Config::Record"
Threading is required for scalability and to avoid blocking timeouts.
The script must be well commented in english
SVN server will be provided.
Standard non disclosure agreement will be requested.
Close followup will be given if you need.