[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

CxObjects are the basic building blocks used to construct a commodity.  A
commodity uses CxObjects to take care of all manipulations of cxmessages.
When a CxMessage "arrives" at a CxObject, that CxObject carries out its
primitive action and then, if it has not deleted the CxMessage, it passes
the CxMessage on to the next CxObject.  A commodity links together
CxObjects into a tree, organizing these simple action objects to perform
some higher function.

A CxObject is in one of two states, active or inactive.  An active
CxObject performs its primitive action every time it receives a cxmessage.
If a CxObject is inactive, CxMessages bypass it, continuing to the
CxObject that follows the inactive one.  By default, all CxObjects except
the type called brokers are created in the active state.

Currently, there are seven types of CxObjects (Table 31-1).


   Object Type   Purpose
   -----------   -------
    broker       registers a new commodity with the commodity network
    filter       accepts or rejects input events based on criteria set
                 up by the application
    sender       sends a message to a message port
    translate    replaces the input event with a different one
    signal       signals a task
    custom       calls a custom function provided by the commodity
    debug        sends debug information out the serial port


                 Table 31-1: Commodities Exchange Object Types