Esempio n. 1
0
        /// <summary>
        /// Full read of 2640 (Mfg 592) from the meter
        /// </summary>
        /// <returns>The PSEM response code for the read</returns>
        //  Revision History
        //  MM/DD/YY Who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  09/24/12 AF  2.70.20 TR6840 Created
        //
        public override PSEMResponse Read()
        {
            m_Logger.WriteLine(Logger.LoggingLevel.Detailed,
                               "OpenWayMFGTable2640.Read");

            PSEMResponse Result = base.Read();

            if (PSEMResponse.Ok == Result)
            {
                m_DataStream.Position = 0;

                m_FallbackEnabled       = m_Reader.ReadByte();
                m_CurrentStack          = (STACK_TYPE)m_Reader.ReadByte();
                m_LastSwitchTime        = m_Reader.ReadLTIME(PSEMBinaryReader.TM_FORMAT.UINT32_TIME).ToLocalTime();
                m_StackSwitchCount      = m_Reader.ReadUInt32();
                m_StackSwitchState      = (COMM_STACK_SWITCH_STATE)m_Reader.ReadUInt32();
                m_SwitchToWhichStack    = (STACK_TYPE)m_Reader.ReadByte();
                m_StackAfterLastSwitch  = (STACK_TYPE)m_Reader.ReadByte();
                m_StackBeforeLastSwitch = (STACK_TYPE)m_Reader.ReadByte();

                for (int iIndex = 0; iIndex < NUMBER_OF_HISTORY_RECORDS; iIndex++)
                {
                    m_StackSwitchHistoryRecords[iIndex] = new DualStackSwitchHistoryRecord();
                    m_StackSwitchHistoryRecords[iIndex].SwitchRequestSource = (STACK_SWITCH_REQUEST_SOURCE)m_Reader.ReadByte();
                    m_StackSwitchHistoryRecords[iIndex].SwitchRequestTime   = m_Reader.ReadLTIME(PSEMBinaryReader.TM_FORMAT.UINT32_TIME).ToLocalTime();
                }
            }

            return(Result);
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="psem">PSEM object for the current session</param>
 //  Revision History
 //  MM/DD/YY Who Version Issue# Description
 //  -------- --- ------- ------ -------------------------------------------
 //  09/24/12 AF  2.70.20 TR6840 Created
 //
 public OpenWayMFGTable2640(CPSEM psem)
     : base(psem, 2640, TABLE_2640_LENGTH)
 {
     m_StackSwitchHistoryRecords = new DualStackSwitchHistoryRecord[4];
 }