716 lines
18 KiB
C++
716 lines
18 KiB
C++
// Version: 2021.4.23 15:59:12
|
|
|
|
// File: T_ALARM_MSG.cpp
|
|
|
|
#include "T_ALARM_MSG.h"
|
|
|
|
T_ALARM_MSG::T_ALARM_MSG(){
|
|
// initialise all membervariables
|
|
initial();
|
|
}
|
|
T_ALARM_MSG::~T_ALARM_MSG(){
|
|
}
|
|
void T_ALARM_MSG::initial(){
|
|
// initialise all membervariables
|
|
set_Id(0);
|
|
set_CoilId((char*)"");
|
|
set_ZoneNo(0);
|
|
set_ZoneNoZi(-1);
|
|
set_ZoneName((char*)"");
|
|
set_ZoneNameZi(-1);
|
|
set_Text((char*)"");
|
|
set_TextZi(-1);
|
|
set_Time((char*)"");
|
|
set_TimeZi(-1);
|
|
set_Level(0);
|
|
set_LevelZi(-1);
|
|
set_msg_item((char*)"");
|
|
set_msg_itemZi(-1);
|
|
set_wplenstart(0.0);
|
|
set_wplenstartZi(-1);
|
|
set_wplenstop(0.0);
|
|
set_wplenstopZi(-1);
|
|
set_Spare1((char*)"");
|
|
set_Spare1Zi(-1);
|
|
set_Spare2(0);
|
|
set_Spare2Zi(-1);
|
|
set_toc((char*)"");
|
|
set_tocZi(-1);
|
|
set_toc((char*)"");
|
|
set_tomZi(-1);
|
|
set_mop((char*)"");
|
|
set_mopZi(-1);
|
|
set_mou((char*)"");
|
|
set_mouZi(-1);
|
|
// initialies Primary key members
|
|
set_k_Id(0);
|
|
}
|
|
T_ALARM_MSG::T_ALARM_MSG(long arg1)
|
|
{
|
|
initial();
|
|
setPrimKey (arg1);
|
|
//read DB record
|
|
dbAccess = true;
|
|
dbMessage = readDB();
|
|
if ( dbMessage != NULL ) {dbAccess = false;}
|
|
}
|
|
|
|
char* T_ALARM_MSG:: execute(const char* sql , long* count){
|
|
return( db.execute( sql , count ) );
|
|
}
|
|
|
|
char* T_ALARM_MSG:: dbCommit(){
|
|
return( db.dbCommit( ) );
|
|
}
|
|
|
|
char* T_ALARM_MSG:: dbRollback(){
|
|
return( db.dbRollback( ) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::readDB(){
|
|
// DB Trace is off
|
|
return( db.readDB(*this) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::updateDB(){
|
|
// DB Trace is off
|
|
return( db.updateDB(*this) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::insertDB(){
|
|
// DB Trace is off
|
|
return( db.insertDB(*this) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::deleteDB(){
|
|
// DB Trace is off
|
|
return( db.deleteDB(*this) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::deleteDB(const char * where, long* count){
|
|
// DB Trace is off
|
|
return( db.deleteDB( where , count ) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::openSetDB(const char * where,const char* order){
|
|
// DB Trace is off
|
|
return( db.openSetDB( where , order ) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::countDB(const char * where, long* count){
|
|
// DB Trace is off
|
|
return( db.countDB( where , count ) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::getSetDB(){
|
|
// DB Trace is off
|
|
return( db.getSetDB(*this) );
|
|
}
|
|
|
|
char* T_ALARM_MSG::closeSetDB(){
|
|
// DB Trace is off
|
|
return( db.closeSetDB() );
|
|
}
|
|
|
|
char* T_ALARM_MSG::storeDB(){
|
|
char* ret = NULL;
|
|
setKeysFromRecord();
|
|
ret=db.updateDB(*this);
|
|
if(ret != NULL){
|
|
ret=db.insertDB(*this);
|
|
if(ret != NULL){
|
|
dbAccess = false;
|
|
return(ret);
|
|
}
|
|
}
|
|
return(ret);
|
|
}
|
|
|
|
// public methode setPrimKey T_ALARM_MSG
|
|
//
|
|
// this methode stores the unique key attributes
|
|
//
|
|
void T_ALARM_MSG::setPrimKey( long arg1 ){
|
|
l_k_Id = arg1;
|
|
} // end of methode
|
|
|
|
void T_ALARM_MSG::initInsertKeys( long arg1 ){
|
|
setPrimKey ( arg1);
|
|
l_Id = arg1;
|
|
} // end of methode
|
|
void T_ALARM_MSG::setKeysFromRecord(){
|
|
set_k_Id( Id() );
|
|
} // end of methode
|
|
//
|
|
//O P E R A T O R +
|
|
//===================
|
|
//
|
|
T_ALARM_MSG T_ALARM_MSG::operator+(const T_ALARM_MSG &inst) const{
|
|
T_ALARM_MSG ptrT_ALARM_MSG(*this);
|
|
//----------------------------------------------------------
|
|
ptrT_ALARM_MSG.set_Id(inst.Id());
|
|
//----------------------------------------------------------
|
|
ptrT_ALARM_MSG.set_CoilId(inst.CoilId());
|
|
//----------------------------------------------------------
|
|
if(inst.ZoneNoZi() != -1){
|
|
ptrT_ALARM_MSG.set_ZoneNo(inst.ZoneNo());
|
|
ptrT_ALARM_MSG.set_ZoneNoZi(inst.ZoneNoZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.ZoneNameZi() != -1){
|
|
ptrT_ALARM_MSG.set_ZoneName(inst.ZoneName());
|
|
ptrT_ALARM_MSG.set_ZoneNameZi(inst.ZoneNameZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.TextZi() != -1){
|
|
ptrT_ALARM_MSG.set_Text(inst.Text());
|
|
ptrT_ALARM_MSG.set_TextZi(inst.TextZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.TimeZi() != -1){
|
|
ptrT_ALARM_MSG.set_Time(inst.Time());
|
|
ptrT_ALARM_MSG.set_TimeZi(inst.TimeZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.LevelZi() != -1){
|
|
ptrT_ALARM_MSG.set_Level(inst.Level());
|
|
ptrT_ALARM_MSG.set_LevelZi(inst.LevelZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.msg_itemZi() != -1){
|
|
ptrT_ALARM_MSG.set_msg_item(inst.msg_item());
|
|
ptrT_ALARM_MSG.set_msg_itemZi(inst.msg_itemZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.wplenstartZi() != -1){
|
|
ptrT_ALARM_MSG.set_wplenstart(inst.wplenstart());
|
|
ptrT_ALARM_MSG.set_wplenstartZi(inst.wplenstartZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.wplenstopZi() != -1){
|
|
ptrT_ALARM_MSG.set_wplenstop(inst.wplenstop());
|
|
ptrT_ALARM_MSG.set_wplenstopZi(inst.wplenstopZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.Spare1Zi() != -1){
|
|
ptrT_ALARM_MSG.set_Spare1(inst.Spare1());
|
|
ptrT_ALARM_MSG.set_Spare1Zi(inst.Spare1Zi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.Spare2Zi() != -1){
|
|
ptrT_ALARM_MSG.set_Spare2(inst.Spare2());
|
|
ptrT_ALARM_MSG.set_Spare2Zi(inst.Spare2Zi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.tocZi() != -1){
|
|
ptrT_ALARM_MSG.set_toc(inst.toc());
|
|
ptrT_ALARM_MSG.set_tocZi(inst.tocZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.tomZi() != -1){
|
|
ptrT_ALARM_MSG.set_tom(inst.tom());
|
|
ptrT_ALARM_MSG.set_tomZi(inst.tomZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.mopZi() != -1){
|
|
ptrT_ALARM_MSG.set_mop(inst.mop());
|
|
ptrT_ALARM_MSG.set_mopZi(inst.mopZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.mouZi() != -1){
|
|
ptrT_ALARM_MSG.set_mou(inst.mou());
|
|
ptrT_ALARM_MSG.set_mouZi(inst.mouZi());
|
|
}
|
|
return (ptrT_ALARM_MSG);
|
|
}
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
const T_ALARM_MSG& T_ALARM_MSG::operator=(const T_ALARM_MSG &inst){
|
|
//----------------------------------------------------------
|
|
this->set_Id(inst.Id());
|
|
//----------------------------------------------------------
|
|
this->set_CoilId(inst.CoilId());
|
|
//----------------------------------------------------------
|
|
this->set_ZoneNo(inst.ZoneNo());
|
|
this->set_ZoneNoZi(inst.ZoneNoZi());
|
|
//----------------------------------------------------------
|
|
this->set_ZoneName(inst.ZoneName());
|
|
this->set_ZoneNameZi(inst.ZoneNameZi());
|
|
//----------------------------------------------------------
|
|
this->set_Text(inst.Text());
|
|
this->set_TextZi(inst.TextZi());
|
|
//----------------------------------------------------------
|
|
this->set_Time(inst.Time());
|
|
this->set_TimeZi(inst.TimeZi());
|
|
//----------------------------------------------------------
|
|
this->set_Level(inst.Level());
|
|
this->set_LevelZi(inst.LevelZi());
|
|
//----------------------------------------------------------
|
|
this->set_msg_item(inst.msg_item());
|
|
this->set_msg_itemZi(inst.msg_itemZi());
|
|
//----------------------------------------------------------
|
|
this->set_wplenstart(inst.wplenstart());
|
|
this->set_wplenstartZi(inst.wplenstartZi());
|
|
//----------------------------------------------------------
|
|
this->set_wplenstop(inst.wplenstop());
|
|
this->set_wplenstopZi(inst.wplenstopZi());
|
|
//----------------------------------------------------------
|
|
this->set_Spare1(inst.Spare1());
|
|
this->set_Spare1Zi(inst.Spare1Zi());
|
|
//----------------------------------------------------------
|
|
this->set_Spare2(inst.Spare2());
|
|
this->set_Spare2Zi(inst.Spare2Zi());
|
|
//----------------------------------------------------------
|
|
this->set_toc(inst.toc());
|
|
this->set_tocZi(inst.tocZi());
|
|
//----------------------------------------------------------
|
|
this->set_tom(inst.tom());
|
|
this->set_tomZi(inst.tomZi());
|
|
//----------------------------------------------------------
|
|
this->set_mop(inst.mop());
|
|
this->set_mopZi(inst.mopZi());
|
|
//----------------------------------------------------------
|
|
this->set_mou(inst.mou());
|
|
this->set_mouZi(inst.mouZi());
|
|
return (*this);
|
|
}
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//===================
|
|
//
|
|
T_ALARM_MSG::T_ALARM_MSG(const T_ALARM_MSG &inst){
|
|
//----------------------------------------------------------
|
|
this->set_Id(inst.Id());
|
|
//----------------------------------------------------------
|
|
this->set_CoilId(inst.CoilId());
|
|
//----------------------------------------------------------
|
|
this->set_ZoneNo(inst.ZoneNo());
|
|
this->set_ZoneNoZi(inst.ZoneNoZi());
|
|
//----------------------------------------------------------
|
|
this->set_ZoneName(inst.ZoneName());
|
|
this->set_ZoneNameZi(inst.ZoneNameZi());
|
|
//----------------------------------------------------------
|
|
this->set_Text(inst.Text());
|
|
this->set_TextZi(inst.TextZi());
|
|
//----------------------------------------------------------
|
|
this->set_Time(inst.Time());
|
|
this->set_TimeZi(inst.TimeZi());
|
|
//----------------------------------------------------------
|
|
this->set_Level(inst.Level());
|
|
this->set_LevelZi(inst.LevelZi());
|
|
//----------------------------------------------------------
|
|
this->set_msg_item(inst.msg_item());
|
|
this->set_msg_itemZi(inst.msg_itemZi());
|
|
//----------------------------------------------------------
|
|
this->set_wplenstart(inst.wplenstart());
|
|
this->set_wplenstartZi(inst.wplenstartZi());
|
|
//----------------------------------------------------------
|
|
this->set_wplenstop(inst.wplenstop());
|
|
this->set_wplenstopZi(inst.wplenstopZi());
|
|
//----------------------------------------------------------
|
|
this->set_Spare1(inst.Spare1());
|
|
this->set_Spare1Zi(inst.Spare1Zi());
|
|
//----------------------------------------------------------
|
|
this->set_Spare2(inst.Spare2());
|
|
this->set_Spare2Zi(inst.Spare2Zi());
|
|
//----------------------------------------------------------
|
|
this->set_toc(inst.toc());
|
|
this->set_tocZi(inst.tocZi());
|
|
//----------------------------------------------------------
|
|
this->set_tom(inst.tom());
|
|
this->set_tomZi(inst.tomZi());
|
|
//----------------------------------------------------------
|
|
this->set_mop(inst.mop());
|
|
this->set_mopZi(inst.mopZi());
|
|
//----------------------------------------------------------
|
|
this->set_mou(inst.mou());
|
|
this->set_mouZi(inst.mouZi());
|
|
}
|
|
long T_ALARM_MSG::Id() const{
|
|
return((long)l_Id );
|
|
}
|
|
|
|
|
|
void T_ALARM_MSG::set_Id( long arg ){
|
|
l_Id = arg;
|
|
return;
|
|
}
|
|
|
|
|
|
char* T_ALARM_MSG::CoilId() const{
|
|
return((char*)c_CoilId );
|
|
}
|
|
|
|
|
|
void T_ALARM_MSG::set_CoilId( const char* arg ){
|
|
strncpy((char*)c_CoilId , arg , sizeof(c_CoilId));
|
|
c_CoilId[sizeof(c_CoilId)-1] = '\0';
|
|
return;
|
|
}
|
|
|
|
|
|
short T_ALARM_MSG::ZoneNo() const{
|
|
return((short)s_ZoneNo );
|
|
}
|
|
|
|
short T_ALARM_MSG::ZoneNoZi() const{
|
|
return( s_ZoneNoZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_ZoneNo( short arg ){
|
|
s_ZoneNo = arg;
|
|
s_ZoneNoZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_ZoneNoZi( short arg ) {
|
|
s_ZoneNoZi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::ZoneName() const{
|
|
return((char*)c_ZoneName );
|
|
}
|
|
|
|
short T_ALARM_MSG::ZoneNameZi() const{
|
|
return( s_ZoneNameZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_ZoneName( const char* arg ){
|
|
strncpy((char*)c_ZoneName , arg , sizeof(c_ZoneName));
|
|
c_ZoneName[sizeof(c_ZoneName)-1] = '\0';
|
|
s_ZoneNameZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_ZoneNameZi( short arg ) {
|
|
s_ZoneNameZi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::Text() const{
|
|
return((char*)c_Text );
|
|
}
|
|
|
|
short T_ALARM_MSG::TextZi() const{
|
|
return( s_TextZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_Text( const char* arg ){
|
|
strncpy((char*)c_Text , arg , sizeof(c_Text));
|
|
c_Text[sizeof(c_Text)-1] = '\0';
|
|
s_TextZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_TextZi( short arg ) {
|
|
s_TextZi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::Time() const{
|
|
return((char*)c_Time );
|
|
}
|
|
|
|
short T_ALARM_MSG::TimeZi() const{
|
|
return( s_TimeZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_Time( char* arg ){
|
|
strncpy((char*)c_Time , arg , sizeof(c_Time));
|
|
c_Time[sizeof(c_Time)-1] = '\0';
|
|
s_TimeZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_TimeZi( short arg ) {
|
|
s_TimeZi = arg;
|
|
}
|
|
|
|
short T_ALARM_MSG::Level() const{
|
|
return((short)s_Level );
|
|
}
|
|
|
|
short T_ALARM_MSG::LevelZi() const{
|
|
return( s_LevelZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_Level( short arg ){
|
|
s_Level = arg;
|
|
s_LevelZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_LevelZi( short arg ) {
|
|
s_LevelZi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::msg_item() const{
|
|
return((char*)c_msg_item );
|
|
}
|
|
|
|
short T_ALARM_MSG::msg_itemZi() const{
|
|
return( s_msg_itemZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_msg_item( const char* arg ){
|
|
strncpy((char*)c_msg_item , arg , sizeof(c_msg_item));
|
|
c_msg_item[sizeof(c_msg_item)-1] = '\0';
|
|
s_msg_itemZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_msg_itemZi( short arg ) {
|
|
s_msg_itemZi = arg;
|
|
}
|
|
|
|
double T_ALARM_MSG::wplenstart() const{
|
|
return((double)d_wplenstart );
|
|
}
|
|
|
|
short T_ALARM_MSG::wplenstartZi() const{
|
|
return( s_wplenstartZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_wplenstart( double arg ){
|
|
d_wplenstart = arg;
|
|
s_wplenstartZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_wplenstartZi( short arg ) {
|
|
s_wplenstartZi = arg;
|
|
}
|
|
|
|
double T_ALARM_MSG::wplenstop() const{
|
|
return((double)d_wplenstop );
|
|
}
|
|
|
|
short T_ALARM_MSG::wplenstopZi() const{
|
|
return( s_wplenstopZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_wplenstop( double arg ){
|
|
d_wplenstop = arg;
|
|
s_wplenstopZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_wplenstopZi( short arg ) {
|
|
s_wplenstopZi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::Spare1() const{
|
|
return((char*)c_Spare1 );
|
|
}
|
|
|
|
short T_ALARM_MSG::Spare1Zi() const{
|
|
return( s_Spare1Zi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_Spare1( const char* arg ){
|
|
strncpy((char*)c_Spare1 , arg , sizeof(c_Spare1));
|
|
c_Spare1[sizeof(c_Spare1)-1] = '\0';
|
|
s_Spare1Zi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_Spare1Zi( short arg ) {
|
|
s_Spare1Zi = arg;
|
|
}
|
|
|
|
long T_ALARM_MSG::Spare2() const{
|
|
return((long)l_Spare2 );
|
|
}
|
|
|
|
short T_ALARM_MSG::Spare2Zi() const{
|
|
return( s_Spare2Zi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_Spare2( long arg ){
|
|
l_Spare2 = arg;
|
|
s_Spare2Zi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_Spare2Zi( short arg ) {
|
|
s_Spare2Zi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::toc() const{
|
|
return((char*)c_toc );
|
|
}
|
|
|
|
short T_ALARM_MSG::tocZi() const{
|
|
return( s_tocZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_toc( char* arg ){
|
|
strncpy((char*)c_toc , arg , sizeof(c_toc));
|
|
c_toc[sizeof(c_toc)-1] = '\0';
|
|
s_tocZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_tocZi( short arg ){
|
|
s_tocZi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::tom() const{
|
|
return((char*)c_tom );
|
|
}
|
|
|
|
short T_ALARM_MSG::tomZi() const{
|
|
return( s_tomZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_tom( char* arg ){
|
|
strncpy((char*)c_tom , arg , sizeof(c_tom));
|
|
c_tom[sizeof(c_tom)-1] = '\0';
|
|
s_tomZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_tomZi( short arg ){
|
|
s_tomZi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::mop() const{
|
|
return((char*)c_mop );
|
|
}
|
|
|
|
short T_ALARM_MSG::mopZi() const{
|
|
return( s_mopZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_mop( char* arg ){
|
|
strncpy((char*)c_mop , arg , sizeof(c_mop));
|
|
c_mop[sizeof(c_mop)-1] = '\0';
|
|
s_mopZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_mopZi( short arg ){
|
|
s_mopZi = arg;
|
|
}
|
|
|
|
char* T_ALARM_MSG::mou() const{
|
|
return((char*)c_mou );
|
|
}
|
|
|
|
short T_ALARM_MSG::mouZi() const{
|
|
return( s_mouZi);
|
|
}
|
|
|
|
void T_ALARM_MSG::set_mou( char* arg ){
|
|
strncpy((char*)c_mou , arg , sizeof(c_mou));
|
|
c_mou[sizeof(c_mou)-1] = '\0';
|
|
s_mouZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_ALARM_MSG::set_mouZi( short arg ){
|
|
s_mouZi = arg;
|
|
}
|
|
|
|
// methodes for Primary key
|
|
long T_ALARM_MSG::k_Id(){
|
|
return((long)l_k_Id );
|
|
}
|
|
|
|
void T_ALARM_MSG::set_k_Id( long arg ){
|
|
l_k_Id = arg;
|
|
return;
|
|
}
|
|
|
|
//
|
|
// public methode fillStructure
|
|
//
|
|
// this methode filles the classstructue with the private attributes
|
|
//
|
|
void T_ALARM_MSG::fillStructure(){
|
|
structTable.Id = Id();
|
|
strncpy ( structTable.CoilId , CoilId(),sizeof(structTable.CoilId));
|
|
structTable.ZoneNo = ZoneNo();
|
|
strncpy ( structTable.ZoneName , ZoneName(),sizeof(structTable.ZoneName));
|
|
strncpy ( structTable.Text , Text(),sizeof(structTable.Text));
|
|
strncpy ( structTable.Time , Time(),sizeof(structTable.Time));
|
|
structTable.Level = Level();
|
|
strncpy ( structTable.msg_item , msg_item(),sizeof(structTable.msg_item));
|
|
structTable.wplenstart = wplenstart();
|
|
structTable.wplenstop = wplenstop();
|
|
strncpy ( structTable.Spare1 , Spare1(),sizeof(structTable.Spare1));
|
|
structTable.Spare2 = Spare2();
|
|
strncpy ( structTable.toc , toc(),sizeof(structTable.toc));
|
|
strncpy ( structTable.tom , tom(),sizeof(structTable.tom));
|
|
strncpy ( structTable.mop , mop(),sizeof(structTable.mop));
|
|
strncpy ( structTable.mou , mou(),sizeof(structTable.mou));
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_ALARM_MSG::fillStructureZi(){
|
|
structTableZi.ZoneNoZi = ZoneNoZi();
|
|
structTableZi.ZoneNameZi = ZoneNameZi();
|
|
structTableZi.TextZi = TextZi();
|
|
structTableZi.TimeZi = TimeZi();
|
|
structTableZi.LevelZi = LevelZi();
|
|
structTableZi.msg_itemZi = msg_itemZi();
|
|
structTableZi.wplenstartZi = wplenstartZi();
|
|
structTableZi.wplenstopZi = wplenstopZi();
|
|
structTableZi.Spare1Zi = Spare1Zi();
|
|
structTableZi.Spare2Zi = Spare2Zi();
|
|
structTableZi.tocZi = tocZi();
|
|
structTableZi.tomZi = tomZi();
|
|
structTableZi.mopZi = mopZi();
|
|
structTableZi.mouZi = mouZi();
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_ALARM_MSG::setStructure() {
|
|
set_CoilId( structTable.CoilId);
|
|
set_ZoneNo( structTable.ZoneNo);
|
|
set_ZoneName( structTable.ZoneName);
|
|
set_Text( structTable.Text);
|
|
set_Time( structTable.Time);
|
|
set_Level( structTable.Level);
|
|
set_msg_item( structTable.msg_item);
|
|
set_wplenstart( structTable.wplenstart);
|
|
set_wplenstop( structTable.wplenstop);
|
|
set_Spare1( structTable.Spare1);
|
|
set_Spare2( structTable.Spare2);
|
|
set_toc(structTable.toc);
|
|
set_tom(structTable.tom);
|
|
set_mop(structTable.mop);
|
|
set_mou(structTable.mou);
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_ALARM_MSG::setStructureZi() {
|
|
set_ZoneNoZi( structTableZi.ZoneNoZi);
|
|
set_ZoneNameZi( structTableZi.ZoneNameZi);
|
|
set_TextZi( structTableZi.TextZi);
|
|
set_TimeZi( structTableZi.TimeZi);
|
|
set_LevelZi( structTableZi.LevelZi);
|
|
set_msg_itemZi( structTableZi.msg_itemZi);
|
|
set_wplenstartZi( structTableZi.wplenstartZi);
|
|
set_wplenstopZi( structTableZi.wplenstopZi);
|
|
set_Spare1Zi( structTableZi.Spare1Zi);
|
|
set_Spare2Zi( structTableZi.Spare2Zi);
|
|
set_tocZi(structTableZi.tocZi);
|
|
set_tomZi(structTableZi.tomZi);
|
|
set_mopZi(structTableZi.mopZi);
|
|
set_mouZi(structTableZi.mouZi);
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
char* T_ALARM_MSG::getName(){
|
|
return((char*)"T_ALARM_MSG");
|
|
}
|
|
///////////////////////////////////////////////////
|
|
int T_ALARM_MSG::getSqlCode(){
|
|
return( db.dbSqlCode);
|
|
}
|
|
int T_ALARM_MSG::getRowsProcessed(){
|
|
return( db.dbRowsProcessed);
|
|
}
|