From: brian g. <bg...@po...> - 2002-06-04 23:29:21
|
hi guys, just committed changes to *lots* of source files. mostly minor changes, however: - there is a new type 'player_device_id_t', which store the identifying info for a device: code, index, and port. variables of this type are now used, for example, in calls to CDeviceTable::GetDevice(). in general, all internal references in Player to a device should use this type. - 'player_device_id_t' replaced stage's 'player_id_t', with the only real change being that the 'type' member is now called 'code', to be consistent. i have already updated *all* Stage and Player code to account for this change. - config req/rep queues now store a 'player_device_id_t' that tells either to whom the request is addressed, or from whom the reply should be addressed. i added this so that when multiple devices share a pair of queues (e.g., P2OS), the requests and replies can be properly handled and addressed. accordingly, the Put/Get Config/Reply interfaces changed slightly. - every Player CDevice now has a public player_device_id_t, called 'device_id'. this member effectively tells the device who it is. it is set by CDeviceTable::AddDevice() when the device is added to the instantiated device table. thus you cannot access it in a device constructor, but you can do so in your Setup(). - for convenience there is a new "short form" of PutReply() for zero-length replies, e.g.: if(PutReply(client, PLAYER_MSGTYPE_RESP_NACK) != 0) PLAYER_ERROR("PutReply() failed"); - i've tested with the real robot and all is well. - i've tested with Stage and all is well, except for laserbeacondevice (Richard: what happened to CEntity::Subscribe() and CEntity::Unsubscribe()?) brian. |