PCCom Library: 3 Staying Informed

Up: GEOS SDK TechDocs | Up | Prev: 2 What To Do

The sections above tell you everything you need to let your geode interact with pccom. It is possible to do more: your geode can receive notification whenever the pccom tool would display some text. The pccom tool displays text to show the user what's going on. Text signals the successful or unsuccessful completion of certain operations; a spinning baton shows that a file transfer is in progress. Your geode can also find out if the machine on the other side of the pccom link has quit pccom.

When calling PCCOMINIT(), your geode can specify an object which should receive notification when pccom has text to display or senses that the other side of the pccom link has quit. If an object is so specified, it will receive notification messages at these times. You must also set the PCComInitFlags argument to PCCOMINIT() such that the appropriate kinds of notification will be sent; there is one flag which asks for display text notification and another flag which asks for notification when the other side of the pccom connection exits.

Notification will come in the form of MSG_META_NOTIFY or MSG_META_NOTIFY_WITH_DATA_BLOCK . There are three possible forms of notification:

MSG_META_NOTIFY: GWNT_PCCOM_DISPLAY_CHAR
If the passed notification type is GWNT_PCCOM_DISPLAY_CHAR, then the notification's data word contains a character that pccom would display.
MSG_META_NOTIFY_WITH_DATA_BLOCK : GWNT_PCCOM_DISPLAY_STRING
If the passed notification type is GWNT_PCCOM_DISPLAY_STRING, then the data in the notification's data block is a string of characters.
MSG_META_NOTIFY : GWNT_PCCOM_EXIT_PCCOM
If the passed notification type is GWNT_PCCOM_EXIT_PCCOM, then the pccom process on the other side of the pccom connection has exited; the notification's data word contains a PCComReturnType indicating the success the other side had in exiting. The other side of the connection signals that it is exiting by sending an EX escape code over the pccom connection. A data value of PCCRT_NO_ERROR is a sign of a successful exit; other return values might signal that the exit was the result of an error.
 

Up: GEOS SDK TechDocs | Up | Prev: 2 What To Do