| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*************************************** | ||
| 2 | Auteur : Pierre Aubert | ||
| 3 | Mail : pierre.aubert@lapp.in2p3.fr | ||
| 4 | Licence : CeCILL-C | ||
| 5 | ****************************************/ | ||
| 6 | |||
| 7 | #include "SendDataDaemon.h" | ||
| 8 | |||
| 9 | ///Default constructor of SendDataDaemon | ||
| 10 | 3 | SendDataDaemon::SendDataDaemon(){ | |
| 11 |
1/1✓ Branch 0 (3→4) taken 3 times.
|
3 | initialisationSendDataDaemon(); |
| 12 | 3 | } | |
| 13 | |||
| 14 | ///Destructor of SendDataDaemon | ||
| 15 | 3 | SendDataDaemon::~SendDataDaemon(){ | |
| 16 | |||
| 17 | 3 | } | |
| 18 | |||
| 19 | ///Extra processing (here to test Ping-Pong mode) | ||
| 20 | 4 | void SendDataDaemon::extraLoopProcessing(){ | |
| 21 | //Let's send the Ping message to get the answer | ||
| 22 | 4 | sendInt(); | |
| 23 | 4 | } | |
| 24 | |||
| 25 | ///Initialisation function of the class SendDataDaemon | ||
| 26 | 3 | void SendDataDaemon::initialisationSendDataDaemon(){ | |
| 27 | 3 | p_isFirstSend = true; | |
| 28 | 3 | } | |
| 29 | |||
| 30 | ///Send a Ping message | ||
| 31 | 4 | void SendDataDaemon::sendInt(){ | |
| 32 |
2/2✓ Branch 0 (2→3) taken 1 times.
✓ Branch 1 (2→4) taken 3 times.
|
4 | if(!p_isFirstSend){ |
| 33 | 1 | return; | |
| 34 | } | ||
| 35 | 3 | int data = 42; | |
| 36 |
6/6✓ Branch 0 (6→7) taken 3 times.
✓ Branch 2 (9→10) taken 3 times.
✓ Branch 4 (12→13) taken 3 times.
✓ Branch 6 (13→14) taken 3 times.
✓ Branch 8 (14→15) taken 3 times.
✓ Branch 10 (15→16) taken 3 times.
|
15 | phoenix_assert(sendValue("test", data)); |
| 37 | 3 | p_isFirstSend = false; | |
| 38 | } | ||
| 39 | |||
| 40 |