-
Notifications
You must be signed in to change notification settings - Fork 0
/
PscMode.h
63 lines (54 loc) · 1.8 KB
/
PscMode.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
53
54
55
56
57
58
59
60
61
62
63
//
// Created by sylar on 24-12-24.
//
#ifndef ACE_SIGNAL_PSCMODE_H
#define ACE_SIGNAL_PSCMODE_H
#include "ComStruct.h"
#include "ManaKernel.h"
#include "ComDef.h"
#include "time.h"
#define CPSCMODE_FILE "CPscMode.cpp"
const int MAX_PUSHS = 8; //最大的行人按钮数
/***********************************************************************
CROSS1 running:
Push Button Condiction match
STANDYSTATUS------------->WAITPGSTATUS----------------->PGENABLESTATUS
Time is over
---------->STANDYSTATUS
CROSS2 running:
Push Button Condiction Match
STANDYSTATUS------------>WAITPGSTATUS----------------->PGENABLESTATUS
Time is over Condiction Match
----------->NXTWAITPGSTATUS----------------->NXTPGENABLESTATUS
*************************************************************************/
/*
*信号机psc模式
*/
class CPscMode
{
public:
static CPscMode* CreateInstance();
void DealButton();
void DecTime();
void GoNextStep();
void PscSwitchStatus();
void InitPara();
void DealPSC();
Byte m_ucBtnNum ;
private:
CPscMode();
~CPscMode();
bool m_bStartCntCown; //是否开始倒计时
bool m_bStep1ToStep2; //步伐1到步伐2 true:步伐++ false:步伐--
bool m_bCrossStage1First; //行人阶段在前
bool m_bBoxPush[MAX_PUSHS]; //各个按钮状态
Byte m_ucPscStatus; //PSC 运行状态
Byte m_ucCurStep; //信号机当前步伐号
Byte m_ucStandStep; //标准步伐号
Byte m_ucCrossStep1; //行人通过步伐号1
Byte m_ucCrossStep2; //行人通过步伐号2
time_t m_ucNextTime ; //用于记录行人通行结束时间,用于计算两次行人按钮生效间隔时间。
Byte m_psc_intervaltime ;
CManaKernel* m_pWorkParaManager;
};
#endif //ACE_SIGNAL_PSCMODE_H