UM .NET API  6.16.1
com.latencybusters.lbm.sdm.LBMSDMRawFloat Class Reference

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

Inheritance diagram for com.latencybusters.lbm.sdm.LBMSDMRawFloat:
com.latencybusters.lbm.sdm.LBMSDMRaw com.latencybusters.lbm.sdm.LBMSDM

Public Member Functions

virtual void set (float v)
 Set the raw float from a float field. More...
 
 LBMSDMRawFloat ()
 Create a raw float object, setting the value to 0.
 
 LBMSDMRawFloat (float v)
 Create a raw float object providing the value. More...
 
virtual int format (byte[] buf, int offset)
 Format the raw float value into a byte buffer. More...
 
override System.String ToString ()
 Get a string representing the raw float value. More...
 
virtual int parse (byte[] buf, int offset)
 Parse the raw float value from a byte buffer The value is stored in the object. More...
 
virtual float toFloat ()
 Get the float value of this raw float. More...
 
virtual System.String toDbgString ()
 Get a debug string for this object. This is not expected to be called and exists for child classes. More...
 
virtual void set_debug_level (int level)
 Set the debug level for processing this SDM message. Currently all debugs go to standard out. More...
 
virtual void log (System.String s)
 Log an event. If debug level is set greater than 0, output to stderr. More...
 
System.Object Clone ()
 Get a copy of this object. More...
 

Static Public Member Functions

static int format (byte[] buf, int offset, float v)
 Format a float value into a byte buffer. More...
 
static float parse_s (byte[] buf, int offset)
 Parse the raw float value from a byte buffer. More...
 

Public Attributes

const int DEBUG_BASIC = 1
 Debug flag for basic debug output.
 
const int DEBUG_VERBOSE_PARSING = 2
 Debug flag for verbose message parsing output.
 

Static Public Attributes

static int length = 4
 The length of a raw float.
 

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 ( float  v)

Create a raw float object providing the value.

Parameters
vThe value of the raw float

Member Function Documentation

System.Object com.latencybusters.lbm.sdm.LBMSDM.Clone ( )
inherited

Get a copy of this object.

Returns
A new object with a copy
static int com.latencybusters.lbm.sdm.LBMSDMRawFloat.format ( byte[]  buf,
int  offset,
float  v 
)
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

Referenced by com.latencybusters.lbm.sdm.LBMSDMFieldFloat.toDbgString().

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

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
virtual void com.latencybusters.lbm.sdm.LBMSDM.log ( System.String  s)
virtualinherited

Log an event. If debug level is set greater than 0, output to stderr.

Parameters
sString containing the event to log
virtual int com.latencybusters.lbm.sdm.LBMSDMRawFloat.parse ( byte[]  buf,
int  offset 
)
virtual

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
static float com.latencybusters.lbm.sdm.LBMSDMRawFloat.parse_s ( byte[]  buf,
int  offset 
)
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.LBMSDMFieldFloat.parse().

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

Set the raw float from a float field.

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

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

Parameters
levelDebug level to set
virtual System.String com.latencybusters.lbm.sdm.LBMSDMRaw.toDbgString ( )
virtualinherited

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().

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

Get the float value of this raw float.

Returns
The float value of this object
override System.String com.latencybusters.lbm.sdm.LBMSDMRawFloat.ToString ( )

Get a string representing the raw float value.

Returns
A string representing the raw float value

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