In order to construct a language environment, you will almost always
be required to participate in network communication. To do so you
must:
- Find the network that interests you, and figure out which
signals circulate within this network and for what events.
- Define an stnode class whose input and output ports correspond
to the signals you want to listen to or emit within the network. This
is done by the function st-declare.
- Create an instance of this class with the function st-create.
- Encapsulate the object you wish with the stnode instance. You
may use the function st-store-and-set-action to simultaneously
encapsulate the object and define the input callback package for the
stnode. When an input signal arrives on the stnode, the name of the
input callback function called is the callback package followed by the
port name. Once an stnode encapsulates an object, you may retrieve the
object by calling (st-object stnode) (usually done in the
callback function whose first argument is the stnode).
- Include the stnode in the network with the function st-include.
Below we demonstrate this procedure.