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

Contains the method to convert a C# struct to S7 data types
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
FromBytes ( Type structType, byte bytes ) : object

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

GetStructSize ( Type structType ) : int

Gets the size of the struct in bytes.

ToBytes ( object structValue ) : 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 ( Type structType, byte bytes ) : object
structType System.Type The struct type
bytes byte The array of bytes
Результат object

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

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

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

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