-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.h
More file actions
55 lines (46 loc) · 1.04 KB
/
server.h
File metadata and controls
55 lines (46 loc) · 1.04 KB
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
/*******************************************************************
*
* DESCRIPTION: Server Model
*
* AUTHOR: Khaldoon Al-Zoubi
*
*
* DATE: 20/11/2003
*
*******************************************************************/
#ifndef __SERVER_H
#define __SERVER_H
#include "atomic.h" // class Atomic
/** forward declarations **/
class Distribution ;
class Server : public Atomic
{
public:
Server( const string &name = "Server" ); //Default constructor
~Server ();
virtual string className() const ;
protected:
Model &initFunction();
Model &externalFunction( const ExternalMessage & );
Model &internalFunction( const InternalMessage & );
Model &outputFunction( const InternalMessage & );
private:
const Port ∈
const Port &beReady;
Port &out;
Port &request;
//Time delayTime;
int myId; // The id of this server.
double value;
bool ready;
Distribution *dist ;
Distribution &distribution()
{return *dist;}
}; // class Server
// ** inline ** //
inline
string Server::className() const
{
return "Server" ;
}
#endif //__SERVER_H