GXDN: Gurux Developer Network
ExtractData Method (data, type, pos, count)
NamespacesGurux.PacketGXPacketExtractData(Object%, VariantType, Int32, Int32)
Extracts the data of the packet into an object.
Parameters
data ( Object %)
Exported data.
type (VariantType)
Type of exported data.
pos (Int32)
Zero based index, in the data part, where exporting is started.
count (Int32)
Determines how many items are exported. Value -1 indicates that all items are copied.
Return Value
Returns an error, if there is not enough data in the data part.
Remarks
Use this method to export the data part of the packet. If the data is given in a hexadecimal string every byte is separated with a space.
Examples
CopyVBScript
'Extract three bytes as byte array.
GXPacket1.ExtractData data, GX_VT_BYTE, 0, 3

'Extract all data as hex string. Starting from position 1.
GXPacket1.ExtractData data, GX_VT_HEX_STR, 1, -1
See Also

Assembly: Gurux.Client (Module: Gurux.Client) Version: 5.0.0.1