Package modbuspal.recorder

Examples of modbuspal.recorder.ModbusPalRecord


                {
                    executeThread = false;
                }
                else
                {
                    ModbusPalRecord record = new ModbusPalRecord(line);

                    if( record.getType()==ModbusPalRecord.RECORD_IN )
                    {
                        long timestamp = record.getTimestamp();
                        System.out.println("sleep "+(timestamp-prev_timestamp)+" ms");
                        if( prev_timestamp != 0 )
                        {
                            Thread.sleep( timestamp - prev_timestamp );
                        }
                        prev_timestamp = timestamp;

                        ModbusSlaveAddress slaveId = record.getSlaveID();
                        byte[] data = record.getData();
                        int pduLength = processPDU(slaveId, data, 0, record.getDataLength() );
                    }
                }
            }
            catch (Exception ex)
            {
View Full Code Here

TOP

Related Classes of modbuspal.recorder.ModbusPalRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.