-
Notifications
You must be signed in to change notification settings - Fork 1
/
Motor.h
45 lines (36 loc) · 878 Bytes
/
Motor.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
//
// Motor.h
// StateMachine
//
// Created by Andrew III Lyne on 3/18/14.
// Copyright (c) 2014 Andrew III Lyne. All rights reserved.
//
#ifndef __StateMachine__Motor__
#define __StateMachine__Motor__
#include <iostream>
#include "EventGenerator.h"
#include <iostream>
#include "EventGenerator.h"
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <string>
#include <iostream>
#include "mutex.h"
#include <queue>
class Motor: public EventGenerator{
private:
void sendCMD(char c);
void raiseDoorOpenEvent();
void raiseDoorClosedEvent();
public:
Motor( EventQueue* queue);
void* runProcess (void* args);
void enableMotorUp();
void enableMotorDown();
void disengageMotor();
void raiseMotorOverdriveEvent();
void shutDown();
};
#endif /* defined(__StateMachine__Motor__) */