TypeDefinition.h

Go to the documentation of this file.
00001 //Copyright GSI 2012
00002 #ifndef FESA_GSI_TYPE_DEFITION_CLASS_H_
00003 #define FESA_GSI_TYPE_DEFITION_CLASS_H_
00004 
00005 #include <fesa-core-gsi/DataStore/TypeDefinition.h>
00006 
00007 const unsigned int KEY_VALUE_MAXSIZE = 16;
00008 
00009 namespace fesaGSI
00010 {
00011 
00016     template<unsigned int userKeyNb>
00017     struct AlarmField_DataType: public fesa::FaultField_DataType
00018     {
00019             AlarmField_DataType();
00020             char userKeyValueCol_[userKeyNb][KEY_VALUE_MAXSIZE];
00021             char** pUserKeyValueCol_;
00022         protected:
00023             char* pUserKeyValue_[userKeyNb];
00024 
00025     };
00026 
00027     template<unsigned int userKeyNb>
00028     inline AlarmField_DataType<userKeyNb>::AlarmField_DataType()
00029     {
00030         pUserKeyValueCol_ = &pUserKeyValue_[0];
00031         for (unsigned int i = 0; i < userKeyNb; i++)
00032         {
00033             pUserKeyValue_[i] = userKeyValueCol_[i];
00034         }
00035     }
00036 
00037         //TODO: Fix bad design: This class currently as well exists in the class-namespace, but is not used
00038         //Could be fixed by introducing Lab-Specific custom-Types (Dont generate code for this item)
00039     static const unsigned long MAX_ERROR_MESSAGE_LENGTH = 255UL;
00040         static const unsigned long MAX_CYCLE_NAME_LENGTH = 255UL;
00041         static const unsigned long MAX_TIMESTAMP_LENGTH = 32UL;
00042         struct GSI_ERROR
00043         {
00044                         char error_string[MAX_ERROR_MESSAGE_LENGTH];
00045 
00046                         long error_code;
00047 
00048                         char error_timestamp[MAX_TIMESTAMP_LENGTH];
00049 
00050                         char error_cycle_name[MAX_CYCLE_NAME_LENGTH];
00051 
00052         };
00053 
00054 }
00055 #endif /* FESA_CERN_TYPE_DEFITION_CLASS_H_ */

Generated on 25 Jan 2013 for fesa-core-gsi by  doxygen 1.6.1