Esempio n. 1
0
        /// <summary>
        /// Determines the size of the table.
        /// </summary>
        /// <param name="table0">The Table 0 object for the current device.</param>
        /// <param name="table2409">The Table 61 object for the current device.</param>
        /// <returns>The size of the table in bytes.</returns>
        // Revision History
        // MM/DD/YY who Version Issue# Description
        // -------- --- ------- ------ ---------------------------------------
        // 12/06/11 RCG 2.53.14 N/A    Created

        private static uint DetermineTableSize(CTable00 table0, OpenWayMFGTable2409 table2409)
        {
            uint uiTableSize = 0;
            LPSetActualLimits SetLimits;

            if (table0.IsTableUsed((ushort)MFGLPDataSet.Set1))
            {
                SetLimits    = table2409.Set1ActualLimits;
                uiTableSize += LPSetDataSelection.Size(SetLimits.NumberOfChannels, SetLimits.IncludeScalarDivisor, true);
            }

            if (table0.IsTableUsed((ushort)MFGLPDataSet.Set2))
            {
                SetLimits    = table2409.Set2ActualLimits;
                uiTableSize += LPSetDataSelection.Size(SetLimits.NumberOfChannels, SetLimits.IncludeScalarDivisor, true);
            }

            if (table0.IsTableUsed((ushort)MFGLPDataSet.Set3))
            {
                SetLimits    = table2409.Set3ActualLimits;
                uiTableSize += LPSetDataSelection.Size(SetLimits.NumberOfChannels, SetLimits.IncludeScalarDivisor, true);
            }

            if (table0.IsTableUsed((ushort)MFGLPDataSet.Set4))
            {
                SetLimits    = table2409.Set4ActualLimits;
                uiTableSize += LPSetDataSelection.Size(SetLimits.NumberOfChannels, SetLimits.IncludeScalarDivisor, true);
            }

            return(uiTableSize);
        }
Esempio n. 2
0
        /// <summary>
        /// Determines the size of the table.
        /// </summary>
        /// <param name="Table0">The Table 0 object for the current device.</param>
        /// <param name="table2409">The Table 61 object for the current device.</param>
        /// <param name="table2410"> The Table 62 object for the current device</param>
        /// <returns>The size of the table in bytes.</returns>
        // Revision History
        // MM/DD/YY who Version Issue# Description
        // -------- --- ------- ------ ---------------------------------------
        // 12/06/11 RCG 2.53.14 N/A    Created

        private static uint DetermineTableSize(CTable00 Table0, OpenWayMFGTable2409 table2409, OpenWayMFGTable2410 table2410)
        {
            uint uiTableSize = 0;

            uiTableSize += table2409.Set4ActualLimits.NumberOfBlocks
                           * LPBlockDataRecord.Size(Table0, table2409, table2410, LPDataSet.Set4);

            return(uiTableSize);
        }
Esempio n. 3
0
        /// <summary>
        /// Public Constructor to be used when creating this table.
        /// </summary>
        /// <param name="psem">The PSEM communications object for the current session.</param>
        /// <param name="table0">The table 0 object for the current device.</param>
        /// <param name="table2409">The table 61 object for the current device.</param>
        /// <param name="table2410">The table 62 object for the current device.</param>
        // Revision History
        // MM/DD/YY who Version Issue# Description
        // -------- --- ------- ------ ---------------------------------------
        // 12/06/11 RCG 2.53.14 N/A    Created

        public OpenWayMFGTable2415(CPSEM psem, CTable00 table0, OpenWayMFGTable2409 table2409, OpenWayMFGTable2410 table2410)
            : base(psem, 2415, DetermineTableSize(table0, table2409, table2410), table0, table2409, table2410, LPDataSet.Set4)
        {
        }
Esempio n. 4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="psem">The PSEM Communications object for the current session</param>
        /// <param name="table0">The Table 0 object for the current device</param>
        /// <param name="table2409">The Table 2408 object for the current device</param>
        /// <param name="Table2392">The Table 2392 object for the current device</param>
        // Revision History
        // MM/DD/YY who Version Issue# Description
        // -------- --- ------- ------ ---------------------------------------
        // 12/06/11 RCG 2.53.14 N/A    Created

        public OpenWayMFGTable2410(CPSEM psem, CTable00 table0, OpenWayMFGTable2409 table2409, OpenWayMFGTable2392 Table2392)
            : base(psem, table0, table2409, Table2392, 2410, DetermineTableSize(table0, table2409))
        {
            // This table uses a two byte format so we need to make sure this is set in order to read the table properly.
            m_UsesTwoByteFormat = true;
        }