/// <summary> /// Instantiates a new New Module. /// </summary> public NewModule() : base() { #if VERBOSEDEBUG Console.Writeline("Newmodule()"); #endif Type = ICCConstants.BICCP_GRP_NEW; TypeDescription = ICCConstants.GetTypeDescription((byte)Type); }
/// <summary> /// Instantiates a new Traction Module. /// </summary> public TractionModule() : base() { #if VERBOSEDEBUG Console.Writeline("TractionModule()"); #endif Type = ICCConstants.BICCP_GRP_TRACTION; TypeDescription = ICCConstants.GetTypeDescription((byte)Type); }
/// <summary> /// Instantiates a new Lighting Module. /// </summary> public LightingModule() : base() { #if VERBOSEDEBUG Console.Writeline("LightingModule()"); #endif Type = ICCConstants.BICCP_GRP_LIGHTING; TypeDescription = ICCConstants.GetTypeDescription((byte)Type); }
/// <summary> /// Instantiates a new General Purpose Module. /// </summary> public GenPurpModule() : base() { #if VERBOSEDEBUG Console.Writeline("GenPurpModule()"); #endif Type = ICCConstants.BICCP_GRP_GENPURP; TypeDescription = ICCConstants.GetTypeDescription((byte)Type); Outputs = new bool[16]; }
private void RefreshTable() { litTitle.Text = string.Format("0x{0:X2} ({1}): {2}", _module.ID, ICCConstants.GetTypeDescription((byte)_module.Type), _module.Description); _status = _m.GET_STATUS(_bAddress); rpt.DataSource = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; rpt.DataBind(); }
private string Proceed_SET_TYPE(string[] terms) { string sReturn = string.Empty; byte bType = 0; if (terms.Length != 2) { sReturn = string.Format("-KO Wrong command format, {0} takes 1 argument(s)", terms[0]); } else if (!byte.TryParse(terms[1], NumberStyles.HexNumber, new NumberFormatInfo(), out bType)) { sReturn = string.Format("-KO Error parsing type {0}", terms[1]); } else if (!ICCConstants.CheckIfTypeExists(bType)) { sReturn = string.Format("-KO Wrong type {0:x2}", bType); } else { lock (Conf) { var mod = Conf.Modules[0x77] as IModule; if (mod == null) { sReturn = string.Format("-KO No new module at address 0x77"); } else { mod.SetType(bType); sReturn = "+OK"; } } } return(sReturn); }