/// <summary> /// 虚拟机重启 /// </summary> public void ReBoot() { if (null != SVM) { SVM.Close(); } SVM = new VisualMachine(this, MainPath, MemoryController, Complex, TimeTool, IOController, NetController); }
/// <summary> /// 虚拟机启动方法 /// </summary> /// <param name="path">启动文件路径</param> public void Boot(string path) { if (null != path) { MainPath = path; SVM = new VisualMachine(this, MainPath, MemoryController, Complex, TimeTool, IOController, NetController); } }
/// <summary> /// 虚拟机控制器构造函数 /// </summary> /// <param name="net_conn">网络连接创建组件</param> /// <param name="complex">复杂数学运算组件</param> /// <param name="time_path">时间组件文件路径</param> /// <param name="mem_size">内存大小(默认8MB)</param> /// <param name="mem_align">内存最小分配量</param> /// <param name="mem_offset">内存空闲空间分配差值</param> public VMController(INetConnect net_conn, IComplexOperation complex, string time_path = null, int mem_size = Memory_Size, short mem_align = Memory_Align, short mem_offset = Memory_Offset) { MemoryController = new MemoryUnit(mem_size, mem_align, mem_offset); IOController = new IOUnit(this); NetController = new NetUnit(net_conn, this); TimeTool = new Time(time_path); Complex = complex; SVM = null; }