C# Класс LibUsbDotNet.Main.Helper

General utilities class used by LudnLite and exposed publicly for your convience.
Показать файл Открыть проект

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

Метод Описание
BytesToObject ( byte sourceBytes, int iStartIndex, int iLength, object destObject ) : void

Copies bytes to a blittable object.

GetEnumData ( Type type ) : int>.Dictionary

Returns a dictionary object of enumeration names and values.

HexString ( byte data, string prefix, string suffix ) : string

Builds a formatted hexidecimal string from an array of bytes.

HostEndianToLE16 ( short swapValue ) : short

Swaps low and high bytes on big endian systems. Has no effect on little endian systems.

ShowAsHex ( object standardValue ) : string

Converts standard values to decorated hex string values.

ToString ( string sep0, string names, string sep1, object values, string sep2 ) : string

Builds a delimited string of names and values.

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

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

Copies bytes to a blittable object.
public static BytesToObject ( byte sourceBytes, int iStartIndex, int iLength, object destObject ) : void
sourceBytes byte bytes to copy
iStartIndex int Start index
iLength int number of bytes to copy
destObject object blittable destination object
Результат void

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

Returns a dictionary object of enumeration names and values.
public static GetEnumData ( Type type ) : int>.Dictionary
type System.Type They of enumeration.
Результат int>.Dictionary

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

Builds a formatted hexidecimal string from an array of bytes.
public static HexString ( byte data, string prefix, string suffix ) : string
data byte the byte array
prefix string string to place before each byte
suffix string string to place after each byte
Результат string

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

Swaps low and high bytes on big endian systems. Has no effect on little endian systems.
public static HostEndianToLE16 ( short swapValue ) : short
swapValue short The value to convert.
Результат short

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

Converts standard values to decorated hex string values.
public static ShowAsHex ( object standardValue ) : string
standardValue object The value to convert.
Результат string

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

Builds a delimited string of names and values.
public static ToString ( string sep0, string names, string sep1, object values, string sep2 ) : string
sep0 string Inserted and the begining of the entity.
names string The list of names for the object values.
sep1 string Inserted between the name and value.
values object The values for the names.
sep2 string Inserted and the end of the entity.
Результат string