eis/inc/dbinc/T_ALARM_MSG.h

524 lines
9.0 KiB
C++

// Version: 2021.4.23 15:59:12
#ifndef _T_ALARM_MSG_H
#define _T_ALARM_MSG_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma warning(disable:4996)
#pragma warning(disable:4267)
#endif
#include "T_ALARM_MSGDBAX.h"
class T_ALARM_MSG{
friend class T_ALARM_MSGDBAX;
private:
//aggregation to DB Class
T_ALARM_MSGDBAX db;
public:
//
//A T T R I B U T E S
//===================
//
bool dbAccess;
char* dbMessage;// pointer for the return values of DBAX methodes
char messageBuffer[200];// temporary message buffer
friend class PapLib;
protected:
//
//A T T R I B U T E S
//===================
//
long l_Id;
char c_CoilId[20+1];
short s_ZoneNo;
short s_ZoneNoZi;
char c_ZoneName[40+1];
short s_ZoneNameZi;
char c_Text[200+1];
short s_TextZi;
char c_Time[27];
short s_TimeZi;
short s_Level;
short s_LevelZi;
char c_msg_item[100+1];
short s_msg_itemZi;
double d_wplenstart;
short s_wplenstartZi;
double d_wplenstop;
short s_wplenstopZi;
char c_Spare1[1000+1];
short s_Spare1Zi;
long l_Spare2;
short s_Spare2Zi;
char c_toc[27];
short s_tocZi;
char c_tom[27];
short s_tomZi;
char c_mop[121];
short s_mopZi;
char c_mou[31];
short s_mouZi;
// arguments for Primary key
long l_k_Id;
public:
//
// LTA Structure
struct STR_T_ALARM_MSG{
int Id;
char CoilId[20+1];
short ZoneNo;
char ZoneName[40+1];
char Text[200+1];
char Time[27];
short Level;
char msg_item[100+1];
double wplenstart;
double wplenstop;
char Spare1[1000+1];
int Spare2;
char toc[27];
char tom[27];
char mop[121];
char mou[31];
}structTable;
// LTA Structure Zi
struct STR_T_ALARM_MSGZi{
short ZoneNoZi;
short ZoneNameZi;
short TextZi;
short TimeZi;
short LevelZi;
short msg_itemZi;
short wplenstartZi;
short wplenstopZi;
short Spare1Zi;
short Spare2Zi;
short tocZi;
short tomZi;
short mopZi;
short mouZi;
}structTableZi;
//
//C O N S T R U C T O R S
//=======================
//
public:
T_ALARM_MSG();
//D E S T R U C T O R S
//=======================
//
virtual ~T_ALARM_MSG();
//
//C O P Y - C O N S T R U C T O R
//=======================
T_ALARM_MSG(const T_ALARM_MSG &inst);
// For Constructors with parameters the flag dbAccess
// informs you if the access was successfully or not
T_ALARM_MSG( long arg1);
//methods
public:
char* getCreationTime() {return (char*)"2021.4.23 15:59:12";};
//initial data
void initial();
//read data
char* readDB();
//update data
char* updateDB();
//insert data
char* insertDB();
//this methode tries to update a DB record , when the update fails , the methode
//tries an insert of the failed record
char* storeDB();
//delete data
char* deleteDB();
//delete data
char* deleteDB(const char* where , long* count );
//openSetDB data
char* openSetDB(const char* where ,const char* order );
//getSetDB data
char* getSetDB();
//closeSetDB data
char* closeSetDB();
//countDB data
char* countDB(const char* where , long* count );
char* execute(const char* sql , long* count );
char* dbCommit();
char* dbRollback();
public:
//
// public methode setPrimKey
//
// this methode stores the unique key attributes
//
void setPrimKey(long arg1 );
// public methode initInsertKeys
//
// this methode stores the unique key attributes
//
void initInsertKeys( long arg1 );
public:
//
// public methode setKeysFromRecord
//
// this methode set the unique key attributes from the DB Record Attributes
//
void setKeysFromRecord();
//
//O P E R A T O R +
//===================
//
public:
T_ALARM_MSG operator+(const T_ALARM_MSG &inst) const;
//
//O P E R A T O R =
//===================
//
public:
const T_ALARM_MSG& operator=(const T_ALARM_MSG &inst);
long Id() const;//{
//return((long)l_Id );
//}
void set_Id( long arg );//{
//l_Id = arg;
//return;
//}
char* CoilId() const;//{
//return((char*)c_CoilId );
//}
void set_CoilId( const char* arg );//{
//strncpy((char*)c_CoilId , arg , sizeof(c_CoilId));
//c_CoilId[sizeof(c_CoilId)-1] = '\0';
//return;
//}
short ZoneNo() const;//{
//return((short)s_ZoneNo );
//}
short ZoneNoZi() const;//{
//return( s_ZoneNoZi);
//}
void set_ZoneNo( short arg );//{
//s_ZoneNo = arg;
//s_ZoneNoZi= 0;
//return;
//}
void set_ZoneNoZi( short arg ) ;//{
//s_ZoneNoZi = arg;
//}
char* ZoneName() const;//{
//return((char*)c_ZoneName );
//}
short ZoneNameZi() const;//{
//return( s_ZoneNameZi);
//}
void 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 set_ZoneNameZi( short arg ) ;//{
//s_ZoneNameZi = arg;
//}
char* Text() const;//{
//return((char*)c_Text );
//}
short TextZi() const;//{
//return( s_TextZi);
//}
void 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 set_TextZi( short arg ) ;//{
//s_TextZi = arg;
//}
char* Time() const;//{
//return((char*)c_Time );
//}
short TimeZi() const;//{
//return( s_TimeZi);
//}
void set_Time( char* arg );//{
//strncpy((char*)c_Time , arg , sizeof(c_Time));
//c_Time[sizeof(c_Time)-1] = '\0';
//s_TimeZi= 0;
//return;
//}
void set_TimeZi( short arg ) ;//{
//s_TimeZi = arg;
//}
short Level() const;//{
//return((short)s_Level );
//}
short LevelZi() const;//{
//return( s_LevelZi);
//}
void set_Level( short arg );//{
//s_Level = arg;
//s_LevelZi= 0;
//return;
//}
void set_LevelZi( short arg ) ;//{
//s_LevelZi = arg;
//}
char* msg_item() const;//{
//return((char*)c_msg_item );
//}
short msg_itemZi() const;//{
//return( s_msg_itemZi);
//}
void 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 set_msg_itemZi( short arg ) ;//{
//s_msg_itemZi = arg;
//}
double wplenstart() const;//{
//return((double)d_wplenstart );
//}
short wplenstartZi() const;//{
//return( s_wplenstartZi);
//}
void set_wplenstart( double arg );//{
//d_wplenstart = arg;
//s_wplenstartZi= 0;
//return;
//}
void set_wplenstartZi( short arg ) ;//{
//s_wplenstartZi = arg;
//}
double wplenstop() const;//{
//return((double)d_wplenstop );
//}
short wplenstopZi() const;//{
//return( s_wplenstopZi);
//}
void set_wplenstop( double arg );//{
//d_wplenstop = arg;
//s_wplenstopZi= 0;
//return;
//}
void set_wplenstopZi( short arg ) ;//{
//s_wplenstopZi = arg;
//}
char* Spare1() const;//{
//return((char*)c_Spare1 );
//}
short Spare1Zi() const;//{
//return( s_Spare1Zi);
//}
void 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 set_Spare1Zi( short arg ) ;//{
//s_Spare1Zi = arg;
//}
long Spare2() const;//{
//return((long)l_Spare2 );
//}
short Spare2Zi() const;//{
//return( s_Spare2Zi);
//}
void set_Spare2( long arg );//{
//l_Spare2 = arg;
//s_Spare2Zi= 0;
//return;
//}
void set_Spare2Zi( short arg ) ;//{
//s_Spare2Zi = arg;
//}
public:
char* toc() const;//{
//return((char*)c_toc );
//}
short tocZi() const;//{
//return( s_tocZi);
//}
protected:
void set_toc( char* arg );//{
//strncpy((char*)c_toc , arg , sizeof(c_toc));
//c_toc[sizeof(c_toc)-1] = '\0';
//s_tocZi= 0;
//return;
//}
void set_tocZi( short arg );//{
//s_tocZi = arg;
//}
public:
char* tom() const;//{
//return((char*)c_tom );
//}
short tomZi() const;//{
//return( s_tomZi);
//}
protected:
void set_tom( char* arg );//{
//strncpy((char*)c_tom , arg , sizeof(c_tom));
//c_tom[sizeof(c_tom)-1] = '\0';
//s_tomZi= 0;
//return;
//}
void set_tomZi( short arg );//{
//s_tomZi = arg;
//}
public:
char* mop() const;//{
//return((char*)c_mop );
//}
short mopZi() const;//{
//return( s_mopZi);
//}
protected:
void set_mop( char* arg );//{
//strncpy((char*)c_mop , arg , sizeof(c_mop));
//c_mop[sizeof(c_mop)-1] = '\0';
//s_mopZi= 0;
//return;
//}
void set_mopZi( short arg );//{
//s_mopZi = arg;
//}
public:
char* mou() const;//{
//return((char*)c_mou );
//}
short mouZi() const;//{
//return( s_mouZi);
//}
protected:
void set_mou( char* arg );//{
//strncpy((char*)c_mou , arg , sizeof(c_mou));
//c_mou[sizeof(c_mou)-1] = '\0';
//s_mouZi= 0;
//return;
//}
void set_mouZi( short arg );//{
//s_mouZi = arg;
//}
public:
// methodes for Primary key
long k_Id();//{
//return((long)l_k_Id );
//}
void set_k_Id( long arg );//{
//l_k_Id = arg;
//return;
//}
public:
//
// public methode fillStructure
//
// this methode filles the classstructue with the private attributes
//
void fillStructure();//{
//}
///////////////////////////////////////////////////
void fillStructureZi();//{
//}
///////////////////////////////////////////////////
void setStructure();// {
//return;
//}
///////////////////////////////////////////////////
void setStructureZi() ;//{
//}
///////////////////////////////////////////////////
char* getName();//{
//return((char*)"T_ALARM_MSG");
//}
///////////////////////////////////////////////////
int getSqlCode();//{
//return( db.dbSqlCode);
//}
///////////////////////////////////////////////////
int getRowsProcessed();//{
//return( db.dbRowsProcessed);
//}
};
#endif