public Participant(string id, Role role, ECOMMS_Entity.Type type) : base(id, role, type) { //start with role as name, expect derived class to set //decide if we want to pass in constructor name = role.ToString(); }
public Client( string id, Role role, ECOMMS_Entity.Type type) : base(id, role, type) { name = "NONAME"; //will fetch from participant }
/// <summary> /// return a participant instance to the manager /// </summary> /// <param name="address"></param> /// <param name="role"></param> /// <param name="type"></param> /// <param name="subType"></param> /// <returns></returns> public IClient getClientFor(string address, Role role, ECOMMS_Entity.Type type, SubType subType) { IClient client = null; switch (role) { case Role.Instrument: client = new SimInstrumentClient(address); //new InstrumentClient(address, type); break; } return(client); }
/// <summary> /// return a participant instance to the manager /// </summary> /// <param name="address"></param> /// <param name="role"></param> /// <param name="type"></param> /// <param name="subType"></param> /// <returns></returns> public IClient getClientFor(string address, Role role, ECOMMS_Entity.Type type, SubType subType) { IClient client = null; Console.WriteLine("...SimFactory.getClientFor() address: " + address); Console.WriteLine(" role: " + role + " type: " + type + " subType: " + subType); switch (role) { case Role.Instrument: client = new SimClient(address); break; case Role.Sensor: client = new SimSensorClient(address); break; default: Console.WriteLine("...create generic client"); client = new Client(address, role, type); break; } return(client); }
public ServiceParticipant( string id, Role role, ECOMMS_Entity.Type type) : base(id, role, type) { }
public InstrumentParticipant(string address, ECOMMS_Entity.Type type) : base(address, Role.Instrument, type) { location = "NOT SET"; }
//nop for now //provide instrument common client behvavior here public InstrumentClient(string id, ECOMMS_Entity.Type type) : base(id, Role.Instrument, type) { }