// ---------------------------------------------------------------------------- // Copyright (C) 2008 by Promess Incorporated. All rights reserved. // ---------------------------------------------------------------------------- // LegacyMonitorPersistentData.h // // The Legacy Monitor Persistent Data. // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // Developers: // Robert McCullough rob@promessdev.com // ---------------------------------------------------------------------------- // Change log: // [Oct-24-08 rel-6-0-3 Rob] // - Created. // ---------------------------------------------------------------------------- #ifndef INCLUDED_LEGACYMONITORPERSISTENTDATA_H_ #define INCLUDED_LEGACYMONITORPERSISTENTDATA_H_ // SERIALIZE_PORTABLE_BINARY //#include "../Support/portable_binary_archive/portable_oarchive.hpp" //#include "../Support/portable_binary_archive/portable_iarchive.hpp" // SERIALIZE_BINARY #include #include #include #include #include #include using namespace boost::serialization; class PersistentData{ private: friend class boost::serialization::access; template void serialize(Archive & ar, const unsigned int version) { ar & p_EffRawBegin; ar & p_EffRawEnd; ar & p_ActualRawBegin; ar & p_ActualRawEnd; // Monitoring Window Elements ar & p_WindowOrigin; ar & p_EffWindowBegin; ar & p_EffWindowEnd; ar & p_EffSliceWidth; // Informational Elements ar & p_MinValue; ar & p_MaxValue; ar & p_IsTaught; ar & p_IsFailed; ar & p_IsFHL; ar & p_IsFLL; ar & p_IsRHL; ar & p_IsRLL; ar & p_ActualAvg; ar & p_ActualMin; ar & p_ActualMax; ar & p_IsChanged; ar & p_IsTaughtDataDirty; ar & p_PartCount; ar & p_StartTime; ar & p_StopTime; ar & p_PartSerialNo; // Teach Elements ar & p_MonitorMode; ar & p_TeachCounter; // The raw sample curve // std::cout << "m_RawCurve" << std::endl; ar & m_RawCurve; // std::cout << "m_TransCurve" << std::endl; ar & m_TransCurve; // Taugh curve information (these must be persistent) // std::cout << "m_RawHighTaughtCurve" << std::endl; ar & m_RawHighTaughtCurve; // std::cout << "m_RawLowTaughtCurve" << std::endl; ar & m_RawLowTaughtCurve; // Window curve information (derived from taught curve info and current settings) // std::cout << "m_WinHighTaughtCurve" << std::endl; ar & m_WinHighTaughtCurve; // std::cout << "m_WinLowTaughtCurve" << std::endl; ar & m_WinLowTaughtCurve; // std::cout << "m_WinHighLimitCurve" << std::endl; ar & m_WinHighLimitCurve; // std::cout << "m_WinLowLimitCurve" << std::endl; ar & m_WinLowLimitCurve; // The last measured window curve // std::cout << "m_WinActualCurve" << std::endl; ar & m_WinActualCurve; } public: double p_EffRawBegin; double p_EffRawEnd; double p_ActualRawBegin; double p_ActualRawEnd; // Monitoring Window Elements double p_WindowOrigin; double p_EffWindowBegin; double p_EffWindowEnd; double p_EffSliceWidth; // Informational Elements double p_MinValue; double p_MaxValue; bool p_IsTaught; bool p_IsFailed; bool p_IsFHL; bool p_IsFLL; bool p_IsRHL; bool p_IsRLL; double p_ActualAvg; double p_ActualMin; double p_ActualMax; bool p_IsChanged; bool p_IsTaughtDataDirty; string p_PartCount; string p_StartTime; string p_StopTime; string p_PartSerialNo; // Teach Elements string p_MonitorMode; int p_TeachCounter; // The raw sample curve NumericVector m_RawCurve; // The transformed raw curve NumericVector m_TransCurve; // Taugh curve information (these must be persistent) NumericVector m_RawHighTaughtCurve, m_RawLowTaughtCurve; // Window curve information (derived from taught curve info and current settings) NumericVector m_WinHighTaughtCurve, m_WinLowTaughtCurve, m_WinHighLimitCurve, m_WinLowLimitCurve; // The last measured window curve NumericVector m_WinActualCurve; PersistentData(){} }; BOOST_CLASS_VERSION(PersistentData, 0) // BOOST_CLASS_IMPLEMENTATION(PersistentData, boost::serialization::object_class_info) #endif