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.

languages like Python it should be possible to represent LabRAD data seamlessly<br />

using its native counterpart (if available). In statically typed languages like Delphi<br />

and Java on the other hand, an interface to a special data object needs to be<br />

designed that makes the access to the contained data as painless as possible while<br />

still providing good performance. Dynamic data types like Variants can sometimes<br />

be used here to make implementation more natural.<br />

Thanks to Variants, for<br />

example, it is possible in LabVIEW to simply pass any supported native data<br />

structure directly into the Packet assembly functions. Unfortunately, converting<br />

received Packets back into LabVIEW data is much less elegant as it requires<br />

explicit type casting.<br />

Since the LabRAD Protocol specifies target Servers and Settings by ID rather<br />

than name, all APIs should implement seamless, preferably cached, lookup <strong>of</strong><br />

the required IDs at runtime. This not only makes the code more readable and<br />

thus easier to troubleshoot, but also facilitates backwards compatible changes to<br />

Servers. To make caching easier, the LabRAD Manager preserves a Server’s ID<br />

across reconnects and provides mechanisms to announce the connection and disconnection<br />

<strong>of</strong> Server Modules. In addition, IDs can be looked up via the “Lookup”<br />

Setting (ID 3) <strong>of</strong> the LabRAD Manager (ID 1).<br />

The LabRAD APIs should also seamlessly handle Request IDs. To allow for<br />

pipelining, it is possible for a Client to send multiple Requests to a Server before<br />

147

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

Saved successfully!

Ooh no, something went wrong!