How can I read the time between when data was sent to the server and
when it was read by the client.
I see that when using the C++ Client Library, there is the option to use
ClientProxy (PlayerClient *pc, unsigned short req_device, unsigned short
req_index, unsigned char req_access= 'c')
, which has the public attributes senttime and receivedtime. However, I
do not understand how I can use this to explicitly read these times for
each device that I am reading data from. If my proxy object were the
SonarProxy with the name "sp", could I then access these by using
sp.senttime and sp.receivedtime since the PlayerClient is friends with
ClientProxy, or do I need to first instantiate a new object of type
An example would be best, especially if you can add it to the example
for the C++ Client Library:
On Sep 15, 2005, at 9:46 AM, Brandon Sights wrote:
> How can I read the time between when data was sent to the server and
> when it was read by the client.
> ClientProxy (PlayerClient *pc, unsigned short req_device, unsigned
> req_index, unsigned char req_access= 'c')
> , which has the public attributes senttime and receivedtime.
senttime is the time at which the latest message was sent by the server.
receivedtime is when your client received it.
A third field, timestamp, is a time attached by the driver that
generated data. This time is the best estimate of when the phenomenon
occurred (e.g., when the laser scan was taken).
All proxy classes (e.g., SonarProxy) inherit from ClientProxy, so you
can access all three times directly. For example, given a SonarProxy
sp, you can read sp.timestamp. The time fields are filled in by the
PlayerClient object when it processes incoming data (this happens when
you call PlayerClient::Read).