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.

Architecture to manage network connections with maximum performance. The<br />

second thread, the GUI thread, handles the user interface. It keeps the list <strong>of</strong><br />

active connections current and makes sure the application stays responsive to<br />

user interaction. These two threads interact “rarely” and in a way that minimizes<br />

impact on the network thread.<br />

The LabRAD Manager provides several features, the most important <strong>of</strong> which<br />

is Packet routing between Server and Client Modules. In the process <strong>of</strong> routing,<br />

the Manager ensures that the data contained in a Request Packet matches the<br />

types registered by the Server as acceptable. During this check, the Manager also<br />

converts the units <strong>of</strong> any Values or Complex Values that are sent to a Setting<br />

that specifies units in the accepted types. For this, the LabRAD Manager parses<br />

composite unit strings into their base components and respective fractional exponents.<br />

For example “m/s ∧ 2” will get parsed into “m” with exponent 1 and<br />

“s” with exponent -2. This is done for the source unit string and the target unit<br />

string. To find the conversion factor the Manager divides the source units by the<br />

target units by subtracting the exponents <strong>of</strong> all base components in the target<br />

units from the exponents in the source units. All base components that end up<br />

with exponent 0 are then dropped. Now, for the first time, the Manager tries to<br />

identify the base components and to convert them to SI units. This allows the<br />

Manager to handle unsupported units as long as they drop out during the division<br />

144

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

Saved successfully!

Ooh no, something went wrong!