The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

  UAV::Pilot::WumpusRover::PacketFactory

SYNOPSIS

    # Where $packet_in is a bunch of bytes read from the network:
    my $packet = UAV::Pilot::WumpusRover::PacketFactory->read_packet(
        $packet_in );

    # Create a fresh packet that we might later send over the network:
    my $new_packet = UAV::Pilot::WumpusRover::PacketFactory->fresh_packet(
        'Ack' );

DESCRIPTION

Creates new packets, either for reading a bunch of bytes off the network, or for fresh ones that we'll send back over the network.

METHODS

read_packet

    read_packet( $bytes )

Takes a bunch of bytes and returns a UAV::Pilot::WumpusRover::Packet object based on that data.

fresh_packet

    fresh_packet( $type )

Creates a new packet based on $type and returns it. The $type parameter should be one of the classes under UAV::Pilot::WumpusRover::Packet::, such as Ack or RadioOutputs.