HardwareGain
HardwareGain

Contains functions specific to hardware gain for Wireless Nodes.

Functions
bitsToGain
static double bitsToGain(
uint16 bits,
WirelessModels::NodeModel nodeType
)

Converts the bits value to Hardware Gain value, based on the nodeType.

Parameters
bits
uint16

The bits value to convert.

nodeType

The type of node to use for the conversion.

Returns

The converted gain value.

Exceptions
gainToBits
static uint16 gainToBits(
double gain,
WirelessModels::NodeModel nodeType
)

Converts the gain value to a bits value, based on the nodeType.

Parameters
gain
double

The hardware gain value to convert.

nodeType

The type of node to use for the conversion.

Returns

The converted bits value.

Exceptions
minGain
static double minGain(
WirelessModels::NodeModel nodeType
)

Gets the min gain value available for the Node/Channel.

Parameters
nodeType

The type of node to use for the conversion.

Returns

The min gain value available.

Exceptions
maxGain
static double maxGain(
WirelessModels::NodeModel nodeType
)

Gets the max gain value available for the Node/Channel.

Parameters
nodeType

The type of node to use for the conversion.

Returns

The max gain value available.

Exceptions
normalizeGain
static double normalizeGain(
double gain,
WirelessModels::NodeModel nodeType
)

Normalizes the gain value by putting it within range, and converting to bits and then back to gain.

Parameters
gain
double

The gain value to normalize.

nodeType

The type of node to use for the conversion.

Returns

The normalized gain value.

Exceptions