27.09.2014 Views

PDF (double-sided) - Physics Department, UCSB - University of ...

PDF (double-sided) - Physics Department, UCSB - University of ...

PDF (double-sided) - Physics Department, UCSB - University of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

structure kept in the Server that holds the collection <strong>of</strong> all relevant configuration<br />

data.<br />

As far as the LabRAD Protocol is concerned, a Context is nothing more than<br />

a Cluster <strong>of</strong> two Words (ww). When forwarding Packets, the LabRAD Manager<br />

makes the following alteration to a Packet’s Context before sending it on: For<br />

incoming Packets where the first Context Word is 0, the LabRAD Manager sets<br />

it to the ID <strong>of</strong> the source Module. For outgoing Packets where the first Context<br />

Word is equal to the ID <strong>of</strong> the target Module, the Manager sets it to 0. Clients<br />

will usually use 0 as the first Context Word. Servers will then receive Requests<br />

“in a Context” where the first Word is equal to the ID <strong>of</strong> the Client that sent<br />

the Request. If a Server needs to make secondary Requests to fulfill the original<br />

Request, it can choose whether to make these in its own Context (first Word<br />

equals 0) or in the Context <strong>of</strong> the original Request. The latter can make sense if<br />

this Server simply assists Clients in the communication with an underlying Server.<br />

The Client, for example, selects the device with the underlying Server and does<br />

some initial setup and then calls the assistant Server to complete a more involved<br />

part <strong>of</strong> the device setup.<br />

The second Word <strong>of</strong> a Context can be chosen by the Client at will and allows<br />

this Client to have multiple simultaneous Contexts open with any given Server.<br />

Apart from being generally useful, this feature is indispensable for the imple-<br />

149

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!