-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
61 lines (47 loc) · 1.07 KB
/
Copy pathMain.cpp
File metadata and controls
61 lines (47 loc) · 1.07 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
56
57
58
59
60
#include "stdgroup.h"
#include "MotorNM.h"
#include "Motor.h"
#include "Player.h"
#include "CentrifugeTest.h"
using namespace std;
// first change the exmample file
int main(void)
{
// Create MotorNM (No Macro) test object
MotorNM motorNM;
MotorNMData* dataNM = new MotorNMData();
dataNM->speed = 100;
motorNM.SetSpeed(dataNM);
MotorNMData* dataNM2 = new MotorNMData();
dataNM2->speed = 200;
motorNM.SetSpeed(dataNM2);
motorNM.Halt();
motorNM.Halt();
// Create Motor object with macro support
Motor motor;
MotorData* data = new MotorData();
data->speed = 100;
motor.SetSpeed(data);
MotorData* data2 = new MotorData();
data2->speed = 200;
motor.SetSpeed(data2);
motor.Halt();
motor.Halt();
// Create Player instance and call external event functions
Player player;
player.OpenClose();
player.OpenClose();
player.Play();
player.Pause();
player.EndPause();
player.Stop();
player.Play();
player.Play();
player.OpenClose();
// Create CentrifugeTest and start test
CentrifugeTest test;
test.Start();
while (test.IsPollActive())
test.Poll();
return 0;
}