UnpackData

(RPC Manager Library)

Description: This method unpacks a stream into an array or set of module instance parameters. Subroutine call only.
Returns: Nothing (see parameters)
Usage: Script Only.
Function Groups: Array,  Stream and Socket
Related to: Pack | Unpack
Format:  \RPCManager\UnpackData(Source, Start, End, Stream [, TruncLen, DataLen]));
Parameters:  
Source
Required. The array to contain the data or the object value of the module whose parameters address variables into which to store the data.
Start
Required. The starting array index or parameter number of the data to unpack (zero-based).
End
Required. The last array index or parameter number of the data to unpack (zero-based).
Stream
Required. The stream that contains the data to be unpacked. The stream must have been generated with the PackData function.
TruncLen
An optional parameter that specifies that all text values and stream values unpacked from the stream will be truncated after the number of bytes specified in this parameter.
DataLen
An optional parameter that specifies an array into which the length of each text and stream value unpacked from the source stream will be stored. Each length is stored at the array index corresponding to the index of the value itself.
For example, if the value which would go in the destination array at index 5 were a text value, its length would be stored at index 5 in the array addressed by this parameter.
Unpacked values of numeric type have Invalid stored in their entry in this array.
Comments: This subroutine is a member of the RPC Manager's Library, and must therefore be prefaced by \RPCManager\, as shown in the "Format" section. If the application you are developing is a script application, the subroutine call must be prefaced by System\RPCManager\, and the System variable must be declared in AppRoot.SRC.
The stream contents to be unpacked by the UnpackData method must have been packed by the PackData method.
If the Source parameter is an array, the data from the stream will be unpacked into that array. If the Source parameter is an object value, the parameters of that object must contain pointers to variables into which the data from the stream will be unpacked.
From VTS 5.20 onwards, this method is a wrapper for the Unpack() statement. Prior to that release, the Unpack() statement was effectively coded in script by this method. New code should use the Unpack() statement, rather than this method.

RPC Manager Service