A class to help unpack byte arrays returned from the spectrometer's various getCmd() results into standard datatypes.
More...
|
| static bool | toBool (byte[] buf) |
| |
| static byte | toByte (byte[] buf) |
| |
| static int | toInt (byte[] buf) |
| |
| static short | toShort (byte[] buf) |
| |
| static uint | toUint (byte[] buf) |
| | This assumes input bytes are little-endian ([aa bb cc] = 0xccbbaa)
|
| |
| static UInt64 | toUint64 (byte[] buf) |
| |
| static ushort | toUshort (byte[] buf) |
| |
A class to help unpack byte arrays returned from the spectrometer's various getCmd() results into standard datatypes.
Differs from ParseData in that null-checks are required, and there are no offsets.
◆ toBool()
| static bool WasatchNET.Unpack.toBool |
( |
byte[] |
buf | ) |
|
|
inlinestatic |
◆ toByte()
| static byte WasatchNET.Unpack.toByte |
( |
byte[] |
buf | ) |
|
|
inlinestatic |
◆ toInt()
| static int WasatchNET.Unpack.toInt |
( |
byte[] |
buf | ) |
|
|
inlinestatic |
◆ toShort()
| static short WasatchNET.Unpack.toShort |
( |
byte[] |
buf | ) |
|
|
inlinestatic |
◆ toUint()
| static uint WasatchNET.Unpack.toUint |
( |
byte[] |
buf | ) |
|
|
inlinestatic |
This assumes input bytes are little-endian ([aa bb cc] = 0xccbbaa)
- Parameters
-
- Returns
<todo>add msb:Bool flag to reverse order</todo>
◆ toUint64()
| static UInt64 WasatchNET.Unpack.toUint64 |
( |
byte[] |
buf | ) |
|
|
inlinestatic |
◆ toUshort()
| static ushort WasatchNET.Unpack.toUshort |
( |
byte[] |
buf | ) |
|
|
inlinestatic |
The documentation for this class was generated from the following file: