NAME
Data::TDMA::Day
ABSTRACT
Data::TDMA::Day provides the basis for the TDMA communications protocol. Each day in a TDMA link is composed of 112.5 epochs.
USAGE
my $tdma_day = Data::TDMA::Day->new(); # no arguments
Your new day will actually have 113 epochs in it, as opposed to giving you 112.5, which is more "correct," but far less practical. At the intersection of one day and the next, you're going to have to figure out how to make that switch.
It is advised that you create a Day, and begin filling it with data that can then be pushed on the wire. If you know what time it is, your day object can tell you which epoch you're in, that epoch can tell you which frame it's supposed to be sending, and that frame is going to know which slot you should be reading (or stuffing on the wire). But normally, we'd just send entire frames.
When your epochs have data that ought to be sent out, you can pack them however you like by defining a serialize function in TDMA::Constants.
This might look something like this:
my $i = 0; # just an iterator
my $epoch = $tdma_day->get_epoch( $epoch_number);
foreach my $frame ($epoch->get_frames()) {
# Note that some TDMA implementations, like Link 16, have a limited
# amount of bandwidth available.
$_->set_payload("$i++") for @{ $frame->get_slots() }
}
$sock->send( $epoch->serialize() );
AUTHOR
Jane A. Avriette
jane@cpan.org
4 POD Errors
The following errors were encountered while parsing the POD:
- Around line 18:
=cut found outside a pod block. Skipping to next block.
- Around line 22:
=cut found outside a pod block. Skipping to next block.
- Around line 45:
=cut found outside a pod block. Skipping to next block.
- Around line 49:
=cut found outside a pod block. Skipping to next block.