-
Notifications
You must be signed in to change notification settings - Fork 0
/
Application.h
52 lines (46 loc) · 917 Bytes
/
Application.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
/**********************************
* FILE NAME: Application.h
*
* DESCRIPTION: Header file of all classes pertaining to the Application Layer
**********************************/
#ifndef _APPLICATION_H_
#define _APPLICATION_H_
#include "stdincludes.h"
#include "MP1Node.h"
#include "Log.h"
#include "Params.h"
#include "Member.h"
#include "EmulNet.h"
#include "Queue.h"
/**
* global variables
*/
int nodeCount = 0;
/*
* Macros
*/
#define ARGS_COUNT 2
#define TOTAL_RUNNING_TIME 700
/**
* CLASS NAME: Application
*
* DESCRIPTION: Application layer of the distributed system
*/
class Application{
private:
// Address for introduction to the group
// Coordinator Node
char JOINADDR[30];
EmulNet *en;
Log *log;
MP1Node **mp1;
Params *par;
public:
Application(char *);
virtual ~Application();
Address getjoinaddr();
int run();
void mp1Run();
void fail();
};
#endif /* _APPLICATION_H__ */