Click or drag to resize

EndianOrder Class

Represents an endian byte order interoperability class.
Inheritance Hierarchy

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
public class EndianOrder
View Source

The EndianOrder type exposes the following members.

Constructors
 NameDescription
Protected methodEndianOrder Constructs a new instance of the EndianOrder class.
Top
Properties
 NameDescription
Public propertyTargetEndianness Returns the target endian-order of this EndianOrder representation.
Top
Methods
 NameDescription
Public methodCoerceByteOrderObsolete.
Changes the order of a buffer (reverse or pass-through) based on the target endian-order of this EndianOrder representation.
Public methodCopyBufferObsolete.
Copies a buffer in the target endian-order of this EndianOrder representation.
Public methodCopyBytes(Boolean, Byte, Int32) Copies the specified Boolean value as an array of 1 byte in the target endian-order to the destination array.
Public methodCopyBytes(Char, Byte, Int32) Copies the specified Unicode character value as an array of 2 bytes in the target endian-order to the destination array.
Public methodCopyBytes(Double, Byte, Int32) Copies the specified double-precision floating point value as an array of 8 bytes in the target endian-order to the destination array.
Public methodCopyBytes(Guid, Byte, Int32)Obsolete.
Copies the specified Guid value as an array of 16 bytes in the target endian-order to the destination array.
Public methodCopyBytes(Int16, Byte, Int32) Copies the specified 16-bit signed integer value as an array of 2 bytes in the target endian-order to the destination array.
Public methodCopyBytes(Int24, Byte, Int32) Copies the specified 24-bit signed integer value as an array of 3 bytes in the target endian-order to the destination array.
Public methodCopyBytes(Int32, Byte, Int32) Copies the specified 32-bit signed integer value as an array of 4 bytes in the target endian-order to the destination array.
Public methodCopyBytes(Int64, Byte, Int32) Copies the specified 64-bit signed integer value as an array of 8 bytes in the target endian-order to the destination array.
Public methodCopyBytes(Single, Byte, Int32) Copies the specified single-precision floating point value as an array of 4 bytes in the target endian-order to the destination array.
Public methodCopyBytes(UInt16, Byte, Int32) Copies the specified 16-bit unsigned integer value as an array of 2 bytes in the target endian-order to the destination array.
Public methodCopyBytes(UInt24, Byte, Int32) Copies the specified 24-bit unsigned integer value as an array of 3 bytes in the target endian-order to the destination array.
Public methodCopyBytes(UInt32, Byte, Int32) Copies the specified 32-bit unsigned integer value as an array of 4 bytes in the target endian-order to the destination array.
Public methodCopyBytes(UInt64, Byte, Int32) Copies the specified 64-bit unsigned integer value as an array of 8 bytes in the target endian-order to the destination array.
Public methodCopyBytesT(T, Byte, Int32) Copies the specified primitive type value as an array of bytes in the target endian-order to the destination array.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetBytes(Boolean) Returns the specified Boolean value as an array of bytes in the target endian-order.
Public methodGetBytes(Char) Returns the specified Unicode character value as an array of bytes in the target endian-order.
Public methodGetBytes(Double) Returns the specified double-precision floating point value as an array of bytes in the target endian-order.
Public methodGetBytes(Guid)Obsolete.
Returns the specified Guid value as an array of bytes.
Public methodGetBytes(Int16) Returns the specified 16-bit signed integer value as an array of bytes.
Public methodGetBytes(Int24) Returns the specified 24-bit signed integer value as an array of bytes.
Public methodGetBytes(Int32) Returns the specified 32-bit signed integer value as an array of bytes.
Public methodGetBytes(Int64) Returns the specified 64-bit signed integer value as an array of bytes.
Public methodGetBytes(Single) Returns the specified single-precision floating point value as an array of bytes in the target endian-order.
Public methodGetBytes(UInt16) Returns the specified 16-bit unsigned integer value as an array of bytes.
Public methodGetBytes(UInt24) Returns the specified 24-bit unsigned integer value as an array of bytes.
Public methodGetBytes(UInt32) Returns the specified 32-bit unsigned integer value as an array of bytes.
Public methodGetBytes(UInt64) Returns the specified 64-bit unsigned integer value as an array of bytes.
Public methodGetBytesT(T) Returns the specified value as an array of bytes in the target endian-order.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToBoolean Returns a Boolean value converted from one byte at a specified position in a byte array.
Public methodToChar Returns a Unicode character converted from two bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToDouble Returns a double-precision floating point number converted from eight bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToGuidObsolete.
Returns a Guid converted from sixteen bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToInt16 Returns a 16-bit signed integer converted from two bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToInt24 Returns a 24-bit signed integer converted from three bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToInt32 Returns a 32-bit signed integer converted from four bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToInt64 Returns a 64-bit signed integer converted from eight bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToSingle Returns a single-precision floating point number converted from four bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodToUInt16 Returns a 16-bit unsigned integer converted from two bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToUInt24 Returns a 24-bit unsigned integer converted from three bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToUInt32 Returns a 32-bit unsigned integer converted from four bytes, accounting for target endian-order, at a specified position in a byte array.
Public methodToUInt64 Returns a 64-bit unsigned integer converted from eight bytes, accounting for target endian-order, at a specified position in a byte array.
Top
Fields
 NameDescription
Public fieldStatic memberBigEndianDefault instance of the Big-Endian byte order conversion class.
Public fieldStatic memberLittleEndianDefault instance of the Little-Endian byte order conversion class.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
Intel systems use little-endian byte order, other systems, such as Unix, use big-endian byte ordering. Little-endian ordering means bits are ordered such that the bit whose in-memory representation is right-most is the most-significant-bit in a byte. Big-endian ordering means bits are ordered such that the bit whose in-memory representation is left-most is the most-significant-bit in a byte.
See Also

Reference

GSF Namespace