点击或拖拽改变大小

ReverseWordTransform 类

按照字节错位的数据转换类
Data conversion class according to byte misalignment
继承层次
System.Object
  HslCommunication.Core.RegularByteTransform
    HslCommunication.Core.ReverseWordTransform

命名空间:  HslCommunication.Core
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法
public class ReverseWordTransform : RegularByteTransform

ReverseWordTransform 类型公开以下成员。

构造函数
  名称说明
公共方法ReverseWordTransform()
实例化一个默认的对象
Instantiate a default object
公共方法ReverseWordTransform(DataFormat)
使用指定的数据解析来实例化对象
Instantiate the object using the specified data parsing
Top
属性
  名称说明
公共属性DataFormat
获取或设置数据解析的格式,可选ABCD, BADC,CDAB,DCBA格式,对int,uint,float,double,long,ulong类型有作用
Get or set the format of the data analysis, optional ABCD, BADC, CDAB, DCBA format, effective for int, uint, float, double, long, ulong type
(继承自 RegularByteTransform。)
公共属性IsStringReverseByteWord
获取或设置在解析字符串的时候是否将字节按照字单位反转
Gets or sets whether to reverse the bytes in word units when parsing strings
(继承自 RegularByteTransform。)
Top
方法
  名称说明
受保护的方法ByteTransDataFormat2
反转两个字节的数据信息
(继承自 RegularByteTransform。)
受保护的方法ByteTransDataFormat4
反转多字节的数据信息
(继承自 RegularByteTransform。)
受保护的方法ByteTransDataFormat8
反转多字节的数据信息
(继承自 RegularByteTransform。)
公共方法CreateByDateFormat
根据指定的DataFormat格式,来实例化一个新的对象,除了DataFormat不同,其他都相同
According to the specified DataFormat format, to instantiate a new object, except that DataFormat is different, everything else is the same
(重写 RegularByteTransform.CreateByDateFormat(DataFormat).)
公共方法Equals
Determines whether the specified object is equal to the current object.
(继承自 Object。)
受保护的方法Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(继承自 Object。)
公共方法GetHashCode
Serves as the default hash function.
(继承自 Object。)
公共方法GetType
Gets the Type of the current instance.
(继承自 Object。)
受保护的方法MemberwiseClone
Creates a shallow copy of the current Object.
(继承自 Object。)
公共方法ToString
Returns a string that represents the current object.
(重写 RegularByteTransform.ToString().)
公共方法TransBool(Byte[], Int32)
从缓存中提取出bool结果,需要传入想要提取的位索引,注意:是从0开始的位索引,10则表示 buffer[1] 的第二位。
To extract the bool result from the cache, you need to pass in the bit index you want to extract. Note: the bit index starts from 0, and 10 represents the second bit of buffer[1].
(继承自 RegularByteTransform。)
公共方法TransBool(Byte[], Int32, Int32)
从缓存中提取出bool数组结果,需要传入想要提取的位索引,注意:是从0开始的位索引,10则表示 buffer[1] 的第二位。长度为 bool 数量的长度,传入 10 则获取 10 个长度的 bool[] 数组。
To extract the result of the bool array from the cache, you need to pass in the bit index you want to extract. Note: the bit index starts from 0, and 10 represents the second bit of buffer[1]. The length is the length of the number of bools. If you pass in 10, you will get a bool[] array of 10 lengths.
(继承自 RegularByteTransform。)
公共方法TransByte(Boolean)
bool变量转化缓存数据,一般来说单bool只能转化为0x01 或是 0x00
The bool variable is converted to cache data, a single bool can only be converted to 0x01 or 0x00
(继承自 RegularByteTransform。)
公共方法TransByte(Boolean[])
将bool数组变量转化缓存数据,如果数组长度不满足8的倍数,则自动补0操作。
Convert the bool array variable to the cache data. If the length of the array does not meet a multiple of 8, it will automatically add 0.
(继承自 RegularByteTransform。)
公共方法TransByte(Byte)
将byte变量转化缓存数据
Convert byte variables into cached data
(继承自 RegularByteTransform。)
公共方法TransByte(Double)
double变量转化缓存数据,一个double数据可以转为8个字节的byte数组
The double variable is converted to cache data, a double data can be converted into an 8-byte byte array
(继承自 RegularByteTransform。)
公共方法TransByte(Double[])
double数组变量转化缓存数据,n个长度的double数组,可以转为8*n个长度的byte数组
The double array variable transforms the buffer data, the double array of n length can be converted to the byte array of 8*n length
(继承自 RegularByteTransform。)
公共方法TransByte(Int16)
short变量转化缓存数据,一个short数据可以转为2个字节的byte数组
Short variable is converted to cache data, a short data can be converted into a 2-byte byte array
(继承自 RegularByteTransform。)
公共方法TransByte(Int16[])
short数组变量转化缓存数据,n个长度的short数组,可以转为2*n个长度的byte数组
The short array variable transforms the buffered data, a short array of n lengths can be converted into a byte array of 2*n lengths
(继承自 RegularByteTransform。)
公共方法TransByte(Int32)
int变量转化缓存数据,一个int数据可以转为4个字节的byte数组
Int variable converts cache data, an int data can be converted into a 4-byte byte array
(继承自 RegularByteTransform。)
公共方法TransByte(Int32[])
int数组变量转化缓存数据,n个长度的int数组,可以转为4*n个长度的byte数组
The int array variable transforms the cache data, the int array of n length can be converted to the byte array of 4*n length
(继承自 RegularByteTransform。)
公共方法TransByte(Int64)
long变量转化缓存数据,一个long数据可以转为8个字节的byte数组
Long variable is converted into cache data, a long data can be converted into 8-byte byte array
(继承自 RegularByteTransform。)
公共方法TransByte(Int64[])
long数组变量转化缓存数据,n个长度的long数组,可以转为8*n个长度的byte数组
The long array variable transforms the buffer data, the long array of n length can be converted into the byte array of 8*n length
(继承自 RegularByteTransform。)
公共方法TransByte(Single)
float变量转化缓存数据,一个float数据可以转为4个字节的byte数组
Float variable is converted into cache data, a float data can be converted into a 4-byte byte array
(继承自 RegularByteTransform。)
公共方法TransByte(Single[])
float数组变量转化缓存数据,n个长度的float数组,可以转为4*n个长度的byte数组
Float array variable converts buffer data, n-length float array can be converted into 4*n-length byte array
(继承自 RegularByteTransform。)
公共方法TransByte(UInt16)
ushort变量转化缓存数据,一个ushort数据可以转为2个字节的Byte数组
ushort variable converts buffer data, a ushort data can be converted into a 2-byte Byte array
(继承自 RegularByteTransform。)
公共方法TransByte(UInt16[])
ushort数组变量转化缓存数据,n个长度的ushort数组,可以转为2*n个长度的byte数组
The ushort array variable transforms the buffer data, the ushort array of n length can be converted into a byte array of 2*n length
(继承自 RegularByteTransform。)
公共方法TransByte(UInt32)
uint变量转化缓存数据,一个uint数据可以转为4个字节的byte数组
uint variable converts buffer data, a uint data can be converted into a 4-byte byte array
(继承自 RegularByteTransform。)
公共方法TransByte(UInt32[])
uint数组变量转化缓存数据,n个长度的uint数组,可以转为4*n个长度的byte数组
uint array variable converts buffer data, uint array of n length can be converted to byte array of 4*n length
(继承自 RegularByteTransform。)
公共方法TransByte(UInt64)
ulong变量转化缓存数据,一个ulong数据可以转为8个字节的byte数组
Ulong variable converts cache data, a ulong data can be converted into 8-byte byte array
(继承自 RegularByteTransform。)
公共方法TransByte(UInt64[])
ulong数组变量转化缓存数据,n个长度的ulong数组,可以转为8*n个长度的byte数组
The ulong array variable transforms the buffer data, the ulong array of n length can be converted to the byte array of 8*n length
(继承自 RegularByteTransform。)
公共方法TransByte(Byte[], Int32)
从缓存中提取byte结果,需要指定起始的字节索引
To extract the byte result from the cache, you need to specify the starting byte index
(继承自 RegularByteTransform。)
公共方法TransByte(String, Encoding)
使用指定的编码字符串转化缓存数据
Use the specified encoding string to convert the cached data
(继承自 RegularByteTransform。)
公共方法TransByte(Byte[], Int32, Int32)
从缓存中提取byte数组结果,需要指定起始的字节索引,以及指定读取的字节长度
To extract the byte array result from the cache, you need to specify the starting byte index and the byte length to be read
(继承自 RegularByteTransform。)
公共方法TransByte(String, Int32, Encoding)
使用指定的编码字符串转化缓存数据,指定转换之后的字节长度信息
Use the specified encoding string to convert the cached data, specify the byte length information after conversion
(继承自 RegularByteTransform。)
公共方法TransDouble(Byte[], Int32)
从缓存中提取double结果,需要指定起始的字节索引,按照字节为单位,一个double占用八个字节
To extract the double result from the cache, you need to specify the starting byte index, in bytes, A double occupies eight bytes
(继承自 RegularByteTransform。)
公共方法TransDouble(Byte[], Int32, Int32)
从缓存中提取double数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 double 数组的长度,如果传入 10 ,则表示提取 10 个连续的 double 数据,该数据共占用 80 字节。
To extract the double array result from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the extracted double array. If 10 is passed in, it means to extract 10 consecutive double data. Occupies 80 bytes.
(继承自 RegularByteTransform。)
公共方法TransDouble(Byte[], Int32, Int32, Int32)
从缓存中提取double二维数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 double 数组的行和列的长度,按照 double 为单位的个数。
To extract the result of a double two-dimensional array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the rows and columns of the extracted double array, in terms of the number of doubles.
(继承自 RegularByteTransform。)
公共方法TransInt16(Byte[], Int32)
从缓存中提取short结果,需要指定起始的字节索引,按照字节为单位,一个short占用两个字节
To extract short results from the cache, you need to specify the starting byte index, in bytes, A short occupies two bytes
(继承自 RegularByteTransform。)
公共方法TransInt16(Byte[], Int32, Int32)
从缓存中提取short数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 short 数组的长度,如果传入 10 ,则表示提取 10 个连续的 short 数据,该数据共占用 20 字节。
To extract the result of the short array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the extracted short array. If 10 is passed in, it means to extract 10 consecutive short data. Occupies 20 bytes.
(继承自 RegularByteTransform。)
公共方法TransInt16(Byte[], Int32, Int32, Int32)
从缓存中提取short二维数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 short 数组的行和列的长度,按照 short 为单位的个数。
To extract the result of a short two-dimensional array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the rows and columns of the extracted short array, in terms of the number of shorts.
(继承自 RegularByteTransform。)
公共方法TransInt32(Byte[], Int32)
从缓存中提取int结果,需要指定起始的字节索引,按照字节为单位,一个int占用四个字节
To extract the int result from the cache, you need to specify the starting byte index, in bytes, A int occupies four bytes
(继承自 RegularByteTransform。)
公共方法TransInt32(Byte[], Int32, Int32)
从缓存中提取int数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 int 数组的长度,如果传入 10 ,则表示提取 10 个连续的 int 数据,该数据共占用 40 字节。
To extract the int array result from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the extracted int array. If 10 is passed in, it means to extract 10 consecutive int data. Occupies 40 bytes.
(继承自 RegularByteTransform。)
公共方法TransInt32(Byte[], Int32, Int32, Int32)
从缓存中提取int二维数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 int 数组的行和列的长度,按照 int 为单位的个数。
To extract the result of an int two-dimensional array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the rows and columns of the extracted int array, in the number of int units.
(继承自 RegularByteTransform。)
公共方法TransInt64(Byte[], Int32)
从缓存中提取long结果,需要指定起始的字节索引,按照字节为单位,一个long占用八个字节
To extract the long result from the cache, you need to specify the starting byte index, in bytes, A long occupies eight bytes
(继承自 RegularByteTransform。)
公共方法TransInt64(Byte[], Int32, Int32)
从缓存中提取long数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 long 数组的长度,如果传入 10 ,则表示提取 10 个连续的 long 数据,该数据共占用 80 字节。
To extract the long array result from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the long array to be extracted. If 10 is passed in, it means to extract 10 consecutive long data. Occupies 80 bytes.
(继承自 RegularByteTransform。)
公共方法TransInt64(Byte[], Int32, Int32, Int32)
从缓存中提取long二维数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 long 数组的行和列的长度,按照 long 为单位的个数。
To extract the result of a long two-dimensional array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the rows and columns of the extracted long array, in long as the number of units.
(继承自 RegularByteTransform。)
公共方法TransSingle(Byte[], Int32)
从缓存中提取float结果,需要指定起始的字节索引,按照字节为单位,一个float占用四个字节 To extract the float result from the cache, you need to specify the starting byte index, in units of bytes, A float occupies four bytes
(继承自 RegularByteTransform。)
公共方法TransSingle(Byte[], Int32, Int32)
从缓存中提取float数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 float 数组的长度,如果传入 10 ,则表示提取 10 个连续的 float 数据,该数据共占用 40 字节。
To extract the result of the float array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the extracted float array. If 10 is passed in, it means that 10 consecutive float data are extracted. Occupies 40 bytes.
(继承自 RegularByteTransform。)
公共方法TransSingle(Byte[], Int32, Int32, Int32)
从缓存中提取float二维数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 float 数组的行和列的长度,按照 float 为单位的个数。
To extract the result of a float two-dimensional array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the rows and columns of the extracted float array, in terms of the number of floats.
(继承自 RegularByteTransform。)
公共方法TransString(Byte[], Encoding)
从缓存中提取string结果,使用指定的编码将全部的缓存转为字符串
Extract the string result from the cache, use the specified encoding to convert all the cache into a string
(继承自 RegularByteTransform。)
公共方法TransString(Byte[], Int32, Int32, Encoding)
从缓存中的部分字节数组转化为string结果,使用指定的编码,指定起始的字节索引,字节长度信息。
Convert a part of the byte array in the buffer into a string result, use the specified encoding, specify the starting byte index, and byte length information.
(继承自 RegularByteTransform。)
公共方法TransUInt16(Byte[], Int32)
从缓存中提取ushort结果,需要指定起始的字节索引,按照字节为单位,一个ushort占用两个字节
To extract ushort results from the cache, you need to specify the starting byte index, in bytes, A ushort occupies two bytes
(继承自 RegularByteTransform。)
公共方法TransUInt16(Byte[], Int32, Int32)
从缓存中提取ushort数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 ushort 数组的长度,如果传入 10 ,则表示提取 10 个连续的 ushort 数据,该数据共占用 20 字节。
To extract the ushort array result from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the extracted ushort array. If 10 is passed in, it means to extract 10 consecutive ushort data. Occupies 20 bytes.
(继承自 RegularByteTransform。)
公共方法TransUInt16(Byte[], Int32, Int32, Int32)
从缓存中提取ushort二维数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 ushort 数组的行和列的长度,按照 ushort 为单位的个数。
To extract the result of the ushort two-dimensional array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the rows and columns of the extracted ushort array, in terms of the number of ushorts.
(继承自 RegularByteTransform。)
公共方法TransUInt32(Byte[], Int32)
从缓存中提取uint结果,需要指定起始的字节索引,按照字节为单位,一个uint占用四个字节
To extract uint results from the cache, you need to specify the starting byte index, in bytes, A uint occupies four bytes
(继承自 RegularByteTransform。)
公共方法TransUInt32(Byte[], Int32, Int32)
从缓存中提取uint数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 uint 数组的长度,如果传入 10 ,则表示提取 10 个连续的 uint 数据,该数据共占用 40 字节。
To extract the uint array result from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the extracted uint array. If 10 is passed in, it means to extract 10 consecutive uint data. Occupies 40 bytes.
(继承自 RegularByteTransform。)
公共方法TransUInt32(Byte[], Int32, Int32, Int32)
从缓存中提取uint二维数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 uint 数组的行和列的长度,按照 uint 为单位的个数。
To extract the result of a uint two-dimensional array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the rows and columns of the extracted uint array, in terms of uint as the unit.
(继承自 RegularByteTransform。)
公共方法TransUInt64(Byte[], Int32)
从缓存中提取ulong结果,需要指定起始的字节索引,按照字节为单位,一个ulong占用八个字节 To extract the ulong result from the cache, you need to specify the starting byte index, in bytes, A ulong occupies eight bytes
(继承自 RegularByteTransform。)
公共方法TransUInt64(Byte[], Int32, Int32)
从缓存中提取ulong数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 ulong 数组的长度,如果传入 10 ,则表示提取 10 个连续的 ulong 数据,该数据共占用 80 字节。
To extract the ulong array result from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the extracted ulong array. If 10 is passed in, it means to extract 10 consecutive ulong data. Occupies 80 bytes.
(继承自 RegularByteTransform。)
公共方法TransUInt64(Byte[], Int32, Int32, Int32)
从缓存中提取ulong二维数组结果,需要指定起始的字节索引,按照字节为单位,然后指定提取的 ulong 数组的行和列的长度,按照 ulong 为单位的个数。
To extract the result of the ulong two-dimensional array from the cache, you need to specify the starting byte index, in bytes, and then specify the length of the rows and columns of the extracted ulong array, in the number of ulong units.
(继承自 RegularByteTransform。)
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见