protected GpioTimedModuleBase(GpioController controller, ReadingMode mode, int timerPeriod) : base(mode, timerPeriod) { Controller = controller; // Shows an error if there is no GPIO controller if (Controller == null) throw new ArgumentException("No GPIO controller found."); }
public TimedModule(ReadingMode mode, int timerPeriod) { this.timerPeriod = timerPeriod; this.mode = mode; timer = new Timer(CheckState, null, Timeout.Infinite, Timeout.Infinite); }
private void Initialize(ReadingMode newMode) { this.mode = newMode; if (mode == ReadingMode.Continuous) timer.Change(0, timerPeriod); else timer.Change(Timeout.Infinite, Timeout.Infinite); }
public Dht11HumitureSensor(int pinNumber, ReadingMode mode = ReadingMode.Continuous) : base(mode, TIMER_PERIOD) { var gpio = GpioController.GetDefault(); var pin = gpio.OpenPin(pinNumber); dht11 = new Dht11(pin); base.Initialize(); }
public ModuleDefinition GetResourceModule (string name, ReadingMode mode) { return ModuleDefinition.ReadModule (GetAssemblyResourcePath (name, GetType ().Assembly), new ReaderParameters (mode)); }
protected ModuleReader(Image image, ReadingMode mode) { this.image = image; this.module = new ModuleDefinition(image); this.module.ReadingMode = mode; }
public ReaderParameters(ReadingMode readingMode) { this.reading_mode = readingMode; }
public ModuleDefinition GetResourceModule(string name, ReadingMode mode) { return(ModuleDefinition.ReadModule(GetAssemblyResourcePath(name, GetType().Assembly), new ReaderParameters(mode))); }
public ReaderParameters(ReadingMode readingMode) { this.reading_mode = readingMode; this.throw_symbols_mismatch = true; }
public Bmp180BarometricSensor(int slaveAddress = DefaultI2cAddress, ReadingMode mode = ReadingMode.Continuous, I2cBusSpeed busSpeed = I2cBusSpeed.StandardMode, I2cSharingMode sharingMode = I2cSharingMode.Shared, string i2cControllerName = RaspberryPiI2cControllerName) : base(slaveAddress, mode, DEFAULT_READ_INTERVAL, busSpeed, sharingMode, i2cControllerName) { }
public GpioTimedModuleBase(ReadingMode mode, int timerPeriod) : this(GpioController.GetDefault(), mode, timerPeriod) { }
ModuleDefinition GetResourceModule(string name, ReadingMode mode) { throw new NotImplementedException(); }
AssemblyDefinition ReadAssembly(string name, ReadingMode readingMode) { var matchingAssembly = _allAssemblies.FirstOrDefault(x => x.AssemblyName.Name == name); return(matchingAssembly != null?AssemblyDefinition.ReadAssembly(matchingAssembly.File.Path.FullPath, new ReaderParameters(readingMode) { AssemblyResolver = this }) : null); }
AssemblyDefinition ReadAssembly(string name, ReadingMode readingMode) { var matchingAssembly = _allAssemblies.FirstOrDefault(x => x.AssemblyName.Name == name); return matchingAssembly != null ? AssemblyDefinition.ReadAssembly(matchingAssembly.File.Path.FullPath, new ReaderParameters(readingMode) { AssemblyResolver = this}) : null; }
public static ModuleDefinition GetResourceModule(string name, ReadingMode mode) { return(ModuleDefinition.ReadModule(GetAssemblyResourcePath(name, typeof(BaseTestFixture).Assembly), new ReaderParameters(mode))); }
public static ModuleDefinition GetResourceModule (string name, ReadingMode mode) { return ModuleDefinition.ReadModule (GetAssemblyResourcePath (name, typeof (BaseTestFixture).Assembly), new ReaderParameters (mode)); }
public ReaderParameters(ReadingMode readingMode) { this.reading_mode = readingMode; this.allow_any_corlib = true; }