LogService
libdadi: utility tools for distributed applications
PingThread.hh
1 /****************************************************************************/
2 /* PingThread header class */
3 /* */
4 /* Author(s): */
5 /* - Georg Hoesch (hoesch@in.tum.de) */
6 /* - Cyrille Pontvieux (cyrille.pontvieux@edu.univ-fcomte.fr) */
7 /* */
8 /* This file is part of DIET . */
9 /* */
10 /* Copyright (C) 2000-2003 ENS Lyon, LIFC, INSA, INRIA and SysFera (2000) */
11 /* */
12 /* - Frederic.Desprez@ens-lyon.fr (Project Manager) */
13 /* - Eddy.Caron@ens-lyon.fr (Technical Manager) */
14 /* - Tech@sysfera.com (Maintainer and Technical Support) */
15 /* */
16 /* This software is a computer program whose purpose is to provide an */
17 /* distributed logging services. */
18 /* */
19 /* */
20 /* This software is governed by the CeCILL license under French law and */
21 /* abiding by the rules of distribution of free software. You can use, */
22 /* modify and/ or redistribute the software under the terms of the CeCILL */
23 /* license as circulated by CEA, CNRS and INRIA at the following URL */
24 /* "http://www.cecill.info". */
25 /* */
26 /* As a counterpart to the access to the source code and rights to copy, */
27 /* modify and redistribute granted by the license, users are provided */
28 /* only with a limited warranty and the software's author, the holder */
29 /* of the economic rights, and the successive licensors have only */
30 /* limited liability. */
31 /* */
32 /* In this respect, the user's attention is drawn to the risks */
33 /* associated with loading, using, modifying and/or developing or */
34 /* reproducing the software by the user in light of its specific status */
35 /* of free software, that may mean that it is complicated to */
36 /* manipulate, and that also therefore means that it is reserved for */
37 /* developers and experienced professionals having in-depth computer */
38 /* knowledge. Users are therefore encouraged to load and test the */
39 /* software's suitability as regards their requirements in conditions */
40 /* enabling the security of their systems and/or data to be ensured and, */
41 /* more generally, to use and operate it in the same conditions as */
42 /* regards security. */
43 /* */
44 /* The fact that you are presently reading this means that you have had */
45 /* knowledge of the CeCILL license and that you accept its terms. */
46 /* */
47 /****************************************************************************/
48 /* $Id$
49  * $Log$
50  * Revision 1.1 2010/11/10 03:02:28 kcoulomb
51  * Add missing files
52  *
53  * Revision 1.2 2007/08/31 16:41:17 bdepardo
54  * When trying to add a new component, we check if the name of the component exists and if the component is reachable
55  * - it the name already exists:
56  * - if the component is reachable, then we do not connect the new component
57  * - else we consider that the component is lost, and we delete the old component ant add the new one
58  * - else add the component
59  *
60  * Revision 1.1 2004/01/09 11:07:12 ghoesch
61  * Restructured the whole LogService source tree.
62  * Added autotools make process. Cleaned up code.
63  * Removed some testers. Ready to release.
64  *
65  ****************************************************************************/
66 
67 #ifndef _PINGTHREAD_HH_
68 #define _PINGTHREAD_HH_
69 
70 #include <omnithread.h>
71 #include "LogTypes.hh"
72 #include "LogComponent.hh"
73 
74 class PingThread:public omni_thread {
75 public:
76  explicit PingThread(LogComponentBase* LCB);
77 
78  ~PingThread();
79 
80  void
81  startThread();
82 
83  void
84  stopThread();
85 
86 private:
87  void*
88  run_undetached(void* params);
89 
91  getLocalTime();
92 
93  LogComponentBase* LCB;
94  char* name;
95  bool threadRunning;
96 };
97 
98 
99 #endif
Definition: LogComponentBase.hh:94
Definition: LogTypes.hh:57
Definition: PingThread.hh:74