Example #1
0
 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();
 }
Example #2
0
 public Client(
     string id,
     Role role,
     ECOMMS_Entity.Type type) :
     base(id, role, type)
 {
     name = "NONAME"; //will fetch from participant
 }
Example #3
0
        /// <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);
        }
Example #4
0
        /// <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);
        }
Example #5
0
 public ServiceParticipant(
     string id,
     Role role,
     ECOMMS_Entity.Type type) : base(id, role, type)
 {
 }
Example #6
0
 public InstrumentParticipant(string address, ECOMMS_Entity.Type type) :
     base(address, Role.Instrument, type)
 {
     location = "NOT SET";
 }
Example #7
0
 //nop for now
 //provide instrument common client behvavior here
 public InstrumentClient(string id, ECOMMS_Entity.Type type) :
     base(id, Role.Instrument, type)
 {
 }