wait_for enter execs

来自「opnet无线网络编程」· 代码 · 共 33 行

TXT
33
字号
/** The purpose of this state is to wait for the response after	**/
/** transmission. The only frames which require					**/
/** acknowledgements are RTS and DATA frame. 					**/
/** In this state following intrpts can occur:				   	**/
/** 1. Data arrival from application layer   					**/
/** 2. Frame (DATA,ACK,RTS,CTS) rcvd from PHY layer				**/
/** 3. Frame timeout if expected frame is not rcvd 				**/
/** 4. Busy intrpt stating that frame is being rcvd           	**/
/** 5. Collision intrpt stating that more than one frame is rcvd**/		
/** Queue the packet as Data Arrives from application layer		**/
/** If Rcvd unexpected frame then collision is inferred and		**/
/** retry count is incremented							    	**/
/** if a collision stat interrupt from the rcvr then flag the   **/
/** received frame as bad 										**/

// assigns the unique state number and writes the sleep staus to the sleep statistic handeler for graphing purposes
state = WSN_WAIT_FOR_RESPONSE;

#ifndef OPD_NO_DEBUG
	if ((op_sim_time() > wsn_test_time) && (my_address == wsn_test_address || my_address == wsn_test_address_2) )
	printf("Node <%d> in Wait for response at time %e \n", my_address, op_sim_time());
#endif

if (wlan_trace_active)
	{
	/* Determine the current state name.						*/
	strcpy (current_state_name, "wait_for_response");
	}

/* Unlock the mutex that serializes accessing the roaming		*/
/* related information of this MAC. 							*/
op_prg_mt_mutex_unlock (roam_state_ptr->roam_info_mutex);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?