Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 private static PythonPeripheral CreatePeripheral(Func<ScriptEngine, ScriptSource> source, int size, bool initable)
 {
     var peripheral = new PythonPeripheral(size, initable, source);
     return peripheral;
 }
Exemplo n.º 3
0
 public PeripheralPythonEngine(PythonPeripheral peripheral, Func<ScriptEngine, ScriptSource> sourceGenerator)
 {
     this.peripheral = peripheral;
     InitScope(sourceGenerator(Engine));
 }
Exemplo n.º 4
0
 public PeripheralPythonEngine(PythonPeripheral peripheral)
 {
     this.peripheral = peripheral;
     InitScope(Engine.CreateScriptSourceFromString(Aggregate(Imports)));
 }
Exemplo n.º 5
0
 public PeripheralPythonEngine(PythonPeripheral peripheral, Func <ScriptEngine, ScriptSource> sourceGenerator)
 {
     this.peripheral = peripheral;
     InitScope(sourceGenerator(Engine));
 }
Exemplo n.º 6
0
 public PeripheralPythonEngine(PythonPeripheral peripheral)
 {
     this.peripheral = peripheral;
     InitScope(Engine.CreateScriptSourceFromString(Aggregate(Imports)));
 }
Exemplo n.º 7
0
        private static PythonPeripheral CreatePeripheral(Func <ScriptEngine, ScriptSource> source, int size, bool initable)
        {
            var peripheral = new PythonPeripheral(size, initable, source);

            return(peripheral);
        }