-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCowCatcher.h
More file actions
46 lines (39 loc) · 907 Bytes
/
CowCatcher.h
File metadata and controls
46 lines (39 loc) · 907 Bytes
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
#ifndef COW_CATCHER_H__
#define COW_CATCHER_H__
#include "DoubleSolenoid.h"
#include <iostream>
#include <fstream>
#include "DigitalInput.h"
#include "Solenoid.h"
class CowCatcher{
public:
CowCatcher(
int updownnum_forward,
int updownnum_reverse,
int Lock_forward,
int Lock_reverse,
int downPosIO,
int upPosIO,
int lockedIO,
int unlockedIO);
// Note: Only call RaiseLower or ManualOperate,
// not both!
void RaiseLower(bool sw);
void ManualOperate( bool should_raise,
bool should_lower,
bool should_lock,
bool should_unlock );
void LogHeaders(ofstream &fout);
void Log(ofstream &fout);
void lock();
void unlock();
private:
DoubleSolenoid * UpDown;
DoubleSolenoid * Lock;
DigitalInput * downPos;
DigitalInput * upPos;
DigitalInput * locked1;
DigitalInput * locked2;
int m_state;
};
#endif