-
Notifications
You must be signed in to change notification settings - Fork 0
/
PowerBoard.h
68 lines (54 loc) · 1.96 KB
/
PowerBoard.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
64
65
66
67
68
//
// Created by sylar on 24-12-24.
//
#ifndef ACE_SIGNAL_POWERBOARD_H
#define ACE_SIGNAL_POWERBOARD_H
#include "ComDef.h"
#include <ace/Thread_Mutex.h>
#include <ace/OS.h>
#define POWERBOARD_DEBUG
class CPowerBoard
{
public:
static CPowerBoard* CreateInstance();
public:
//电压数据,电压状态
void CheckVoltage();
//主控板请求电源模块发送配置数据
void GetPowerBoardCfg();
//主控板发送给电源模块配置数据
void SetPowerBoardCfg();
void SetPowerCfgData(Byte m_ucWarnHighVol,Byte m_ucWarnLowVol,Byte m_ucVolPlan,Byte m_ucDogCfg);
//广播心跳
void HeartBeat();
//接收电源板的Can数据并处理
void RecvPowerCan(Byte ucBoardAddr,SCanFrame sRecvCanTmp);
int GetStongVoltage() ;//获取高电压ADD:201309281540
void GetPowerVer(Byte PowerBdindex); //获取电源板版本
static Byte iHeartBeat ;
private:
CPowerBoard();
~CPowerBoard();
public:
//input
Byte m_iSetWarnHighVol; //高压预警电压(设置值)
Byte m_iSetWarnLowVol; //低压预警电压(设置值)
Byte m_ucSetStongHighVolPlan; //强电高压预案
Byte m_ucSetStongLowVolPlan; //强电低压预案
Byte m_ucSetWeakHighVolPlan; //弱电高压预案
Byte m_ucSetWeakLowVolPlan; //弱电低压预案
//output
int m_iStongVoltage; //强电电压
int m_iWeakVoltage; //弱电电压
int m_iBusVoltage; //总线电压
int m_iGetWarnHighVol; //高压预警电压(设置值)
int m_iGetWarnLowVol; //低压预警电压(设置值)
Byte m_ucGetStongHighVolPlan; //强电高压预案
Byte m_ucGetStongLowVolPlan; //强电低压预案
Byte m_ucGetWeakHighVolPlan; //弱电高压预案
Byte m_ucGetWeakLowVolPlan; //弱电低压预案
Byte m_ucSetWatchCfg ; //电源板看门狗设置 //ADD:201404021301
Byte m_ucPowerBoardVer[MAX_POWERBOARD][5];
ACE_Thread_Mutex m_mutexVoltage;
};
#endif //ACE_SIGNAL_POWERBOARD_H