PackRPC
(RPC Manager Library)
| Description: | Packs an RPC call and a set of parameters into a stream. Subroutine call only. |
| Returns: | BuffStream |
Usage: ![]() |
Script Only. |
| Function Groups: | Network, Stream and Socket |
| Related to: | RunPack |
Format: ![]() |
\RPCManager\PackRPC(Stream, ModuleName, Scope [, Parameters]); |
| Parameters: |
| Stream |
| Required. The initial packed RPC stream. The RPC specified in this call will be appended onto the end of this stream. If Invalid, a new BuffStream will be created to hold the RPC. |
| ModuleName |
| Required. The textual name of the RPC subroutine to be executed. Must be valid. |
| ModuleContext |
| Required. The context in which the "ModuleName" will be executed. The "base" context for a VTScada layer-based application is "Code". For a non-VTScada (pure script) application, the base context is "\System". Must be valid. |
| Parameters |
| Required. A set of up to 32 parameters to the RPC subroutine. Can be any mixture of the legal types. Supplying a parameter of an illegal type will cause it to be replaced with Invalid when the RPC subroutine is invoked. |
| 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 return value from this method is a BuffStream containing the original contents as specified in the Stream parameter with the new RPC appended. This can be used to build a stream of RPCs for transmission as one atomic unit. |
