⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defer enter execs

📁 opnet无线网络编程
💻
字号:

/* This state defer until the medium is available for transmission		*/
/* interrupts that can occur in this state are:   						*/
/* 1. Data arrival from application layer         						*/
/* 2. Frame (DATA,ACK,RTS,CTS) rcvd from PHY layer						*/
/* 3. Busy intrpt stating that frame is being rcvd						*/
/* 4. Collision intrpt stating that more than one frame is rcvd    		*/
/* 5. Deference timer has expired (self intrpt)                    		*/
/*																		*/
/* For Data arrival from application layer queue the packet. Set		*/
/* Backoff flag if the station needs to backoff after deference because	*/
/* the medium is busy. If the frame is destined for this station then	*/
/* set frame to respond and set a deference timer to SIFS. Set			*/
/* deference timer to SIFS and don't change states. If receiver starts	*/
/* receiving more than one frame then flag the received frame as		*/
/* invalid frame and set a deference to EIFS.							*/

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

#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 Defer at time %e \n", my_address, op_sim_time());
#endif


// for diagnostic purposes, programmers can indicate the address of up to 2 stations that they want to follow
// and can indicate what time the printf statement should be outputtted
// NOTICE: Opnet's ODB has to be used to see the printed statements
//if ((op_sim_time() > wsn_test_time) && (my_address == wsn_test_address || my_address == wsn_test_address_2) )
//	printf("Node <%d> in Defer at time %e \n", my_address, op_sim_time());

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

/* If in CFP, schedule a deference interrupt if not already scheduled.	*/ 
// mib - this should never happen
if ((cfp_ap_medium_control == OPC_TRUE || wlan_flags->pcf_active == OPC_TRUE) &&
	op_ev_valid (deference_evh) != OPC_TRUE)

	wlan_schedule_deference ();

/* 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -