📄 kalarmprotocol.cpp
字号:
// KAlarmProtocol.cpp: implementation of the KAlarmProtocol class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "KAlarmProtocol.h"
#include "../KylinSystem/KSerializer.h"
#include "../KylinSystem/KGuid.h"
#include "../KylinSystem/KMessageManager.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
const CString KAlarmProtocol::_TypeName = _T("Alarm.AlarmMessage");
const KGuid KAlarmProtocol::_TypeID(_T("{ED952DA4-3126-4C00-86AA-4E804512AC8D}"));
KAlarmProtocol::KAlarmProtocol()
{
}
KAlarmProtocol::~KAlarmProtocol()
{
}
KAlarmProtocol& KAlarmProtocol::operator =(const KAlarmProtocol& rvalue)
{
if(this == &rvalue)
return *this;
this->AlarmId = rvalue.AlarmId;
this->AlarmingTime = rvalue.AlarmingTime;
this->AlarmIsSend = rvalue.AlarmIsSend;
this->AlarmMessage = rvalue.AlarmMessage;
this->AlarmName = rvalue.AlarmName;
this->AlarmStyle = rvalue.AlarmStyle;
this->AttemperTel = rvalue.AttemperTel;
this->AverageValue = rvalue.AverageValue;
this->DutyPerson = rvalue.DutyPerson;
this->EventBeginTime = rvalue.EventBeginTime;
this->EventBeginValue = rvalue.EventBeginValue;
this->EventDefineId = rvalue.EventDefineId;
this->EventFinishTime = rvalue.EventFinishTime;
this->EventID = rvalue.EventID;
this->EventLevel = rvalue.EventLevel;
this->EventMine = rvalue.EventMine;
this->EventMonitorName = rvalue.EventMonitorName;
this->EventType = rvalue.EventType;
this->MaxValue = rvalue.MaxValue;
this->MineId = rvalue.MineId;
this->MinValue = rvalue.MinValue;
this->state = rvalue.state;
this->Telephone = rvalue.Telephone;
this->UseName = rvalue.UseName;
this->AlarmType = rvalue.AlarmType;
this->AlarmSound = rvalue.AlarmSound;
return *this;
}
const KGuid KAlarmProtocol::TypeID()
{
return _TypeID;
}
const CString KAlarmProtocol::TypeName()
{
return _TypeName;
}
const KGuid KAlarmProtocol::GetTypeID()
{
return _TypeID;
}
const CString KAlarmProtocol::GetTypeName()
{
return _TypeName;
}
void KAlarmProtocol::Serialize(CArchive& ar)
{
KSerializer mSerializer(ar);
if(ar.IsStoring())
{
mSerializer.Write(this->AlarmId);
mSerializer.Write(this->AlarmingTime);
mSerializer.Write(this->AlarmIsSend);
mSerializer.Write(this->AlarmMessage);
mSerializer.Write(this->AlarmName);
mSerializer.Write(this->AlarmStyle);
mSerializer.Write(this->AttemperTel);
mSerializer.Write(this->AverageValue);
mSerializer.Write(this->DutyPerson);
mSerializer.Write(this->EventBeginTime);
mSerializer.Write(this->EventBeginValue);
mSerializer.Write(this->EventDefineId);
mSerializer.Write(this->EventFinishTime);
mSerializer.Write(this->EventID);
mSerializer.Write(this->EventLevel);
mSerializer.Write(this->EventMine);
mSerializer.Write(this->EventMonitorName);
mSerializer.Write(this->EventType);
mSerializer.Write(this->MaxValue);
mSerializer.Write(this->MineId);
mSerializer.Write(this->MinValue);
mSerializer.Write(this->state);
mSerializer.Write(this->Telephone);
mSerializer.Write(this->UseName);
mSerializer.Write(this->AlarmType);
mSerializer.Write(this->AlarmSound);
}
else
{
mSerializer.Read(this->AlarmId);
mSerializer.Read(this->AlarmingTime);
mSerializer.Read(this->AlarmIsSend);
mSerializer.Read(this->AlarmMessage);
mSerializer.Read(this->AlarmName);
mSerializer.Read(this->AlarmStyle);
mSerializer.Read(this->AttemperTel);
mSerializer.Read(this->AverageValue);
mSerializer.Read(this->DutyPerson);
mSerializer.Read(this->EventBeginTime);
mSerializer.Read(this->EventBeginValue);
mSerializer.Read(this->EventDefineId);
mSerializer.Read(this->EventFinishTime);
mSerializer.Read(this->EventID);
mSerializer.Read(this->EventLevel);
mSerializer.Read(this->EventMine);
mSerializer.Read(this->EventMonitorName);
mSerializer.Read(this->EventType);
mSerializer.Read(this->MaxValue);
mSerializer.Read(this->MineId);
mSerializer.Read(this->MinValue);
mSerializer.Read(this->state);
mSerializer.Read(this->Telephone);
mSerializer.Read(this->UseName);
mSerializer.Read(this->AlarmType);
mSerializer.Read(this->AlarmSound);
}
}
CString KAlarmProtocol::GetEventID()
{
return EventID;
}
void KAlarmProtocol::SetEventID(CString strValue)
{
EventID=strValue;
}
CString KAlarmProtocol::GetAlarmStyle()
{
return AlarmStyle;
}
void KAlarmProtocol::SetAlarmStyle(CString strValue)
{
AlarmStyle=strValue;
}
CString KAlarmProtocol::GetAlarmName()
{
return AlarmName;
}
void KAlarmProtocol::SetAlarmName(CString strValue)
{
AlarmName=strValue;
}
CString KAlarmProtocol::GetAlarmMessage()
{
return AlarmMessage;
}
void KAlarmProtocol::SetAlarmMessage(CString strValue)
{
AlarmMessage=strValue;
}
CString KAlarmProtocol::GetAlarmId()
{
return AlarmId;
}
void KAlarmProtocol::SetAlarmId(CString strValue)
{
AlarmId=strValue;
}
CString KAlarmProtocol::GetEventLevel()
{
return EventLevel;
}
void KAlarmProtocol::SetEventLevel(CString strValue)
{
EventLevel=strValue;
}
CString KAlarmProtocol::GetEventBeginTime()
{
return EventBeginTime;
}
void KAlarmProtocol::SetEventBeginTime(CString strValue)
{
EventBeginTime=strValue;
}
CString KAlarmProtocol::GetEventType()
{
return EventType;
}
void KAlarmProtocol::SetEventType(CString strValue)
{
EventType=strValue;
}
CString KAlarmProtocol::GetEventMine()
{
return EventMine;
}
void KAlarmProtocol::SetEventMine(CString strValue)
{
EventMine=strValue;
}
CString KAlarmProtocol::GetEventMonitorName()
{
return EventMonitorName;
}
void KAlarmProtocol::SetEventMonitorName(CString strValue)
{
EventMonitorName=strValue;
}
CString KAlarmProtocol::GetEventDefineId()
{
return EventDefineId;
}
void KAlarmProtocol::SetEventDefineId(CString strValue)
{
EventDefineId=strValue;
}
CString KAlarmProtocol::GetEventFinishTime()
{
return EventFinishTime;
}
void KAlarmProtocol::SetEventFinishTime(CString strValue)
{
EventFinishTime=strValue;
}
CString KAlarmProtocol::GetMaxValue()
{
return MaxValue;
}
void KAlarmProtocol::SetMaxValue(CString strValue)
{
MaxValue=strValue;
}
CString KAlarmProtocol::GetMinValue()
{
return MinValue;
}
void KAlarmProtocol::SetMinValue(CString strValue)
{
MinValue=strValue;
}
CString KAlarmProtocol::GetAverageValue()
{
return AverageValue;
}
void KAlarmProtocol::SetAverageValue(CString strValue)
{
AverageValue=strValue;
}
CString KAlarmProtocol::GetEventBeginValue()
{
return EventBeginValue;
}
void KAlarmProtocol::SetEventBeginValue(CString strValue)
{
EventBeginValue=strValue;
}
CString KAlarmProtocol::GetAttemperTel()
{
return AttemperTel;
}
void KAlarmProtocol::SetAttemperTel(CString strValue)
{
AttemperTel=strValue;
}
CString KAlarmProtocol::GetAlarmingTime()
{
return AlarmingTime;
}
void KAlarmProtocol::SetAlarmingTime(CString strValue)
{
AlarmingTime=strValue;
}
CString KAlarmProtocol::GetAlarmIsSend()
{
return AlarmIsSend;
}
void KAlarmProtocol::SetAlarmIsSend(CString strValue)
{
AlarmIsSend=strValue;
}
CString KAlarmProtocol::Getstate()
{
return state;
}
void KAlarmProtocol::Setstate(CString strValue)
{
state=strValue;
}
CString KAlarmProtocol::GetTelephone()
{
return Telephone;
}
void KAlarmProtocol::SetTelephone(CString strValue)
{
Telephone=strValue;
}
CString KAlarmProtocol::GetDutyPerson()
{
return DutyPerson;
}
void KAlarmProtocol::SetDutyPerson(CString strValue)
{
DutyPerson=strValue;
}
CString KAlarmProtocol::GetUseName()
{
return UseName;
}
void KAlarmProtocol::SetUseName(CString strValue)
{
UseName=strValue;
}
void KAlarmProtocol::SetMineId(CString strValue)
{
MineId=strValue;
}
CString KAlarmProtocol::GetMineId()
{
return MineId;
}
void KAlarmProtocol::SetAlarmType(CString strValue)
{
AlarmType=strValue;
}
CString KAlarmProtocol::GetAlarmType()
{
return AlarmType;
}
void KAlarmProtocol::SetAlarmSound(CString strValue)
{
AlarmSound=strValue;
}
CString KAlarmProtocol::GetAlarmSound()
{
return AlarmSound;
}
KAlarmProtocol* KAlarmProtocol::Copy()
{
//KAlarmProtocol* Alarm=new KAlarmProtocol();
KAlarmProtocol* Alarm = (KAlarmProtocol*)KMessageManager::Instance()->CreateMessage(TypeID());
Alarm->AlarmId=this->AlarmId;
Alarm->AlarmingTime=this->AlarmingTime;
Alarm->AlarmIsSend=this->AlarmIsSend;
Alarm->AlarmMessage=this->AlarmMessage;
Alarm->AlarmName=this->AlarmName;
Alarm->AlarmStyle=this->AlarmStyle;
Alarm->AttemperTel=this->AttemperTel;
Alarm->AverageValue=this->AverageValue;
Alarm->DutyPerson=this->DutyPerson;
Alarm->EventBeginTime=this->EventBeginTime;
Alarm->EventBeginValue=this->EventBeginValue;
Alarm->EventFinishTime=this->EventFinishTime;
Alarm->EventLevel=this->EventLevel;
Alarm->EventMine=this->EventMine;
Alarm->EventMonitorName=this->EventMonitorName;
Alarm->EventType=this->EventType;
Alarm->MaxValue=this->MaxValue;
Alarm->MinValue=this->MinValue;
Alarm->state=this->state;
Alarm->Telephone=this->Telephone;
Alarm->UseName=this->UseName;
Alarm->EventID=this->EventID;
Alarm->EventDefineId=this->EventDefineId;
Alarm->MineId=this->MineId;
Alarm->AlarmType=this->AlarmType;
Alarm->AlarmSound=this->AlarmSound;
return Alarm;
}
void KAlarmProtocol::Clean()
{
AlarmId =
AlarmingTime =
AlarmIsSend =
AlarmMessage =
AlarmName =
AlarmStyle =
AttemperTel =
AverageValue =
DutyPerson =
EventBeginTime =
EventBeginValue =
EventFinishTime =
EventLevel =
EventMine =
EventMonitorName =
EventType =
MaxValue =
MinValue =
state =
Telephone =
UseName =
EventID =
EventDefineId =
MineId =
AlarmType =
AlarmSound = _T("");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -