/*public string GenerateSetCommand(IParam Param) * { * return "AT" + ATNumber + "=" + Param.ToString(); * }*/ public static ISetting GenerateSettingFromRFD900Setting(RFD.RFD900.TSetting Setting, uploader.Uploader.Board Board, uploader.Uploader.Frequency Freq, bool Async) { TSettingDescription Desc = TDesignatorLookupTable.TABLE.GetDescription(Setting.Name); if (Desc == null) { Desc = new TSettingDescription(Setting.Name, Setting.Name, Setting.Name); } //If there's no range or options... if ((Setting.Options == null) && (Setting.Range == null)) { if (Desc is TSettingDescWithID) { //This has to be referred back to a lookup table for this modem model in order to generate its setting. var TheMap = Map.TModemSettingMap.GetMapForModem(Board, Freq, Async); return(TheMap.GenerateSetting(((TSettingDescWithID)Desc).ID, Setting)); } else { TIntegerSettingFromSettingDescriptor ISFSD = new TIntegerSettingFromSettingDescriptor(Desc.Name, Desc.Description, Setting); return(ISFSD.CreateNewSetting()); } } else { if ((Setting.Options == null) && (Setting.Range.Min == 0) && (Setting.Range.Max == 1)) { TBoolSettingFromSettingDescriptor BSFSD = new TBoolSettingFromSettingDescriptor(Desc.Name, Desc.Description, Setting); return(BSFSD.CreateNewSetting()); } else { TMultiSettingDescriptor MSD = new TMultiSettingDescriptor(Desc.Name, Desc.Description, Setting); return(MSD.CreateNewSetting()); } } }
public TMultiSetting(TMultiSettingDescriptor Descriptor, int Default) : base(Descriptor, Default) { }