-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhsserver.h
68 lines (57 loc) · 1.49 KB
/
hsserver.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
63
64
65
66
67
68
/*******************************************************************
*
* DESCRIPTION: Atomic Model HSServer
*
reg* AUTHOR: Ariel Gonzalez
*
* EMAIL: mailto://egonzalz@dc.uba.ar
* mailto://agonzalez@tecnet-ibermatica.com.ar
*
* DATE: 26/9/2003
*
*******************************************************************/
#ifndef __HSSERVER_H
#define __HSSERVER_H
#include "atomic.h" // class Atomic
#include "datos.h" // tipos de datos y conversiones
enum estado_hss { hss_inactivo, hss_inicio, hss_recibiendo, hss_poleando, hss_switcheando, hss_switcheando_1 };
class HSServer : public Atomic
{
public:
HSServer( const string &name = "HSServer" ); //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 &failover_master;
const Port &failover_slave;
const Port &red_in;
Port &start_drv;
Port &stop_drv;
Port &reload_pdb;
Port &nombre_logico;
Port &red_out;
// parametros
Time poll_time;
int max_reintentos;
int mi_nombre_fisico;
configuracion_nodo mi_config;
// variables de estado
estado_hss estado_hsserver;
int hay_poleo_pendiente;
int poleos_fallidos;
int proximo_estado;
Value ultima_respuesta;
}; // class HSServer
// ** inline ** //
inline
string HSServer::className() const
{
return "HSServer" ;
}
#endif //__HSSERVER_H