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 |
Member Function Documentation
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
- Parameters:
-
resp_queue The queue to which any response should go. hdr The message header data The message body
Reimplemented from Driver.
References player_msghdr::addr, Driver::device_addr, player_devaddr::host, Driver::InQueue, Message::MatchMessage(), PLAYER_LASER_DATA_SCAN, PLAYER_MSGTYPE_DATA, PLAYER_MSGTYPE_REQ, PLAYER_MSGTYPE_RESP_ACK, PLAYER_MSGTYPE_RESP_NACK, Driver::Publish(), Device::PutMsg(), Driver::ret_queue, player_msghdr::size, and player_msghdr::subtype.
int LaserTransform::Setup | ( | void | ) | [virtual] |
Initialize the driver.
This function is called with the first client subscribes; it MUST be implemented by the driver.
- Returns:
- Returns 0 on success.
Reimplemented from Driver.
References Driver::device_addr, Device::MatchDeviceAddress(), PLAYER_ERROR, and Device::Subscribe().
int LaserTransform::Shutdown | ( | void | ) | [virtual] |
Finalize the driver.
This function is called with the last client unsubscribes.
- Returns:
- Returns 0 on success.
Reimplemented from Driver.
References Driver::InQueue, and Device::Unsubscribe().
The documentation for this class was generated from the following files:
- lasertransform.h
- lasertransform.cc