public ActuatorPins(IEnumerable <int> pinNumbers, PinConfig pconfig, OnOffActuator actuator)
 {
     foreach (var p in pinNumbers)
     {
         apins[p] = new ActuatorPin(pconfig, actuator);
     }
 }
        public ActuatorPins SetActuator(int pin, OnOffActuator actuator)
        {
            if (apins.ContainsKey(pin)) throw new Exception("No Pin to connect to");
            apins[pin].SetActuator(actuator);

            return this;
        }
 public ActuatorPins(IEnumerable<int> pinNumbers, PinConfig pconfig, OnOffActuator actuator)
 {
     foreach (var p in pinNumbers)
     {
         apins[p] = new ActuatorPin(pconfig, actuator);
     }
 }
 public OnOffActuators SetAllActualtorConfigs(OnOffActuator cfg)
 {
     foreach (var pinNum in actuatorConfig.Keys.ToList())
     {
         SetActuator(pinNum, cfg.Copy());
     }
     return this;
 }
 /// <summary>
 /// adds this actuator definition to all pins
 /// </summary>
 /// <param name="actuator"></param>
 /// <returns></returns>
 public ActuatorPins SetAllActuators(OnOffActuator actuator)
 {
     foreach (var p in apins.Keys)
     {
         SetActuator(p, actuator);
     }
     return this;
 }
 /// <summary>
 /// adds this actuator definition to all pins
 /// </summary>
 /// <param name="actuator"></param>
 /// <returns></returns>
 public ActuatorPins SetAllActuators(OnOffActuator actuator)
 {
     foreach (var p in apins.Keys)
     {
         SetActuator(p, actuator);
     }
     return(this);
 }
 public OnOffActuators SetAllActualtorConfigs(OnOffActuator cfg)
 {
     foreach (var pinNum in actuatorConfig.Keys.ToList())
     {
         SetActuator(pinNum, cfg.Copy());
     }
     return(this);
 }
        public ActuatorPins SetActuator(int pin, OnOffActuator actuator)
        {
            if (apins.ContainsKey(pin))
            {
                throw new Exception("No Pin to connect to");
            }
            apins[pin].SetActuator(actuator);

            return(this);
        }
Beispiel #9
0
 public ActuatorPin SetActuator(OnOffActuator actuator)
 {
     this.Actuator = actuator;
     return this;
 }
Beispiel #10
0
 public ActuatorPin(PinConfig pin, OnOffActuator actuator)
     : this(pin)
 {
     this.Actuator = actuator;
 }
 public ActuatorPin SetActuator(OnOffActuator actuator)
 {
     this.Actuator = actuator;
     return(this);
 }
 public ActuatorPin(PinConfig pin, OnOffActuator actuator)
     : this(pin)
 {
     this.Actuator = actuator;
 }
 public OnOffActuators SetActuator(int pin, OnOffActuator config)
 {
     actuatorConfig[pin] = config;
     return this;
 }
Beispiel #14
0
 public ActuatorPins(IEnumerable<int> pinNumbers, PinTypeEnum pintType, OnOffActuator actuator)
     : this(pinNumbers, new PinConfig(pintType), actuator)
 {
 }
 public ActuatorPins(IEnumerable <int> pinNumbers, PinTypeEnum pintType, OnOffActuator actuator)
     : this(pinNumbers, new PinConfig(pintType), actuator)
 {
 }
 public OnOffActuators SetActuator(int pin, OnOffActuator config)
 {
     actuatorConfig[pin] = config;
     return(this);
 }