C# Класс S7.Net.Types.Class

Contains the methods to convert a C# class to S7 data types
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

FromBytes() публичный статический Метод

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
Результат void

GetClassSize() публичный статический Метод

Gets the size of the struct in bytes.
public static GetClassSize ( Type classType ) : int
classType System.Type the type of the class
Результат int

ToBytes() публичный статический Метод

Creates a byte array depending on the struct type.
public static ToBytes ( object sourceClass ) : byte[]
sourceClass object The struct object
Результат byte[]