niWLANG_ChannelNumberToCarrierFrequency80211abgjpn

NI WLAN Generation Toolkit 18.0 Help

Edition Date: October 2018

Part Number: 373725J-01

»View Product Info
Download Help (Windows Only)

int32 __stdcall niWLANG_ChannelNumberToCarrierFrequency80211abgjpn (float64 channelStartingFrequency, float64 channelBandwidth, int32 channelNumber, int32 secondaryFactor, float64 *carrierFrequency);

Purpose

Calculates the carrier frequency of 802.11a/b/g/j/p/n channels according to sections 16.4.6, 17.4.6, 18.3.8.4, and 20.3.15 of IEEE Standard 802.11-2012.

Parameters

Input
Name Type Description
channelStartingFrequency float64 Specifies the starting frequency of the frequency band. This value is expressed in Hz.
channelBandwidth float64 Specifies the channel bandwidth You can choose a 5 MHz, 10 MHz, 20 MHz, or 40 MHz channel. This value is expressed in Hz.
channelNumber int32 Specifies the offset of the center frequency, in increments of 5 MHz, above the starting frequency of the channel.
secondaryFactor int32 Specifies whether the secondary channel is above or below the primary channel when you set the channelBandwidth parameter to 40 MHz.

The toolkit creates a 40 MHz channel by combining the primary channel and the secondary channel, each with a 20 MHz bandwidth.

The value of -1 indicates that the secondary channel is below the primary channel whereas the value of +1 indicates that the secondary channel is above the primary channel. Valid values are -1 and +1.

Output
Name Type Description
carrierFrequency float64* Returns the carrier frequency. This value is expressed in Hz.

The function calculates the carrier frequency using the following equation:

Carrier frequency (Hz) = channel starting frequency (Hz) + (channel number * 5 MHz)

When you set the channelBandwidth parameter to 40 MHz, the channelNumber parameter is the primary channel number. The function calculates the carrier frequency using the following equation:

carrier frequency (Hz) = channel starting frequency (Hz) + (channel number * 5 MHz)+ (Secondary factor * 20 MHz)

Return Value

Name Type Description
status int32 Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. Examine the status code from each call to the function to determine if an error occurred.

To obtain a text description of the status code, call the niWLANG_GetErrorString function.

The general meaning of the status code is as follows:

Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

WAS THIS ARTICLE HELPFUL?

Not Helpful