[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