Timm Murray > UAV-Pilot-0.8 > UAV::Pilot::WumpusRover::Server::Backend

Download:
UAV-Pilot-0.8.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  2
View/Report Bugs
Source  

NAME ^

    UAV::Pilot::WumpusRover::Server::Backend

DESCRIPTION ^

Role for WumpusRover Backends. A Backend connects directly to the hardware that drives the rover. For instance, the RaspberryPiI2C backend communicates over the Raspberry Pi's I2C interface using a protocol shared by the wumpus_rover Arduino implementation.

Does the UAV::Pilot::Logger role.

ATTRIBUTES ^

started

Specifies if this backend has been started yet. Starting it is done by passing a RequestStartupMessage packet to process_packet().

METHODS ^

process_packet

    process_packet( $packet )

Takes the packet and does something with it. Usually, this something is a sensible thing to do.

REQUIRED METHODS/ATTRIBUTES ^

_packet_request_startup

    _packet_request_startup( $packet, $server )

Passed a packet and the server associated with the connection. Handles the initial startup.

_packet_radio_trims

    _packet_request_trims( $packet, $server )

Passed a packet and the server associated with the connection. Handles the radio trims.

_packet_radio_out

    _packet_request_out( $packet, $server )

Passed a packet and the server associated with the connection. Handles the radio outputs, which is the primary way of moving.

_ch*_min_out() and _ch*_max_out()

Returns the min/max settings for each channel that will be output by this backend. Channels are numbered 1 through 8.

Why do we map the values at this level? For the Arduino output, wouldn't it be better for it to take specified values and convert it to its own output internally? Perhaps. The reason why it was chosen to do the value mapping here is to make the Arduino end as simple-stupid as possible.

syntax highlighting: