public void BindGPIOConfiguration(GPIOConfiguration configuration) { Broken.SetPins(configuration.BrokenPins); BrokenAndBuilding.SetPins(configuration.BrokenBuildingPins); Building.SetPins(configuration.BuildingPins); NotConnected.SetPins(configuration.NotConnectedPins); Success.SetPins(configuration.SuccessPins); }
public void PersistGPIOConfiguration(GPIOConfiguration configuration) { configuration.BrokenPins = Broken.GetPins(); configuration.BrokenBuildingPins = BrokenAndBuilding.GetPins(); configuration.BuildingPins = Building.GetPins(); configuration.NotConnectedPins = NotConnected.GetPins(); configuration.SuccessPins = Success.GetPins(); }
public GPIOController(IProjectMonitor monitor, GPIOConfiguration configuration) { this._Monitor = monitor; this._Configuration = configuration; this._Mapper = new GPIOPinMapper(); this._Mapper.DisableAllPins(); this._Monitor.Polled += new MonitorPolledEventHandler(_Monitor_Polled); _Map.Add(ProjectState.Broken, (c) => c.BrokenPins); _Map.Add(ProjectState.BrokenAndBuilding, (c) => c.BrokenBuildingPins); _Map.Add(ProjectState.Building, (c) => c.BuildingPins); _Map.Add(ProjectState.NotConnected, (c) => c.NotConnectedPins); _Map.Add(ProjectState.Success, (c) => c.SuccessPins); _Mapper.EnablePins(_Map[ProjectState.NotConnected](_Configuration)); }