/// <summary> /// Determines the size of table 93 /// </summary> /// <param name="table00">Standard Table 0 object for the current device.</param> /// <param name="table91">Standard Table 91 object for the current device.</param> /// <returns>The size of the table in bytes.</returns> // Revision History // MM/DD/YY Who Version Issue# Description // -------- --- ------- ------ --------------------------------------------- // 02/14/07 RCG 8.00.12 Created private static uint DetermineTableSize(CTable00 table00, StdTable91 table91) { uint uiTableSize = 0; uint uiWindowRcdSize = 0; // If the Bit Rate is set up to be seperately controlled this table will // contain the originate bit rate if (table91.BitRate == StdTable91.BitRateTypes.SeperatelyControlled) { // ORIGINATE_BIT_RATE : UINT32 uiTableSize += 4; } // DIAL_DELAY : UINT8 uiTableSize += 1; // Add in the Originate Phone Number record // PHONE_NUMBERS_RCD.PREFIX : ARRAY of CHAR uiTableSize += (uint)table91.PrefixLength; // PHONE_NUMBERS_RCD.NBR_ORIGINATE_NUMBERS : ARRAY of PHONE_NUMBER_RCD uiTableSize += (uint)(table91.NumberOfPhoneNumbers * table91.PhoneNumberLength); uiWindowRcdSize = WindowRcdSize(table00); // Add in the Originate Windows records // WINDOWS : ARRAY of WINDOW_RCD uiTableSize += (uint)table91.NumberOfOriginateWindows * uiWindowRcdSize; return(uiTableSize); }
/// <summary> /// Constructor /// </summary> /// <param name="psem">The PSEM object for the current session.</param> /// <param name="table00">The Table 0 object for the current device.</param> /// <param name="table91">The Table 91 object for the current device.</param> // Revision History // MM/DD/YY Who Version Issue# Description // -------- --- ------- ------ --------------------------------------------- // 02/14/07 RCG 8.00.12 Created public StdTable93(CPSEM psem, CTable00 table00, StdTable91 table91) : base(psem, 93, StdTable93.DetermineTableSize(table00, table91)) { m_Table00 = table00; m_Table91 = table91; // Determine the size of the WINDOW_RCD record m_uiWindowRcdSize = table00.STIMESize * 2 + 1; }
/// <summary> /// Calculates the size in bytes of standard table 95 /// </summary> /// <param name="table00">The table 0 object for the current device.</param> /// <param name="table91">The table 91 object for the current device.</param> /// <returns>The size of the table in bytes.</returns> private static uint DetermineTableSize(CTable00 table00, StdTable91 table91) { uint uiTableSize = 0; // If the bit rate is set up to be seperately controlled then this // table will contain the answer baud rate if (table91.BitRate == StdTable91.BitRateTypes.SeperatelyControlled) { // ANSWER_BIT_RATE : UINT32 uiTableSize += 4; } // If the meter supports lockout parameters we need to include the lockout // parameters. Notice the flag is true if there are no parameters and false // if there are lockout parameters. if (table91.NoLockoutParameters == false) { // LOCKOUT_DELAY : UINT8 // RETRY_ATTEMPTS : UINT8 // RETRY_LOCKOUT_TIME : UINT8 uiTableSize += 3; } // NBR_RINGS : UINT8 uiTableSize += 1; // If the number of answer windows is greater than zero then the meter contains // the field for rings outside of the call window if (table91.NumberOfAnswerWindows > 0) { // NBR_RINGS_OUTSIDE : UINT8 uiTableSize += 1; } // CALLER_IDS : ARRAY of CALLER_ID_RCD uiTableSize += (uint)(table91.NumberOfCallerIDs * table91.CallerIDLength); // WINDOWS : ARRAY of WINDOW_RCD uiTableSize += (uint)(table91.NumberOfAnswerWindows * StdTable93.WindowRcdSize(table00)); return(uiTableSize); }
/// <summary> /// Constructor /// </summary> /// <param name="psem">The PSEM communications object for the current session.</param> /// <param name="table00">The table 0 object for the current device.</param> /// <param name="table91">the table 91 object for the current device.</param> // Revision History // MM/DD/YY Who Version Issue# Description // -------- --- ------- ------ --------------------------------------------- // 02/21/07 RCG 8.00.12 Created public StdTable95(CPSEM psem, CTable00 table00, StdTable91 table91) : base(psem, 95, StdTable95.DetermineTableSize(table00, table91)) { m_Table00 = table00; m_Table91 = table91; }