=head2 C<new>
+ my $bme = Bit::MorseSignals::Emitter->new;
+
L<Bit::MorseSignals::Emitter> object constructor. Currently does not take any optional argument.
=cut
return $self;
}
-=head2 C<< post $msg, < type => $type > >>
+=head2 C<post>
+
+ $bme->post($msg, type => $type);
Adds C<$msg> to the message queue and, if no other message is currently processed, dequeue the oldest item and prepare it. The type is automatically chosen, but you may want to try to force it with the C<type> option : C<$type> is then one of the C<BM_DATA_*> constants listed in L<Bit::MorseSignals/CONSTANTS>
=head1 METHODS
-=head2 C<< new < done => $cb > >>
+=head2 C<new>
+
+ my $bmr = Bit::MorseSignals::Receiver->new(done => $cb);
L<Bit::MorseSignals::Receiver> object constructor. With the C<'done'> option, you can specify a callback that will be triggered every time a message is completed, and in which C<$_[0]> will be the receiver object and C<$_[1]> the message received.
return $self;
}
-=head2 C<push $bit>
+=head2 C<push>
+
+ $bmr->push($bit);
Tells the receiver that you have received the bit C<$bit>. Returns true while the message isn't completed, and C<undef> as soon as it is.