Technical data
DOC-01-TELAS-CRG-4 ASTi ACE Studio Components Reference Guide Rev.M
90 Copyright © 2014 Advanced Simulation Technology inc.
5.9. IntCompare
Summary: The IntCompare Component checks eight input values and compares
them against a range of integers. Each integer is compared against a different range.
The result of all eight comparisons is output as both a single byte bit mask and a
boolean value.
Description: The IntCompare is a quick tool for comparing multiple values at the
same time. For example, a single frequency can be compared against multiple
frequency bands to determine if a radio’s mode should be changed. The component
is intended to replace the use of many IntTables or In-Range math functions.
Each input integer (InputA through H) is compared against its own range (RangeA
through H). The Result is TRUE when all controlled inputs are within range. The
Output also provides a bit mask so that the result of all 8 comparisons can be used
within the model.
The ranges are all-inclusive.
Control Inputs
InputA - H
Type Default Value
uint32 0
Description: This input integer is compared against its matching
Range. For example, InputA is compared against RangeA, and
InputB is compared against RangeB. The Range for each integer is
inclusive. If the Input value is within range, it will set the corre-
sponding bit in Output to 1. For example, if InputA is in range, the
least significant bit of Output will be 1; if InputA is out of range it
will be 0. InputB’s comparison will be the second bit, and InputH
will be the most significant bit.
Modifier: Add
Modifier_Default: 0
Control-
Byte
Type Default Value
uint8 255
Description: The ControlByte is a bit mask that determines which
Input Integers are used for Result and Output. When equal to 255,
all eight Inputs must be in range for Result to be TRUE. If equal to
1, only InputA and RangeA are used.
Modifier: AND
Modifier_Default: 255
Control Outputs
Output
Type Default Value
byte 255
Description: A bit mask that contains the result of all eight compar-
isons. Each bit of Output corresponds to one of the eight inputs. If
the bit is 1, then the Input is within range. If the bit is zero, then the
Input is out of range. For example, if InputA is within RangeA but
the other seven Inputs are out of range, Output will be equal to 1.
Result
Type Default Value
boolean TRUE
Description: The master result of all comparisons. All controlled
integers must be in range for Result to be TRUE. If the ControlByte
is less than 255, only the integers selected need to be in range for
Result to be TRUE.
Control Inputs










