Does the opq_Rfid_Data_t structure have any pointers in it, if so you will need to calculate the size of the full data with the pointed too parts and deep copy it...

Toby

On 25/01/2008, Giulio Zecca <Giulio.Zecca@irisa.fr> wrote:
I need to pass some custom data to the Client: I read something about
Opaque Driver and Proxy and tried to do that way.
However, after some tries, I noticed that apparently nothing is being
sent to the Proxy.
For ease of explication, I replicated the RFIDProxy structure for the
test file.
I can't get to understand the mistake in that, so I ask at first if it
is possible to do suc a thing and, if so, what are the suggestions.

You can find attached a piece of the (hopefully) relevant code; if you
need more details just ask me.
Thanks anyway for your support.
Giulio


ON THE DRIVER:
this->Publish(this->device_addr, NULL, PLAYER_MSGTYPE_DATA,
PLAYER_OPAQUE_DATA_STATE, (void*)&opqRfidData, sizeof(opqRfidData),
NULL);

ON THE CLIENT:
OpaqueProxy    opqProxy(&robot, robotNumber);
robot.Read();
opq_Rfid_Data_t * rfidData;
player_opaque_data_t opqData;
opqData.data_count = sizeof(opq_Rfid_Data_t);
opqProxy.GetData(opqData.data);
rfidData = reinterpret_cast<opq_Rfid_Data_t*>(opqData.data);
rfidNumber = rfidData->tags_count;
/**/ cout << "rfidNumber = " << rfidNumber << endl;
/**/ cout << "rfidData->tags[0].type = " << rfidData->tags[0].type <<
endl;
/**/ cout << "rfidData->tags[0].guid_count = " <<
rfidData->tags[0].guid_count << endl;
/**/ cout << "rfidData->tags[0].guid = " << rfidData->tags[0].guid <<
endl;

CONFIG FILE:
driver
(
  name "..."
  plugin "..."
  requires ["simulation:0"]
  provides ["rfid:3" "opaque:3"]
  model_name "..."
)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users



--
This email is intended for the addressee only and may contain privileged and/or confidential information