Message Switching

The src code partitions the events into categories such as command, request, message, or comment; the tag matches according to event; and, for events originally occurring on the upstream side of the shim, the ver code corresponds to the IB tws api request or message version. A common idiom for downstream scripts splits output text on vertical bars, and then switches on the source and tag codes.

Since the tag and ver values for requests and messages are defined by the IB tws api, their values are found back in Tables 4.1 and [*]. The request and message tags are every bit as stable in the design for the shim as for the IB tws api, so hardwiring them into downstream scripts is probably reasonable.

The command and comment codes, on the other hand, are specific to the shim, and have changed a number of times over the course of development. For this reason, I recommend that downstream developers match directly on the command verb text if they need to switch on command types, Table [*]. The internally generated events are the least stable part of the event design [*], and so are not covered here yet.

Bill Pippin 2010-01-14