AlpacaToolsToByteArray(Array, Int32, UInt32, UInt32, AlpacaErrors, String) Method
Alpaca Extension - Convert the array or error message to a byte array for transmission to a client
Namespace: ASCOM.Common.AlpacaAssembly: ASCOM.Common (in ASCOM.Common.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
public static byte[] ToByteArray(
this Array imageArray,
int metadataVersion,
uint clientTransactionID,
uint serverTransactionID,
AlpacaErrors errorNumber,
string errorMessage
)
<ExtensionAttribute>
Public Shared Function ToByteArray (
imageArray As Array,
metadataVersion As Integer,
clientTransactionID As UInteger,
serverTransactionID As UInteger,
errorNumber As AlpacaErrors,
errorMessage As String
) As Byte()
- imageArray Array
- The 2D or 3D source image array. (Ignored when returning an error.)
- metadataVersion Int32
- Metadata version to use (Currently 1).
- clientTransactionID UInt32
- Client's transaction ID.
- serverTransactionID UInt32
- Device's transaction ID.
- errorNumber AlpacaErrors
- Error number. 0 for success, non-zero for an error.
- errorMessage String
- Error message. Empty string for success, error message for an error.
ByteByte array prefixed with array metadata.In Visual Basic and C#, you can call this method as an instance method on any object of type
Array. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Int32 source arrays where all elements have Int16, UInt16 or Byte values will automatically be converted to the smaller
data size for transmission in order to improve performance and reduce network traffic.
Int16 and UInt16 source arrays that only have Byte values will similarly be converted to the smaller
data size for transmission.
All other element types are transmitted as supplied.
Supported in: 2.0