Public Member Functions | |
FromRanger (ConfigFile *cf, int section) | |
virtual int | ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data) |
Message handler. | |
virtual int | Setup (void) |
Initialize the driver. | |
virtual int | Shutdown (void) |
Finalize the driver. | |
Protected Attributes | |
Device * | inputDevice |
player_devaddr_t | inputDeviceAddr |
int FromRanger::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 Driver::device_addr, PLAYER_MSGTYPE_REQ, Message::MatchMessage(), Device::PutMsg(), Driver::InQueue, Driver::ret_queue, PLAYER_MSGTYPE_RESP_ACK, PLAYER_MSGTYPE_RESP_NACK, player_msghdr::addr, and Driver::Publish().
int FromRanger::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.
int FromRanger::Shutdown | ( | void | ) | [virtual] |
Finalize the driver.
This function is called with the last client unsubscribes.
Reimplemented from Driver.