Perl Mo Api


Description:
Communication with Orb based services is implemented via these seven XSUBs (in XS parlance).    Even though these XSUB names are prefixed with mo they actually call msg functions.    Sends and Receives are atomic.
The array refs used to send and receive data represent entire messages.    Each hash represents a record in the message object, and each key in that hash represents a field in the message object.
Look here and here for more detailed information about message objects and the message layer.

moStart( configNameString )
Read the configuration file and, if defined, return the environment as a hash ref.

moClose()
Close all connections and clean up after yourself.

moSend( arrayRef, ServerString, Type, Code )
Create a message object destined for the server (defined in the configuration file) named by "Server", and containing type and code. Insert each field from the supplied hash into the message then transmit it. The Perl variables used to send and receive data are arrays of hash refs, where each hash represents a message object record, each hash key is a field in that record, and the array of hash refs represents an entire message.

moRtrReq( arrayRef, Server, xType, xCode, rtrPath )
Create a message object destined for the server at the end of "rtrPath". When the message reaches the specified server, use "xType" and "xCode" as type and code. Server must be the local Orb (usually 'Broker': config file dependent). Insert each field from the supplied array of hash refs into the message then transmit it.

moRecv( timeout )
Wait until the timeout period (in milliseconds) expires or a message is received. If the time expires, return an undefined else return an array reference of hash refs. Each hash contains one message object record (name value pairs).

moTrc( lev, msgString )
If the level is equal to or greater than the current process' trace level send the msgString to the trace log facility (either trcLog via the daemon, or processName.trc.

moTrcErr( msgString )
Send the msgString to the trace error facility (either errLog via the daemon, or processName.err.