Method | Description | |
---|---|---|
BitIsHigh ( byte value, int bitIndex ) : bool |
Determines if a bit in the given position of a byte is High (1) or Low (0).
|
|
BitIsLow ( byte value, int bitIndex ) : bool |
Determines if a bit in the given position of a byte is High (1) or Low (0).
|
|
GetBit ( byte value, int bitIndex ) : bool |
Gets a bit in the given position of a byte to the give value.
|
|
SetBit ( byte value, int bitIndex, bool bit ) : byte |
Sets a bit in the given position of a byte to the give value.
|
|
ToByteArray ( float value ) : byte[] |
Converts a float to a 2-byte value to be written to the device register.
|
|
ToFloat ( byte registerValue ) : float |
Converts a 2-byte register value to a float.
|
public static BitIsHigh ( byte value, int bitIndex ) : bool | ||
value | byte | The byte value to be checked. |
bitIndex | int | The bit position from 0 to 7. |
return | bool |
public static BitIsLow ( byte value, int bitIndex ) : bool | ||
value | byte | The byte value to be checked. |
bitIndex | int | The bit position from 0 to 7. |
return | bool |
public static GetBit ( byte value, int bitIndex ) : bool | ||
value | byte | The byte value to be modified. |
bitIndex | int | The index of the bit to modify. This /// value can be 0 to 7. |
return | bool |
public static SetBit ( byte value, int bitIndex, bool bit ) : byte | ||
value | byte | The byte value to be modified. |
bitIndex | int | The index of the bit to modify. This /// value can be 0 to 7. |
bit | bool | The value to be set in the byte. |
return | byte |
public static ToByteArray ( float value ) : byte[] | ||
value | float | The value to be converted. |
return | byte[] |
public static ToFloat ( byte registerValue ) : float | ||
registerValue | byte | A 2-byte register value /// read from the device to be converted. |
return | float |