-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdriver.h
56 lines (45 loc) · 1.14 KB
/
driver.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
/*******************************************************************
*
* DESCRIPTION: Atomic Model Driver
*
* AUTHOR: Ariel Gonzalez
*
* EMAIL: mailto://egonzalz@dc.uba.ar
* mailto://agonzalez@tecnet-ibermatica.com.ar
*
* DATE: 26/9/2003
*
*******************************************************************/
#ifndef __DRIVER_H
#define __DRIVER_H
#include "atomic.h" // class Atomic
#include "datos.h" // tipos de datos y conversiones
enum estado_drv { ocupado, libre, inactivo };
class Driver : public Atomic
{
public:
Driver( const string &name = "Driver" ); //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 &pedido;
Port &respuesta;
// parametros
Time tiempo_respuesta;
// variables de estado
estado_drv estado_driver;
pedido_drv pedido_actual;
}; // class Driver
// ** inline ** //
inline
string Driver::className() const
{
return "Driver" ;
}
#endif //__DRIVER_H