コード例 #1
0
        /// <summary>
        /// Determines the size of the table.
        /// </summary>
        /// <param name="Table00">Table 0 object for the current device.</param>
        /// <param name="Table2139">Table 2139 object for the current device</param>
        /// <returns>The size of the table in bytes</returns>
        //  Revision History
        //  MM/DD/YY who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  05/06/08 RCG 1.50.22 N/A    Created

        public static uint GetTableSize(CTable00 Table00, OpenWayMFGTable2139 Table2139)
        {
            uint uiTableSize = 0;

            // RECONNECT_OPTION
            uiTableSize += 1;
            // MAX_SWITCHES
            uiTableSize += 1;
            // MAX_SWITCH_PERIOD
            uiTableSize += Table00.TIMESize;
            // RANDOMIZATION_ALARM
            uiTableSize += Table00.TIMESize;
            // RESTORATION_START_DELAY
            uiTableSize += Table00.TIMESize;
            // RESTORATION_RANDOM_DELAY
            uiTableSize += Table00.TIMESize;
            // OPEN_TIME
            uiTableSize += Table00.TIMESize;
            // RETRY_ATTEMPTS
            uiTableSize += 1;
            // THRESHOLDS
            uiTableSize += Table2139.NumberOfThresholds * THRESHOLD_SIZE;

            return(uiTableSize);
        }
コード例 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="psem">The PSEM communications object.</param>
        /// <param name="Table00">Table 0 object for the current device</param>
        /// <param name="Table2139">Table 2139 object for the current device</param>
        //  Revision History
        //  MM/DD/YY who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  05/06/08 RCG 1.50.22 N/A    Created

        public OpenWayMFGTable2141(CPSEM psem, CTable00 Table00, OpenWayMFGTable2139 Table2139)
            : base(psem, 2141, OpenWayMFGTable2141.GetTableSize(Table00, Table2139))
        {
            m_byNumberOfThresholds = Table2139.NumberOfThresholds;
            m_Thresholds           = new List <DisconnectThreshold>();
        }