public interface XTCEAbsoluteTimeType
An example of a class that implements this interface can be found in the toolkit as XTCEPosixTimeHandler. Another example is the class XTCECcsdsCucTimeHandler. These two types are automatically included, although user registed time handlers are always examined first, so they can be overridden.
This interface requires at least 5 implementation methods. These are described in the 5 public methods that follow.
At least one constructor will be required in the implementing classes because they get registered on the XTCEFunctions class for use throughout the toolkit as needed.
| Modifier and Type | Method and Description |
|---|---|
String |
getCalibratedFromUncalibrated(String uncalValue)
Retrieve the EU calibrated value of this time item, which can be a
Parameter or Argument, when given the uncalibrated value.
|
BitSet |
getRawFromUncalibrated(String uncalValue)
Retrieve the raw binary bits for encoding of this time item, which can
be a Parameter or Argument, when given the uncalibrated value.
|
String |
getUncalibratedFromCalibrated(String euValue)
Retrieve the uncalibrated value for this time item, which can be a
Parameter or Argument, when given the EU calibrated value.
|
String |
getUncalibratedFromRaw(BitSet rawValue)
Retrieve the uncalibrated value of this time item, which can be a
Parameter or Argument, when given the raw binary value.
|
boolean |
isApplicable(org.omg.space.xtce.AbsoluteTimeDataType instance)
Method to determine if an XTCE AbsoluteTimeType, either Parameter or
Argument, is handled by this implementation of the interface.
|
boolean isApplicable(org.omg.space.xtce.AbsoluteTimeDataType instance)
The implementer should endeavor to have this function not throw an exception. If one is thrown, an error message will be logged by the encode/decode functions of the XTCEItemValue object where handlers that implement this class are used. A throw will short-circuit tests for other applicable handlers.
instance - AbsoluteTimeDataType object from the JAXB representation
of the XTCE XML document.String getUncalibratedFromRaw(BitSet rawValue)
The raw value is provided as a Java BitSet to account for an arbitrary size of the raw value binary. The output of this function takes into account the encoding type to interpret the raw binary in the proper type and alignment.
A common implementation for this function would be to return the microseconds since the UNIX epoch, although that is not specifically required.
This method should endeavor to not throw an exception, which is not hard because the input BitSet is a well constrained value.
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.String getCalibratedFromUncalibrated(String uncalValue)
A common implementation for this function would be to return the UTC or GPS ISO8601 string, although that is not specifically required.
This function may throw unchecked exceptions that inherit from java.lang.Exception. Exceptions will be caught by the XTCEItemValue class that uses this implementation. In the event that occurs, then the calling code will be provided with an error message regarding an invalid value for the specific parameter that was attempted.
uncalValue - String containing the uncalibrated value that is
derived from the encoded value on the wire or bitfield.BitSet getRawFromUncalibrated(String uncalValue)
TIP: An implementer may be interested to use the BitSet conversion function in the static helper XTCEFunctions class.
This function may throw unchecked exceptions that inherit from java.lang.Exception. Exceptions will be caught by the XTCEItemValue class that uses this implementation. In the event that occurs, then the calling code will be provided with an error message regarding an invalid value for the specific parameter that was attempted.
uncalValue - String containing the uncalibrated representation of
the value.String getUncalibratedFromCalibrated(String euValue)
This function may throw unchecked exceptions that inherit from java.lang.Exception. Exceptions will be caught by the XTCEItemValue class that uses this implementation. In the event that occurs, then the calling code will be provided with an error message regarding an invalid value for the specific parameter that was attempted.
euValue - String containing a value of this item represented in
EU/calibrated form.Copyright © 2015–2019. All rights reserved.