Example #1
0
BOOLEAN DoDot11BTx(void* ctx)
{
    // Alias
    Monitor& monitor = ((TxContext *)ctx)->monitor;
    const Config& config = ((TxContext *)ctx)->config;

    monitor.Query(true);

	HRESULT hr = SoraURadioTx(TARGET_RADIO, TxID);
	if (FAILED(hr))
	{
		printf("[dot11b:tx] tx failed\n");
		//break;
	}
    else
    {
        monitor.IncGoodCounter();
        monitor.IncThroughput(config.GetPayloadLength());
    }

    // Note: if we send too fast, the RX part cannot demodulate all the frames,
    // and the performance depends on the entry time, ie. not same in every experiment. 
    SoraStallWait(&tsinfo, 10000); // not to send too fast
    return TRUE;
}
Example #2
0
BOOLEAN DoDot11ATx(void* ctx)
{
    // Alias
    Monitor& monitor = ((TxContext *)ctx)->monitor;
    const Config& config = ((TxContext *)ctx)->config;

    monitor.Query(true);

	HRESULT hr = SoraURadioTx(TARGET_RADIO, TxID);
	if (FAILED(hr))
	{
		printf("[dot11b:tx] tx failed\n");
		//break;
	}
    else
    {
        monitor.IncGoodCounter();
        monitor.IncThroughput(config.GetPayloadLength());
    }
    SoraStallWait(&tsinfo, 10000); // not to send too fast
    return TRUE;
}