Public Member Functions | |
LaserTransform (ConfigFile *cf, int section) | |
virtual int | ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data) |
Message handler. | |
virtual int | Setup () |
Initialize the driver. | |
virtual int | Shutdown () |
Finalize the driver. | |
Protected Member Functions | |
virtual int | UpdateLaser (player_laser_data_t *data)=0 |
int | HandleRequests () |
void | HandleGetGeom (void *client, void *req, int reqlen) |
Protected Attributes | |
Device * | laser_device |
player_devaddr_t | laser_addr |
struct timeval | laser_timestamp |
player_laser_data_t | data |
struct timeval | time |
int LaserTransform::ProcessMessage | ( | QueuePointer & | resp_queue, |
player_msghdr * | hdr, | ||
void * | data | ||
) | [virtual] |
Message handler.
This function is called once for each message in the incoming queue. Reimplement it to provide message handling. Return 0 if you handled the message and -1 otherwise
resp_queue | The queue to which any response should go. |
hdr | The message header |
data | The message body |
Reimplemented from Driver.
References Message::MatchMessage(), PLAYER_MSGTYPE_DATA, PLAYER_LASER_DATA_SCAN, player_msghdr::size, PLAYER_MSGTYPE_REQ, Driver::device_addr, Device::PutMsg(), Driver::InQueue, Driver::ret_queue, player_devaddr::host, player_msghdr::subtype, PLAYER_MSGTYPE_RESP_ACK, PLAYER_MSGTYPE_RESP_NACK, player_msghdr::addr, and Driver::Publish().
int LaserTransform::Setup | ( | void | ) | [virtual] |
Initialize the driver.
This function is called with the first client subscribes; it MUST be implemented by the driver.
Reimplemented from Driver.
References Device::MatchDeviceAddress(), Driver::device_addr, PLAYER_ERROR, and Device::Subscribe().
int LaserTransform::Shutdown | ( | void | ) | [virtual] |
Finalize the driver.
This function is called with the last client unsubscribes.
Reimplemented from Driver.
References Device::Unsubscribe(), and Driver::InQueue.