C# Class S7.Net.Types.Class

Contains the methods to convert a C# class to S7 data types
Afficher le fichier Open project: killnine/s7netplus

Méthodes publiques

Méthode Description
FromBytes ( object sourceClass, Type classType, byte bytes ) : void

Creates a struct of a specified type by an array of bytes.

GetClassSize ( Type classType ) : int

Gets the size of the struct in bytes.

ToBytes ( object sourceClass ) : byte[]

Creates a byte array depending on the struct type.

Method Details

FromBytes() public static méthode

Creates a struct of a specified type by an array of bytes.
public static FromBytes ( object sourceClass, Type classType, byte bytes ) : void
sourceClass object
classType System.Type The struct type
bytes byte The array of bytes
Résultat void

GetClassSize() public static méthode

Gets the size of the struct in bytes.
public static GetClassSize ( Type classType ) : int
classType System.Type the type of the class
Résultat int

ToBytes() public static méthode

Creates a byte array depending on the struct type.
public static ToBytes ( object sourceClass ) : byte[]
sourceClass object The struct object
Résultat byte[]