Boost logo

Boost :

From: Daggumati, Rajesh (rajesh.daggumati_at_[hidden])
Date: 2022-04-07 11:29:00


Hi Team,

We can see two different behaviours in communication when we tested in windows and Linux with same hardware .Windows responded slowly compared to Linux.
We are using async_write_some and async_read_some methods from boost library for RS-232 communication with hardware(COM1).

m_serialPort.async_write_some(boost::asio::buffer(toSend),
            boost::bind(&SerialPortAsync::HandleSentData, this,
                        boost::asio::placeholders::error,
                        boost::asio::placeholders::bytes_transferred));

m_serialPort.async_read_some(boost::asio::buffer(m_RecvBuffer),
            boost::bind(&SerialPortAsync::HandleReceive, this,
            boost::asio::placeholders::error,
            boost::asio::placeholders::bytes_transferred));

Comparison Linux Vs Windows for same application :

Linux
Sending Time ---> 2020/11/23 17:34:56.678585,1064, , <-- (+0.000151) (11)[010B0557,0D0001E8,03C40F] [tx-queue:24] Send
Receiving Time ---> 2020/11/23 17:34:56.680490,1064, , --> (+0.001905) (8)[060B0557,040D00E8] [tx-queue:24]

Turnaround time : 0.001905

Windows
Sending Time ---> 2022/03/28 14:41:28.662338,5388, , <-- (+0.000000) (11)[010B0457,0D0001E8,035BDA] [tx-queue:40]
Receiving Time --> 2022/03/28 14:41:28.693591,5388, , --> (+0.031253) (9)[06090457,0D0001B0,1F] [tx-queue:40]

Turnaround time : 0.031253

We want to know why windows takes more time as compared to Linux. We cannot put more debug logs in the application code. Below this layer, boost library play the role to transfer the data to the Serial port

Regards,
Rajesh D
Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk