Method | Description | |
---|---|---|
BinStringToByte ( this txt ) : byte? |
Converts a binary string to a byte. Can return null.
|
|
BinStringToInt32 ( this txt ) : int |
Converts a binary string to Int32 value
|
|
ConvertToDouble ( this input ) : double |
Converts from DWord (DBD) to double
|
|
ConvertToInt ( this input ) : |
Converts from UInt32 value to Int32 value; it's used to retrieve negative values from DBDs
|
|
ConvertToShort ( this input ) : short |
Converts from ushort value to short value; it's used to retrieve negative values from words
|
|
ConvertToUInt ( this input ) : |
Converts from Int32 value to UInt32 value; it's used to pass negative values to DBDs
|
|
ConvertToUshort ( this input ) : ushort |
Converts from short value to ushort value; it's used to pass negative values to DWs
|
|
SelectBit ( this data, int bitPosition ) : bool |
Helper to get a bit value given a byte and the bit index. Example: DB1.DBX0.5 -> var bytes = ReadBytes(DB1.DBW0); bool bit = bytes[0].SelectBit(5);
|
|
ValToBinString ( this value ) : string |
Converts the value to a binary string
|
public static BinStringToByte ( this txt ) : byte? | ||
txt | this | |
return | byte? |
public static BinStringToInt32 ( this txt ) : int | ||
txt | this | |
return | int |
public static ConvertToDouble ( this input ) : double | ||
input | this | |
return | double |
public static ConvertToInt ( this input ) : |
||
input | this | |
return |
public static ConvertToShort ( this input ) : short | ||
input | this | |
return | short |
public static ConvertToUInt ( this input ) : |
||
input | this | |
return |
public static ConvertToUshort ( this input ) : ushort | ||
input | this | |
return | ushort |
public static SelectBit ( this data, int bitPosition ) : bool | ||
data | this | |
bitPosition | int | |
return | bool |
public static ValToBinString ( this value ) : string | ||
value | this | |
return | string |