From: ya_shan <ys...@nd...> - 2006-07-11 23:53:35
|
Hi, I have not got idea on how to use the three functions in OpaqueProxy. 1. void GetData (uint8_t *aDest) const is this to save data to a specific buffer or give the pointer to the output buffer? 2. uint GetCount () const what is the count for? 3. void SendCmd (player_opaque_data_t *aData) where to send the data? player_opaque_data buffer is empty or save data already? does the buffer share data with other clients? My code is, PlayerClient robot(gHostname, gPort); Position2dProxy pp(&robot, gIndex); LaserProxy lp(&robot, gIndex); OpaqueProxy op(&robot, gIndex); playerc_opaque_t *mDevice; std::cout << robot << std::endl; pp.SetMotorEnable (true); for(;;) { // this blocks until new data comes; 10Hz by default robot.Read(); uint len = op.GetCount(); std::cout << len << std::endl; std::cout << mDevice->data_count << std::endl; std::cout << mDevice->data <<std::endl; output: len = 0; data_count = 94752 data = " " It seems i dont get the data to the buffer. What shall I do? I appreciate any answer for my questions. Thanks, ys -- View this message in context: http://www.nabble.com/need-help-on-opaqueproxy-tf1928014.html#a5280316 Sent from the playerstage-users forum at Nabble.com. |