C# 클래스 S7.Net.Types.Class

Contains the methods to convert a C# class to S7 data types
파일 보기 프로젝트 열기: killnine/s7netplus

공개 메소드들

메소드 설명
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[]