23.11.2012 Views

The FEE Server Control Engine of the ALICE-TRD - Westfälische ...

The FEE Server Control Engine of the ALICE-TRD - Westfälische ...

The FEE Server Control Engine of the ALICE-TRD - Westfälische ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

5 <strong>The</strong> <strong>FEE</strong><strong>Server</strong> <strong>Control</strong> <strong>Engine</strong><br />

access it creates an instance <strong>of</strong> SCSNGuardian. After <strong>the</strong> access is not needed anymore <strong>the</strong><br />

thread deletes <strong>the</strong> instance.<br />

Using <strong>the</strong> destructor to unlock <strong>the</strong> mutex has an advantage. When a function that<br />

locked <strong>the</strong> mutex is left, <strong>the</strong> mutex is released, independent <strong>of</strong> how <strong>the</strong> function is left –<br />

by a usual return or by throwing an exception.<br />

5.3.3 Sending <strong>of</strong> SCSN Commands<br />

SCSNBus::execute()<br />

next linkpair<br />

SCSNBus::selectLinkpair()<br />

SCSNBus::processCmds()<br />

different conversion functions<br />

alimcm2slave()<br />

SCSNBusBridge::querySlave()<br />

create <strong>the</strong> frame and store it in<br />

<strong>the</strong> send buffer<br />

SCSNBus::sendFast()<br />

SCSNBus::sendFastNow()<br />

SCSNBus::checkFrames()<br />

SCSNBus::copyFrameData()<br />

Figure 5.7: <strong>Control</strong> flow within <strong>the</strong> SCSN Bus class system for sending SCSN commands. <strong>The</strong><br />

control flow (solid arrows) is simplified and only <strong>the</strong> main stepts are shown. <strong>The</strong><br />

dashed lines are for better orientation only.<br />

<strong>The</strong> class SCSNBus provides <strong>the</strong> public function void execute(struct cfdat_command * ,<br />

unsigned, int) to send a list <strong>of</strong> SCSN commands. <strong>The</strong> first parameter is a pointer to <strong>the</strong> list<br />

65

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

Saved successfully!

Ooh no, something went wrong!