PTK

Protocol Transport
Login

Protocol Transport Plugin Interface

Business Side

The common protocol routines are part of PTK on the business logic side. A particular transport must be implemented:

::ptk::protocol::remote args

    The routine that is called to send a "command" with its arguments to the display side. The signature is that it takes "one" parameter: args.

::ptk::protocol::start ?args?

    The routine that is called to start the protocol. The signature is up to the particular protocol as to what, if any, parameters it takes.

Note: the routines must be defined after the PTK package is required since the PTK package defines stubs for the routines.

Display Side

execute initialize remote renderer sharedObject

The display side protocol handler must be implemented as appropriate. The following commands must be implemented:

::Protocol execute script

    This command will execute script in the display side context.

::Protocol initialize ?args...?

    This command handles any required initialization.

::Protocol remote script

    This command will send the Tcl script tot the business side to be executed.

::Protocol renderer args

    This command calls the display side renderer module with the specified arguments..

::Protocol sharedObject subCommand id ?args?

    This command invokes the subCommand on the shared object specifeied byid with the optional args. The following subCommands must be implemented:

    changeState id changeDict

      This command processes a change from the business die to the state of shared object id as specified by the dictionary changeDict.

    configure id localCb

      This command associates the display side command localCb to be invoked when the business side changes the state of the shared object id.

    destroyid

      This command will destroy the shared object id.

    initializeid objectDict

      This command request that the shared object id be created/initialized with the contents specified by objectDict.