75 lines
1.4 KiB
C++
75 lines
1.4 KiB
C++
/*********************************************************************
|
|
*
|
|
* file: MemAlarm.h
|
|
*
|
|
* copyright: Shanghai Baosight Software Co., Ltd.
|
|
*
|
|
* Version history
|
|
* 1.0 2020-02-16 zoufuzhou create
|
|
*
|
|
*********************************************************************/
|
|
|
|
#ifndef _H_MEM_ALARM_H
|
|
#define _H_MEM_ALARM_H
|
|
|
|
#include <zlib/coilDef.h>
|
|
#include <zlib/MemTable.hpp>
|
|
#include <zlib/MemTrk.h>
|
|
|
|
using namespace baosight;
|
|
|
|
class CMemAlarm
|
|
{
|
|
public:
|
|
CMemAlarm();
|
|
|
|
public:
|
|
~CMemAlarm(void);
|
|
|
|
|
|
public:
|
|
|
|
|
|
ALARM_COIL* operator[](int index);
|
|
|
|
|
|
ALARM_COIL* operator()(int ti);
|
|
|
|
|
|
/**********
|
|
*coilid: entry coil id or exit coil id
|
|
*mode: ALL:operator all track coil ,CENTER:operator center coil
|
|
**********/
|
|
ALARM_COIL* operator()(const string& entId);
|
|
|
|
/**********
|
|
*ti: current coil id
|
|
*start: current alarm in wplen store start pos
|
|
*end: current alarm in wplen store end pos
|
|
**********/
|
|
int push(int ti,int start,int end);
|
|
|
|
/**********
|
|
*entId: current coil entId
|
|
*start: current alarm in wplen store start pos
|
|
*end: current alarm in wplen store end pos
|
|
**********/
|
|
int push(const string& entId,int start,int end);
|
|
|
|
/**********
|
|
*ti: current coil id
|
|
*entId: current coil entId
|
|
**********/
|
|
void setEntId(int ti,const string& entId);
|
|
|
|
void print(ALARM_COIL* alarm);
|
|
|
|
private:
|
|
ALARM_COILS* p_alarm;
|
|
CMemTrk* p_trk;
|
|
|
|
|
|
};
|
|
|
|
#endif
|