UM Java API
6.16.1
|
Public Member Functions | |
LBMSDMRawDecimal () | |
LBMSDMRawDecimal (long mant_upper, int e) | |
LBMSDMRawDecimal (String s) throws LBMSDMException | |
String | toString () |
int | format (byte[] buf, int offset) throws LBMSDMException |
int | parse (byte[] buf, int offset) throws LBMSDMException |
LBMSDMRawDecimal | clone () throws CloneNotSupportedException |
long | mantissa () |
int | exponent () |
String | toDbgString () |
void | set_debug_level (int level) |
void | log (String s) |
Static Public Attributes | |
static int | length = LBMSDMRawInt64.length + 1 |
static final int | DEBUG_BASIC = 1 |
static final int | DEBUG_VERBOSE_PARSING = 2 |
Protected Attributes | |
int | debug_level = 0 |
An LBMSDMRawDecimal is a helper class to minimise the effort of formatting and parsing Decimals
com.latencybusters.lbm.sdm.LBMSDMRawDecimal.LBMSDMRawDecimal | ( | ) |
Create a raw decimal object defaulting to 0e0
com.latencybusters.lbm.sdm.LBMSDMRawDecimal.LBMSDMRawDecimal | ( | long | mant_upper, |
int | e | ||
) |
Create a raw decimal providing the mantissa and exponent
mant_upper | The mantissa |
e | The exponent |
com.latencybusters.lbm.sdm.LBMSDMRawDecimal.LBMSDMRawDecimal | ( | String | s | ) | throws LBMSDMException |
Create a raw decimal from a string
s | The string formatted "MMMeEE" or "mmmEee" |
LBMSDMRawDecimal com.latencybusters.lbm.sdm.LBMSDMRawDecimal.clone | ( | ) | throws CloneNotSupportedException |
Get a copy of a raw decimal
References com.latencybusters.lbm.sdm.LBMSDMRawDecimal.clone().
Referenced by com.latencybusters.lbm.sdm.LBMSDMRawDecimal.clone(), com.latencybusters.lbm.sdm.LBMSDMFieldDecimal.clone(), com.latencybusters.lbm.sdm.LBMSDMFieldDecimal.LBMSDMFieldDecimal(), com.latencybusters.lbm.sdm.LBMSDMFieldDecimal.set(), and com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.set().
int com.latencybusters.lbm.sdm.LBMSDMRawDecimal.exponent | ( | ) |
Get the exponent of the decimal number
Referenced by com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.parse().
int com.latencybusters.lbm.sdm.LBMSDMRawDecimal.format | ( | byte [] | buf, |
int | offset | ||
) | throws LBMSDMException |
Format into a byte buffer this field.
buf | The buffer to format the message in to |
offset | The offset in to the byte buffer where the message should be placed |
LBMSDMException | when an unexpected error occurs within LBMSDM |
References com.latencybusters.lbm.sdm.LBMSDMRawInt64.format().
Referenced by com.latencybusters.lbm.sdm.LBMSDMFieldDecimal.format(), and com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.format().
|
inherited |
Log an event. If debug level is set greater than 0, output to stderr
Referenced by com.latencybusters.lbm.sdm.LBMSDMFields.get_attr(), com.latencybusters.lbm.sdm.LBMSDMFields.LBMSDMFields(), com.latencybusters.lbm.sdm.LBMSDMFieldBlob.set(), com.latencybusters.lbm.sdm.LBMSDMFieldMessage.set(), com.latencybusters.lbm.sdm.LBMSDMFieldDecimal.set(), com.latencybusters.lbm.sdm.LBMSDMFieldTimestamp.set(), com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.set(), and com.latencybusters.lbm.sdm.LBMSDMArrayUint64.set().
long com.latencybusters.lbm.sdm.LBMSDMRawDecimal.mantissa | ( | ) |
Get the mantissa of the decimal number
Referenced by com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.parse().
int com.latencybusters.lbm.sdm.LBMSDMRawDecimal.parse | ( | byte [] | buf, |
int | offset | ||
) | throws LBMSDMException |
Parse a byte buffer containing a raw decimal field (as received on a socket) The byte buffer must be in network order
buf | The byte array (buffer) containing the raw decimal to be parsed |
offset | The index in the array where parsing should start |
LBMSDMException | if a problem occurs parsing the message buffer, for example if the message has bad data |
References com.latencybusters.lbm.sdm.LBMSDMRawDecimal.length, com.latencybusters.lbm.sdm.LBMSDMRawInt64.parse(), and com.latencybusters.lbm.sdm.LBMSDMRawInt64.toLong().
Referenced by com.latencybusters.lbm.sdm.LBMSDMFieldDecimal.parse().
|
inherited |
Set the debug level for processing this SDM message. Currently all debugs go to standard out.
|
inherited |
Get a debug string for this object. This is not expected to be called and exists for child classes.
Referenced by com.latencybusters.lbm.sdm.LBMSDMBadRawObjectException.LBMSDMBadRawObjectException().
String com.latencybusters.lbm.sdm.LBMSDMRawDecimal.toString | ( | ) |
Create a string representing a raw decimal
|
staticinherited |
Debug flag for basic debug output
|
protectedinherited |
Debug mask for SDM implementation.
Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.data(), com.latencybusters.lbm.sdm.LBMSDMessage.parse(), com.latencybusters.lbm.sdm.LBMSDMFieldMessage.parse(), and com.latencybusters.lbm.sdm.LBMSDMArrayMessage.parse().
|
staticinherited |
Debug flag for verbose message parsing output
|
static |
The number of bytes needed to store a raw LBMSDMRawDecimal
Referenced by com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.append(), com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.clone(), com.latencybusters.lbm.sdm.LBMSDMFieldDecimal.fixed_size(), com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.LBMSDMArrayDecimal(), and com.latencybusters.lbm.sdm.LBMSDMRawDecimal.parse().