PackData 

Obsolete – Use the Pack instead

                        (RPC Manager Library)

Description:              This method packs an array or set of module instance parameters into a stream.

Returns:                    Nothing

Usage:                       Subroutine call

Format:                      \RPCManager\PackData(Source, Start, End, &Stream);

Parameters:             Source    { array or object value }  { required }  { no default }

                                      An array containing the data or the object value of the module whose parameters are to be packed.

                                    Start    { numeric }  { required }  { no default }

                                      The zero-based starting array index, or parameter number of the data to pack.

                                    End    { numeric }  { required }  { no default }

                                      The zero-based last array index or parameter number of the data to pack.

                                    &Stream     { pointer }  { required }  { no default }

                                      A pointer to a variable holding the stream into which the data will be packed. The variable may also hold Invalid.

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 AppMod.src.

                             Stream must be a pointer to a variable, not simply the name of a variable that holds a stream. This is because the PackData method will create a new stream under certain circumstances and store the packed data in it.

                             If the variable that Stream addresses contains a stream, then the data will be packed into that stream.

                             If the variable that Stream addresses contains Invalid, Pack will create a new buffer stream, pack the data into it, and store the new stream in the variable pointed at by Stream.

                             If a buffer stream is supplied, or Pack creates a buffer stream, it will be replaced by a temporary file stream if the output stream exceeds 2Mb. This provides a balance between performance and memory use.

                             If a stream is provided, packing starts at the current stream position. After packing, the stream's current position is left at the end of the packed data.

                             Only variables described in Permitted Data Types in RPC will be packed. Arrays of those types, up to and including 3 dimensions, will also be packed. Any illegal values will be packed as Invalid.

                             From VTS 5.20 onwards, this method is a wrapper for the Pack() statement. Prior to the release of VTS 5.20, the Pack() statement was effectively coded in script by this method. New code should use the Pack() statement, rather than this method.

See Also:

UnpackData | Pack