/// <summary> /// Generate the string for a AdcpSubsystemConfig. Typically the /// ToString() is used as a key for the AdcpSubsystemConfig object. /// This will generate a string for the key so that an AdcpSubsystemConfig /// can be found in a dictionary. /// /// [SSCONFIG] SSDesc /// /// NOTE /// If the subsystem is an old revision of firmware, /// the subsystem code will be an index /// instead of the code. Use the index and the /// serial number to determine the string. /// /// </summary> /// <param name="ssConfig">SubsystemConfiguration for the AdcpSubsystemConfig.</param> /// <returns>String for the AdcpSubsystemConfig if it used the given Subsystem and SubsystemConfiguration.</returns> public static string GetString(SubsystemConfiguration ssConfig) { // NOTE // If the subsystem is an old revision of firmware, // the subsystem code will be an index // instead of the code. Use the index and the // serial number to determine the string return(ssConfig.DescString()); }
/// <summary> /// Determine if the AdcpSubsystemConfig exist in the dictionary. This will generate /// a key based off the Subsystem and SubsystemConfiguration given. It will then /// check if the key exist in the dictionary. /// </summary> /// <param name="ssConfig">SubsystemConfiguration.</param> /// <returns>TRUE = Subsystem and SubsystemConfiguration key found. / FALSE = No AdcpSubsystemConfig key.</returns> public bool AdcpSubsystemConfigExist(SubsystemConfiguration ssConfig) { // Check for null if (ssConfig == null) { return(false); } string str = ssConfig.DescString(); //return SubsystemConfigDict.ContainsKey(AdcpSubsystemConfig.GetString(ssConfig)); return(SubsystemConfigDict.ContainsKey(str)); }
/// <summary> /// Determine if the AdcpSubsystemConfig exist in the dictionary. This will generate /// a key based off the Subsystem and SubsystemConfiguration given. It will then /// check if the key exist in the dictionary. /// </summary> /// <param name="ssConfig">SubsystemConfiguration.</param> /// <returns>TRUE = Subsystem and SubsystemConfiguration key found. / FALSE = No AdcpSubsystemConfig key.</returns> public bool AdcpSubsystemConfigExist(SubsystemConfiguration ssConfig) { // Check for null if (ssConfig == null) { return false; } string str = ssConfig.DescString(); //return SubsystemConfigDict.ContainsKey(AdcpSubsystemConfig.GetString(ssConfig)); return SubsystemConfigDict.ContainsKey(str); }