/// <summary> /// Initialises a PwmController bound to the specified pin on a PiFace Digital /// device, with the specified cycle period. The initial duty load is also set /// to the specified value, although the "Start" method must be called to /// start the controller. /// </summary> /// <param name="piface"></param> /// <param name="outputPin"></param> /// <param name="period"></param> /// <param name="duty"></param> public PwmPinController(IPiFaceDevice piface, byte outputPin, int period, float duty) : base(piface) { // copy the parameters locally this.OutputPin = outputPin; this.SetTimers(period, duty); }
/// <summary> /// Creates a new PiFaceTcpServer that is bound to the specified IPiFaceDevice. /// </summary> /// <param name="device"> /// The device to bind to. This doesn't have to be a pyhsical device - for example /// a PiFaceEmulator device could be used instead. /// </param> /// <param name="localEndPoint"></param> public PiFaceTcpServer(IPiFaceDevice device, IPEndPoint localEndPoint) { // validate the parameters if (device == null) { throw new ArgumentNullException("device"); } if (localEndPoint == null) { throw new ArgumentNullException("localEndPoint"); } // copy the parameters locally this.PiFaceDevice = device; this.LocalEndPoint = localEndPoint; }
/// <summary> /// Creates a new PiFaceTcpServer that is bound to the specified IPiFaceDevice. /// </summary> /// <param name="device"> /// The device to bind to. This doesn't have to be a pyhsical device - for example /// a PiFaceEmulator device could be used instead. /// </param> /// <param name="localEndPoint"></param> public PiFaceTcpServer(IPiFaceDevice device, IPEndPoint localEndPoint) { // validate the parameters if (device == null) { throw new System.ArgumentNullException("device"); } if (localEndPoint == null) { throw new System.ArgumentNullException("localEndPoint"); } // copy the parameters locally this.PiFaceDevice = device; this.LocalEndPoint = localEndPoint; }
/// <summary> /// Initialises a BlinkController bound to the specified pin on a PiFace Digital /// device. /// </summary> /// <param name="piface"></param> /// <param name="outputPin"></param> /// <param name="interval"> /// The number of milliseconds between turning the output pin on and off. /// </param> public BlinkingPinController(IPiFaceDevice piface, byte outputPin, int interval) : base(piface) { this.OutputPin = outputPin; this.Interval = interval; }
/// <summary> /// Initialises a PwmController bound to the specified pin on a PiFace Digital /// device, with the specified cycle period. The initial duty load is set to zero, /// and the "Start" method must be called to start the controller. /// </summary> /// <param name="piface"></param> /// <param name="outputPin"></param> /// <param name="period"></param> public PwmPinController(IPiFaceDevice piface, byte outputPin, int period) : this(piface, outputPin, period, 0) { }
/// <summary> /// Creates a new background pin controller that is bound to the specified /// PiFace Digital device. /// </summary> /// <param name="piface"></param> protected BackgroundPinController(IPiFaceDevice piface) : base(piface) { }
/// <summary> /// Initialises a new pin controller and binds it to a specific PiFace Digital device. /// </summary> /// <param name="piface"> /// A reference to the PiFace Digital device to control the output pins on. /// </param> protected PinControllerBase(IPiFaceDevice piface) { this.PiFace = piface; }