public class XTCEItemValue extends Object
| Constructor and Description |
|---|
XTCEItemValue(XTCETypedObject item)
Constructor
|
XTCEItemValue(XTCETypedObject item,
org.omg.space.xtce.CalibratorType calibrator)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
bitSetToBinary(BitSet bits)
Convert the BitSet object from the encode() method over to a binary
string of zeros and ones, ordered from most significant bit to least
significant bit.
|
String |
bitSetToHex(BitSet bits)
Convert the BitSet object from the encode() method over to a hex byte
string, ordered from the most significant byte to the least significant
byte.
|
BigInteger |
bitSetToNumber(BitSet bits)
Convert the BitSet object from the encode() method over to a integral
number, ordered from the most significant byte to the least significant
byte.
|
void |
clearWarnings()
Clears the list of warning messages for this object, which can be
useful if multiple raw or engineering values need to be generated, so
that the list does not include previous issues.
|
String |
decode(BitSet rawValue)
Retrieve the Calibrated/Engineering value of this typed object when
given the raw binary value.
|
BitSet |
encode(double euValue)
Retrieve the Raw value of this typed object when given the EU
calibrated value.
|
BitSet |
encode(float euValue)
Retrieve the Raw value of this typed object when given the EU
calibrated value.
|
BitSet |
encode(long euValue)
Retrieve the Raw value of this typed object when given the EU
calibrated value.
|
BitSet |
encode(String euValue)
Retrieve the Raw value of this typed object when given the EU
calibrated value.
|
BitSet |
encodeRawBits(BigInteger rawValue)
Function to create the raw binary bits for populating a container
binary based on the encoded value of this named and typed item from the
XTCE data model.
|
String |
getCalibratedFromUncalibrated(String uncalValue)
Retrieve the EU calibrated value of this typed object item when given
the uncalibrated value.
|
String |
getItemName()
Retrieves the item name of the Parameter or Argument that is the basis
for this item value encode()/decode() object.
|
BitSet |
getRawFromUncalibrated(BigDecimal uncalValue)
Retrieve the raw binary bits for encoding of this typed object when
given the uncalibrated value.
|
BitSet |
getRawFromUncalibrated(BigInteger uncalValue)
Retrieve the raw binary bits for encoding of this typed object when
given the uncalibrated value.
|
BitSet |
getRawFromUncalibrated(double uncalValue)
Retrieve the raw binary bits for encoding of this typed object when
given the uncalibrated value.
|
BitSet |
getRawFromUncalibrated(float uncalValue)
Retrieve the raw binary bits for encoding of this typed object when
given the uncalibrated value.
|
BitSet |
getRawFromUncalibrated(long uncalValue)
Retrieve the raw binary bits for encoding of this typed object when
given the uncalibrated value.
|
BitSet |
getRawFromUncalibrated(String uncalValue)
Retrieve the raw binary bits for encoding of this typed object when
given the uncalibrated value.
|
String |
getUncalibratedFromCalibrated(BigDecimal euValue)
Retrieve the uncalibrated value of an EU calibrated value for this
typed object.
|
String |
getUncalibratedFromCalibrated(BigInteger euValue)
Retrieve the uncalibrated value of an EU calibrated value for this
typed object.
|
String |
getUncalibratedFromCalibrated(double euValue)
Retrieve the uncalibrated value of an EU calibrated value for this
typed object.
|
String |
getUncalibratedFromCalibrated(float euValue)
Retrieve the uncalibrated value of an EU calibrated value for this
typed object.
|
String |
getUncalibratedFromCalibrated(long euValue)
Retrieve the uncalibrated value of an EU calibrated value for this
typed object.
|
String |
getUncalibratedFromCalibrated(String euValue)
Retrieve the uncalibrated value of an EU calibrated value for this
typed object.
|
String |
getUncalibratedFromRaw(BitSet rawValue)
Retrieve the uncalibrated value of this typed object item when given
the raw binary value.
|
List<String> |
getWarnings()
Retrieve the list of warnings that have accumulated since this object
was created or since the caller last cleared the warnings list.
|
BigInteger |
integerStringToBigInteger(String rawValue)
Convert a string representation of a Raw Value to a BigInteger.
|
boolean |
isFloatRawValueReasonable(double rawValue)
Check for reasonableness of the raw value to encode to a float type
encoding.
|
boolean |
isIntegerRawValueReasonable(BigInteger rawValue)
Check for reasonableness of the raw value to encode to an integer type
encoding.
|
boolean |
isValid()
Retrieves the validity flag from this item value encode/decode.
|
public XTCEItemValue(XTCETypedObject item)
item - XTCETypedObject containing the Parameter or Argument
that is being encoded/decoded.public XTCEItemValue(XTCETypedObject item, org.omg.space.xtce.CalibratorType calibrator)
item - XTCETypedObject containing the Parameter or Argument
that is being encoded/decoded.calibrator - CalibratorType containing the contextually accurate
calibrator for this item value evaluation.public final String getItemName()
public final boolean isValid()
public final List<String> getWarnings()
clearWarnings()public final void clearWarnings()
public String decode(BitSet rawValue)
rawValue - BitSet containing the raw binary value that would
be encoded on the wire or bitfield. The raw binary is always expected
to be in the order read from the stream.public String getUncalibratedFromRaw(BitSet rawValue)
rawValue - BitSet containing the raw binary value that would
be encoded on the wire or bitfield. The raw binary is always expected
to be in the order read from the stream.public String getCalibratedFromUncalibrated(String uncalValue)
uncalValue - String containing the uncalibrated value that is
derived from the encoded value on the wire or bitfield.public BitSet encode(String euValue)
euValue - String containing the EU calibrated value that would
be encoded on the wire or bitfield.public BitSet encode(long euValue)
euValue - long containing the EU calibrated value that would
be encoded on the wire or bitfield.public BitSet encode(double euValue)
euValue - double containing the EU calibrated value that would
be encoded on the wire or bitfield.public BitSet encode(float euValue)
euValue - float containing the EU calibrated value that would
be encoded on the wire or bitfield.public BitSet getRawFromUncalibrated(String uncalValue)
uncalValue - String containing the uncalibrated representation of
the value.public BitSet getRawFromUncalibrated(BigInteger uncalValue)
uncalValue - BigInteger containing the uncalibrated representation
of the value.public BitSet getRawFromUncalibrated(long uncalValue)
uncalValue - long containing the uncalibrated representation of
the value.public BitSet getRawFromUncalibrated(BigDecimal uncalValue)
uncalValue - BigDecimal containing the uncalibrated representation
of the value.public BitSet getRawFromUncalibrated(double uncalValue)
uncalValue - double containing the uncalibrated representation of
the value.public BitSet getRawFromUncalibrated(float uncalValue)
uncalValue - float containing the uncalibrated representation of
the value.public String getUncalibratedFromCalibrated(String euValue)
euValue - String containing a value of this item represented in
EU/calibrated form.public String getUncalibratedFromCalibrated(BigInteger euValue)
euValue - BigInteger containing a value of this item represented in
EU/calibrated form.public String getUncalibratedFromCalibrated(long euValue)
euValue - long containing a value of this item represented in
EU/calibrated form.public String getUncalibratedFromCalibrated(BigDecimal euValue)
euValue - BigDecimal containing a value of this item represented in
EU/calibrated form.public String getUncalibratedFromCalibrated(double euValue)
euValue - double containing a value of this item represented in
EU/calibrated form.public String getUncalibratedFromCalibrated(float euValue)
euValue - float containing a value of this item represented in
EU/calibrated form.public BitSet encodeRawBits(BigInteger rawValue)
rawValue - BigInteger containing the value to encode into a raw
BitSet for inclusion into a container object, either Telemetry or
Telecommand.public final String bitSetToHex(BitSet bits)
bits - BitSet returned from the encode() function.public final BigInteger bitSetToNumber(BitSet bits)
bits - BitSet returned from the encode() function.public final String bitSetToBinary(BitSet bits)
bits - BitSet containing the bits returned from the encode()
function.public BigInteger integerStringToBigInteger(String rawValue)
rawValue - String containing the candidate raw representation.public boolean isIntegerRawValueReasonable(BigInteger rawValue)
rawValue - BigInteger containing the raw value that will be encoded
if it turns out to be reasonable.public boolean isFloatRawValueReasonable(double rawValue)
rawValue - double containing the raw value that will be encoded
if it turns out to be reasonable.Copyright © 2015–2019. All rights reserved.