29 #ifndef SELECTIVE_REPEAT_H 30 #define SELECTIVE_REPEAT_H 34 #if (defined(_MSC_VER) && defined(ITPP_SHARED_LIB) && !(defined(itpp_EXPORTS) || defined(itpp_debug_EXPORTS))) 36 #ifndef ITPP_PROTOCOL_EXCLUDED 37 #define ITPP_PROTOCOL_EXCLUDED 38 #pragma message( "PROTOCOL definitions are not available for MSVC shared builds" ) 71 const int Buffer_size_factor,
72 const int Link_packet_size,
73 const Ttype Time_out);
101 void handle_packet_input(
Packet *P);
102 void handle_packet_output_request(
int K);
103 void handle_query_nof_ready_packets(
void*);
104 void retransmit(
int Sequence_number);
105 void remove(
const int Sequence_number);
106 void push_packet_on_tx_buffer(
Packet *packet);
107 int buffered_non_outstanding();
108 int free_sequence_numbers();
109 int sequence_number_2_buffer_index(
const int Sequence_number);
110 void schedule_output(
const int Buffer_index,
const int Sequence_number,
const bool Retransmission);
111 void cancel_output(
const int Sequence_number);
113 int feasable_blocks();
117 int input_buffer_size;
119 int input_free_space;
130 ivec retransmission_indexes;
134 int scheduled_retransmissions;
136 int link_packet_size;
166 bool greater_modulo_L(
const int a,
const int b);
182 #endif // #ifndef SELECTIVE_REPEAT_H double Ttype
64-bit floating point time
void set_parameters(const int Seq_no_size, const int Buffer_size_factor, const int Link_packet_size, const Ttype Time_out)
ADD DOCUMENTATION HERE.
Definitions of a Front Drop Queue class.
Slot< Selective_Repeat_ARQ_Sender, int > packet_output_request
Receives incoming packet output requests.
int link_packets_queued_waiting_for_transmission()
ADD DOCUMENTATION HERE.
Definition of Array class (container)
int link_packets_buffered()
ADD DOCUMENTATION HERE.
Ttype link_packets_max_queuing_time()
ADD DOCUMENTATION HERE.
Selective_Repeat_ARQ_Sender()
ADD DOCUMENTATION HERE.
Signal< Array< Packet * > > packet_output
Delivers transmitted packets.
Slot< Selective_Repeat_ARQ_Sender, void * > query_nof_ready_packets
Receives incoming query for number of packets ready to transmit.
Slot< Selective_Repeat_ARQ_Sender, Array< Packet * > > ack_input
Receives incoming ack/nacks.
Signal< Packet * > packet_output
Delivers received packets.
Signal< Array< Packet * > > ack_output
Delivers ack.
Slot< Selective_Repeat_ARQ_Receiver, Array< Packet * > > packet_input
Receives incoming packets.
~Selective_Repeat_ARQ_Sender()
ADD DOCUMENTATION HERE.
void get_link_packets(const int K, Array< Packet *> &pa)
ADD DOCUMENTATION HERE.
Signal< int > nof_ready_packets
Delivers no ready packets.
Definition of a Packet class.
Signal< int > buffer_overflow
Signals buffer overflows.
int buffer_size()
ADD DOCUMENTATION HERE.
int nof_ready_link_packets()
ADD DOCUMENTATION HERE.
Slot< Selective_Repeat_ARQ_Sender, Packet * > packet_input
Receives incoming packets.
Templated Vector Class Definitions.