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

📄 scan exit execs

📁 opnet无线网络编程
💻
字号:
/* Lock the mutex that serializes accessing the roaming related		*/
/* information of this MAC. 										*/
op_prg_mt_mutex_lock (roam_state_ptr->roam_info_mutex, 0);

/* Interrupt processing routine.									*/
wlan_interrupts_process ();

/* Check whether the self interrupt set for the expiry of the scan	*/
/* period is delivered.												*/
if (SCAN_TIMEOUT)
	{
	switch (roam_state_ptr->scan_type)
		{
		case WlanC_Scan_Type_Distance:
			{
			/* Attempt to find a new access point based on actual	*/
			/* distances.											*/
			wlan_find_new_ap_virtual ();
			break;
			}
		case WlanC_Scan_Type_Beacon:
			{
			/* Check whether the AP of the current channel was		*/
			/* reliable during the last evaluation (scan) period.	*/
			if (roam_state_ptr->ap_reliability == WLANC_AP_RELIABLE)
				{
				/* The STA has found a connection to a reliable AP 	*/
				/* Stop scanning to stay with this new AP.			*/
				roam_state_ptr->scan_mode = OPC_FALSE;
				}
			break;
			}
		default:
			{
			break;
			}
		}

	/* A new AP has been found, associate with the new AP.			*/
	if (roam_state_ptr->scan_mode == OPC_FALSE)
		{
		/* Update the state variables to reflect new AP connection. */
		wlan_ap_switch ();

		/* Reset state variables like nav_duration, rcv_idle_time	*/
		/* etc. 													*/
		wlan_reset_sv ();

		/* Write a debug message if enabled.						*/
		if (wlan_trace_active == OPC_TRUE)
			{
			sprintf (msg1, "STA connected to AP with BSS ID %d", bss_id);
			op_prg_odb_print_major (msg1, OPC_NIL, OPC_NIL);
			}
		}
	
	/* If a connection could not be established in the current		*/
	/* channel continue scanning by switching to a new channel.		*/
	else
		{
		wlan_begin_new_scan ();
		}
	}

// Updates energy on final transition out of BACKOFF State
#ifndef OPD_NO_DEBUG
	if (AP_CONNECTED)
	{
		if ((op_sim_time() > wsn_test_time) && (my_address == wsn_test_address || my_address == wsn_test_address_2) )
			printf("Node <%d> is exiting SCAN and NOT calculating E before leaving\n", my_address);
	}
#endif

⌨️ 快捷键说明

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