Exemple #1
0
        public static void PyDevFromString(this Machine @this, string script, long address, int size, bool initable = false, string name = null, long offset = 0)
        {
            var pyDev = new PythonPeripheral(size, initable, script: script);

            @this.SystemBus.Register(pyDev, new BusPointRegistration(address, offset));
            if (!string.IsNullOrEmpty(name))
            {
                @this.SetLocalName(pyDev, name);
            }
        }
 public PeripheralPythonEngine(PythonPeripheral peripheral, Func <ScriptEngine, ScriptSource> sourceGenerator)
 {
     this.peripheral = peripheral;
     InitScope(sourceGenerator(Engine));
 }
 public PeripheralPythonEngine(PythonPeripheral peripheral)
 {
     this.peripheral = peripheral;
     InitScope(Engine.CreateScriptSourceFromString(Aggregate(Imports)));
 }