-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhsclient.h
62 lines (51 loc) · 1.3 KB
/
hsclient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*******************************************************************
*
* DESCRIPTION: Atomic Model HSClient
*
* AUTHOR: Ariel Gonzalez
*
* EMAIL: mailto://egonzalz@dc.uba.ar
* mailto://agonzalez@tecnet-ibermatica.com.ar
*
* DATE: 26/9/2003
*
*******************************************************************/
#ifndef __HSCLIENT_H
#define __HSCLIENT_H
#include "atomic.h" // class Atomic
#include "datos.h" // tipos de datos y conversiones
enum estado_hsc { hsc_inactivo, hsc_recibiendo, hsc_poleando };
class HSClient : public Atomic
{
public:
HSClient( const string &name = "HSClient" ); //Default constructor
virtual string className() const ;
protected:
Model &initFunction();
Model &externalFunction( const ExternalMessage & );
Model &internalFunction( const InternalMessage & );
Model &outputFunction( const InternalMessage & );
private:
const Port &start;
const Port &stop;
const Port &red_in;
Port &nombre_logico;
Port &red_out;
// parametros
Time poll_time;
int nodo_hs;
int nodo_hs_prim;
int nodo_hs_sec;
// variables de estado
int polear_primario;
int cant_poleos_sin_respuesta;
estado_hsc estado_hsclient;
Value ultima_respuesta;
}; // class HSClient
// ** inline ** //
inline
string HSClient::className() const
{
return "HSClient" ;
}
#endif //__HSCLIENT_H