UM Java API  6.16.1
com.latencybusters.lbm.sdm.LBMSDMRawFloat Class Reference
Inheritance diagram for com.latencybusters.lbm.sdm.LBMSDMRawFloat:
com.latencybusters.lbm.sdm.LBMSDMRaw com.latencybusters.lbm.sdm.LBMSDM

Public Member Functions

void set (float v) throws LBMSDMException
 
 LBMSDMRawFloat () throws LBMSDMException
 
 LBMSDMRawFloat (float v) throws LBMSDMException
 
int format (byte[] buf, int offset) throws LBMSDMException
 
String toString ()
 
int parse (byte[] buf, int offset) throws LBMSDMException
 
float toFloat ()
 
String toDbgString ()
 
void set_debug_level (int level)
 
void log (String s)
 

Static Public Member Functions

static int format (byte[] buf, int offset, float v) throws LBMSDMException
 
static float parse_s (byte[] buf, int offset) throws LBMSDMException
 

Static Public Attributes

static int length = 4
 
static final int DEBUG_BASIC = 1
 
static final int DEBUG_VERBOSE_PARSING = 2
 

Protected Attributes

int debug_level = 0
 

Detailed Description

An LBMSDMRawFloat is a helper class to minimise the effort of formatting and parsing Floats

Constructor & Destructor Documentation

com.latencybusters.lbm.sdm.LBMSDMRawFloat.LBMSDMRawFloat ( ) throws LBMSDMException

Create a raw float object, setting the value to 0

com.latencybusters.lbm.sdm.LBMSDMRawFloat.LBMSDMRawFloat ( float  v) throws LBMSDMException

Create a raw float object providing the value

Parameters
vThe value of the raw float

Member Function Documentation

static int com.latencybusters.lbm.sdm.LBMSDMRawFloat.format ( byte []  buf,
int  offset,
float  v 
) throws LBMSDMException
static

Format a float value into a byte buffer

Parameters
bufThe buffer to contain the formatted value
offsetThe offset in to the buffer to start formatting
vThe value of the float to be formatted
Returns
The offset after formatting the float

References com.latencybusters.lbm.sdm.LBMSDMRawUint32.format().

Referenced by com.latencybusters.lbm.sdm.LBMSDMRawFloat.format(), and com.latencybusters.lbm.sdm.LBMSDMFieldFloat.format().

int com.latencybusters.lbm.sdm.LBMSDMRawFloat.format ( byte []  buf,
int  offset 
) throws LBMSDMException

Format the raw float value into a byte buffer

Parameters
bufThe buffer to contain the formatted value
offsetThe offset in to the buffer to start formatting
Returns
The offset after formatting this object

References com.latencybusters.lbm.sdm.LBMSDMRawFloat.format().

int com.latencybusters.lbm.sdm.LBMSDMRawFloat.parse ( byte []  buf,
int  offset 
) throws LBMSDMException

Parse the raw float value from a byte buffer The value is stored in the object.

Parameters
bufThe buffer that contains the formatted value
offsetThe offset in to the buffer to start parsing
Returns
the new offset after parsing the field

References com.latencybusters.lbm.sdm.LBMSDMRawFloat.length, and com.latencybusters.lbm.sdm.LBMSDMRawFloat.parse_s().

static float com.latencybusters.lbm.sdm.LBMSDMRawFloat.parse_s ( byte []  buf,
int  offset 
) throws LBMSDMException
static

Parse the raw float value from a byte buffer

Parameters
bufThe buffer that contains the formatted value
offsetThe offset in to the buffer to start parsing
Returns
The float value parsed

References com.latencybusters.lbm.sdm.LBMSDMRawUint32.parse_s().

Referenced by com.latencybusters.lbm.sdm.LBMSDMRawFloat.parse(), and com.latencybusters.lbm.sdm.LBMSDMFieldFloat.parse().

void com.latencybusters.lbm.sdm.LBMSDMRawFloat.set ( float  v) throws LBMSDMException

Set the raw float from a float field

Parameters
vThe value the raw float needs to be set to
void com.latencybusters.lbm.sdm.LBMSDM.set_debug_level ( int  level)
inherited

Set the debug level for processing this SDM message. Currently all debugs go to standard out.

String com.latencybusters.lbm.sdm.LBMSDMRaw.toDbgString ( )
inherited

Get a debug string for this object. This is not expected to be called and exists for child classes.

Returns
returns null - derived classes override with their value

Referenced by com.latencybusters.lbm.sdm.LBMSDMBadRawObjectException.LBMSDMBadRawObjectException().

float com.latencybusters.lbm.sdm.LBMSDMRawFloat.toFloat ( )

Get the float value of this raw float

Returns
The float value of this object

Referenced by com.latencybusters.lbm.sdm.LBMSDMRawFloat.toString().

String com.latencybusters.lbm.sdm.LBMSDMRawFloat.toString ( )

Get a string representing the raw float value

Returns
A string representing the raw float value

References com.latencybusters.lbm.sdm.LBMSDMRawFloat.toFloat().

Member Data Documentation

final int com.latencybusters.lbm.sdm.LBMSDM.DEBUG_BASIC = 1
staticinherited

Debug flag for basic debug output

int com.latencybusters.lbm.sdm.LBMSDM.debug_level = 0
protectedinherited
final int com.latencybusters.lbm.sdm.LBMSDM.DEBUG_VERBOSE_PARSING = 2
staticinherited

Debug flag for verbose message parsing output

int com.latencybusters.lbm.sdm.LBMSDMRawFloat.length = 4
static

The length of a raw float

Referenced by com.latencybusters.lbm.sdm.LBMSDMRawFloat.parse().


The documentation for this class was generated from the following file: