VectorNav .NET Library
Static Public Member Functions | List of all members
VectorNav.Data.Util Class Reference

Provides various utility methods for working with data. More...

Static Public Member Functions

static byte HexCharToByte (byte hexChar)
 Converts a single character encoded in ASCII hexadecimal to a byte. More...
 
static byte HexStrToByte (byte[] buffer, int index)
 Converts two characters encoded in ASCII hexadecimal to a byte. More...
 
static UInt16 HexStrToUInt16 (byte[] buffer, int index)
 Converts four characters encoded in ASCII hexadecimal to a UInt16. More...
 
static byte CountSetBits (byte d)
 Counts the number of bits set in the provided value. More...
 
static UInt16 StoH (UInt16 sensorOrdered)
 Converts a 16-bit integer in sensor order to host order. More...
 
static UInt32 StoH (UInt32 sensorOrdered)
 Converts a 32-bit integer in sensor order to host order. More...
 
static UInt64 StoH (UInt64 sensorOrdered)
 Converts a 64-bit integer in sensor order to host order. More...
 

Detailed Description

Provides various utility methods for working with data.

Member Function Documentation

static byte VectorNav.Data.Util.CountSetBits ( byte  d)
static

Counts the number of bits set in the provided value.

Parameters
dThe value to count the bits of.
Returns
The number of bits set.
static byte VectorNav.Data.Util.HexCharToByte ( byte  hexChar)
static

Converts a single character encoded in ASCII hexadecimal to a byte.

Parameters
hexCharThe hexadecimal byte to convert.
Returns
The converted value.
static byte VectorNav.Data.Util.HexStrToByte ( byte[]  buffer,
int  index 
)
static

Converts two characters encoded in ASCII hexadecimal to a byte.

Parameters
bufferThe buffer containing the hexadecimal characters to convert.
indexThe index of the beginning of the two hexadecimal characters.
Returns
The converted value.
static UInt16 VectorNav.Data.Util.HexStrToUInt16 ( byte[]  buffer,
int  index 
)
static

Converts four characters encoded in ASCII hexadecimal to a UInt16.

Parameters
bufferThe buffer containing the hexadecimal characters to convert.
indexThe index of the beginning of the four hexadecimal characters.
Returns
The converted value.
static UInt16 VectorNav.Data.Util.StoH ( UInt16  sensorOrdered)
static

Converts a 16-bit integer in sensor order to host order.

Parameters
sensorOrderedThe 16-bit integer in sensor order.
Returns
The value converted to host ordered.
static UInt32 VectorNav.Data.Util.StoH ( UInt32  sensorOrdered)
static

Converts a 32-bit integer in sensor order to host order.

Parameters
sensorOrderedThe 32-bit integer in sensor order.
Returns
The value converted to host ordered.
static UInt64 VectorNav.Data.Util.StoH ( UInt64  sensorOrdered)
static

Converts a 64-bit integer in sensor order to host order.

Parameters
sensorOrderedThe 64-bit integer in sensor order.
Returns
The value converted to host ordered.

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