C# Class S7.Net.Types.Word

Contains the conversion methods to convert Words from S7 plc to C#.
Mostra file Open project: killnine/s7netplus Class Usage Examples

Public Methods

Method Description
FromByteArray ( byte bytes ) : UInt16

Converts a word (2 bytes) to ushort (UInt16)

FromBytes ( byte LoVal, byte HiVal ) : UInt16

Converts a word (2 bytes) to ushort (UInt16)

ToArray ( byte bytes ) : System.UInt16[]

Converts an array of bytes to an array of ushort

ToByteArray ( UInt16 value ) : byte[]

Converts a ushort (UInt16) to word (2 bytes)

Method Details

FromByteArray() public static method

Converts a word (2 bytes) to ushort (UInt16)
public static FromByteArray ( byte bytes ) : UInt16
bytes byte
return System.UInt16

FromBytes() public static method

Converts a word (2 bytes) to ushort (UInt16)
public static FromBytes ( byte LoVal, byte HiVal ) : UInt16
LoVal byte
HiVal byte
return System.UInt16

ToArray() public static method

Converts an array of bytes to an array of ushort
public static ToArray ( byte bytes ) : System.UInt16[]
bytes byte
return System.UInt16[]

ToByteArray() public static method

Converts a ushort (UInt16) to word (2 bytes)
public static ToByteArray ( UInt16 value ) : byte[]
value System.UInt16
return byte[]