?? radio_link_agent.h
字號(hào):
/*
==========================================================================================
ITU-T Telecommunications Standardization Sector Document: VCEG-M77
Study Group 16 Question 6 Filename: radio_link_agent.h
Video Coding Experts Group (VCEG) Generated: 02 July, 2001
----------------------------------------
Thirteenth meeting: Austin, Texas, 2-4 April, 2001
Intention:
~~~~~~~~~~~~
Simple offline software simulator for RTP/IP over 3GPP/3GPP2 bearers
Source:
~~~~~~~
Thomas Stockhammer, Guenther Liebl Tel: +49 89 28923473
Institute for Communications Engineering Fax: +49 89 28923490
Munich University of Technology Email: {stockhammer,liebl}@ei.tum.de
80290 Munich, Germany
==========================================================================================
*/
#ifndef RADIO_LINK_AGENT_H
#define RADIO_LINK_AGENT_H
#include "global.h"
#include "packet_data_agent.h"
// size of the radio link segemnt buffers
#define FRAME_BUFFER_SIZE 200
// retransmit delay in multiples of the transmission time interval
#define RETRANSMISSION_DELAY_FACTOR 1
// simulator-internal storage type for radio link agent SDUs
typedef struct virtual_sdu
{
VIRTUAL_PDU upper_layer_PDU;
int32 unsent_bytes;
int32 received_bytes_counter;
int32 correct_bytes_counter;
} VIRTUAL_SDU;
// new variable definition to indicate radio link frame type
typedef enum FrameType {DATA, RETRANSMIT, DUMMY} FrameType;
// storage type for information about the contained SDUs in a radio link frame
typedef struct contained_SDU_info
{
int32 identifier; // identifier of the contained SDU with respect to the SDU buffer
int32 size; // # of bytes from this SDU that are contained in the radio link frame
} CONTAINED_SDU_INFO;
// storage type for radio link frames
typedef struct radio_link_frame
{
int32 sequence_number;
int32 size;
FrameType frame_type;
int32 number_of_contained_SDUs;
CONTAINED_SDU_INFO contained_SDU[PACKET_BUFFER_SIZE];
int32 number_of_retransmissions;
} RADIO_LINK_FRAME;
// storage type for radio link retransmission queue
typedef struct retransmit_element
{
RADIO_LINK_FRAME *retransmission_frame;
int32 retransmission_time;
} RETRANSMIT_ELEMENT;
class RADIO_LINK_AGENT
{
public:
RADIO_LINK_AGENT();
~RADIO_LINK_AGENT();
void initialize(FILE *ParameterFile_ptr, FILE *CommonLogFile_ptr, PACKET_DATA_AGENT *upper_layer_agent);
Boolean send_frame(RADIO_LINK_FRAME **outgoing_frame);
void receive_frame(RADIO_LINK_FRAME *incoming_frame, Boolean frame_error_indicator);
void write_statistics(FILE *StatisticsFile_ptr);
private:
void UM_receive_frame(RADIO_LINK_FRAME *incoming_frame, Boolean frame_error_indicator);
void AM_receive_frame(RADIO_LINK_FRAME *incoming_frame, Boolean frame_error_indicator);
char *ModuleName;
FILE *LogFile_ptr;
PACKET_DATA_AGENT *Upper_Layer_Agent;
VIRTUAL_SDU SDU_Buffer[PACKET_BUFFER_SIZE];
int32 SDU_buffer_read_position;
int32 SDU_buffer_write_position;
int32 SDU_buffer_total_length; // total # of SDUs in the buffer for which the transmission process is not finished yet
int32 SDU_buffer_unsent_length; // # of SDUs in the buffer that still contain unsent parts
int32 radio_bearer_bitrate; // in kbit/s
int32 frame_size; // in bits
int32 agent_header_size; // in bytes
Boolean ACK_mode; // TRUE, if acknowledged mode is enabled
Boolean fully_persistent_ARQ; // TRUE, if acknowledged mode is fully-persistent
int32 max_number_of_retransmissions; // limit for non fully-persistent ARQ
RETRANSMIT_ELEMENT Retransmit_Buffer[FRAME_BUFFER_SIZE];
int32 Retransmit_buffer_read_position;
int32 Retransmit_buffer_write_position;
int32 Retransmit_buffer_length;
int32 total_frames_counter; // contains the total number of frames (data, retransmitted and dummy)
int32 total_retransmitted_frames_counter; // contains the total number of retransmitted frames
int32 total_dummy_frames_counter; // contains the total number of dummy frames
int32 total_correct_payload_bits_counter; // contains the total number of correctly received data bits
double total_bitrate; // total bitrate available (including radio link agent header)
double total_net_bitrate; // total net bitrate available (excluding radio link agent header)
double effective_net_bitrate; // effective net bitrate available (including only correctly received data bits)
int32 transmission_time_interval; // in ms, is computed from radio_bearer_bitrate and frame_size
int32 simulation_time; // in ms, starting from 0
int32 send_sequence_number; // contains the sequence number for the next regular frame to be transmitted
int32 receive_sequence_number; // contains the sequence number for the next regular (not retransmitted) frame to be expected
};
#endif // RADIO_LINK_AGENT_H
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -