Design and Development of a Diagnostics Client for a Beam Loss ...
Design and Development of a Diagnostics Client for a Beam Loss ...
Design and Development of a Diagnostics Client for a Beam Loss ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Design</strong> <strong>and</strong> <strong>Development</strong> <strong>of</strong> a <strong>Diagnostics</strong> <strong>Client</strong> <strong>for</strong> a <strong>Beam</strong> <strong>Loss</strong> Measurement System at CERN<br />
that a safe execution with no conflicts is guaranteed.<br />
1. Read Data from the socket(s) –TCP always, UDP if applicable;<br />
2. Distribute acquisition/status data;<br />
2.1 Update status panels if enough data;<br />
2.2 Offer Status_Log_Queue filled buffer;<br />
2.3 Condition-signal Status_Log_Queue;<br />
3. Offer Plotting_Queue buffer;<br />
4. Condition-Signal Plotting_Queue;<br />
5. Goto 1;<br />
1. while Plotting_Queue.isEmpty do<br />
wait_<strong>for</strong>_condition_signal<br />
end<br />
2. Poll buffer;<br />
3. Offer Logging_Queue buffer;<br />
4. Condition_Signal Logging_Queue;<br />
5. Process buffer <strong>and</strong> plot data;<br />
6. Goto 1;<br />
1. while Logging_Queue.isEmpty do<br />
wait_<strong>for</strong>_condition_signal<br />
end<br />
2.Poll buffer;<br />
Algorithm 1: Swingworker-Socket Thread<br />
Algorithm 2: Plotting Thread<br />
3.Process buffer <strong>and</strong> log acquisition data into files;<br />
3.1 Poll status data from the Status_Log_Queue <strong>and</strong> log them into files;<br />
4. Goto 1;<br />
Algorithm 3: Plotting Thread<br />
The plotting thread uses the settings given by the user to calculate the average, maximum<br />
<strong>and</strong> minimum values <strong>of</strong> incoming data <strong>and</strong> then plots them in the graph <strong>of</strong> the online panel.<br />
This data reduction depends on the display width <strong>of</strong> the graph <strong>and</strong> on the width <strong>of</strong> the<br />
observation window.<br />
On the other h<strong>and</strong>, the logging thread is responsible <strong>for</strong> storing all the data into files (ac-<br />
quisition <strong>and</strong> status) without data reduction. The data stored in these files will be used<br />
<strong>for</strong> the <strong>of</strong>fline data display panel, which will be discussed later. Only processed data are<br />
plotted both online <strong>and</strong> <strong>of</strong>fline. A special <strong>for</strong>mat <strong>for</strong> the data storage was discussed <strong>and</strong><br />
agreed. The number <strong>of</strong> the BLEDP packets in the storage file is configurable with default<br />
value 500000 <strong>for</strong> the single-channel <strong>and</strong> 4000000 <strong>for</strong> the multi-channel transmission. In<br />
the default setting the client application creates one file per each second <strong>of</strong> acquisition.<br />
The BLEDP packets are written into files with their header. Each file name is composed<br />
Emmanouil I. Angelogiannopoulos 37