⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 devicemanager.h

📁 一款国产的8051模拟器(全部源代码) 本软件是一款8051模拟器
💻 H
字号:
// DeviceManager.h: interface for the DeviceManager class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DEVICEMANAGER_H__00B73D42_19CB_4F0E_9505_BDFCB1BE2877__INCLUDED_)
#define AFX_DEVICEMANAGER_H__00B73D42_19CB_4F0E_9505_BDFCB1BE2877__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include ".\CPU\GlobalVar.h"
#include ".\CPU\SerialBus.h"
#define ID_TYPE_8051CPU 0
#define ID_TYPE_SerialBus 1
#define ID_TYPE_MEM 3

//ID_IS_CFG标志着此设备是否已配置
#define ID_IS_CFG 0x01
struct Deviceinfo
{
	void * DevicePoint;//指向设备类指针
	TCHAR * pDeviceName;//设备名称
	DWORD flag;
};
struct DeviceTCB//一类设备的设备控制块,包含所有已创建的这类设备的指针以及名称
{
	Deviceinfo DEVICEINFO[256];
	BYTE Currentpos;
	DWORD DeviceType;
};


class DeviceManager  
{
public:	
	int STOP();
	int RUN();
	void * CreateDevice(DWORD DeviceType,TCHAR * DeviceName);
	DeviceTCB * GetDeviceListPoint(DWORD DeviceType);
	int init();
	DeviceTCB DTCB[256];
	instruction * pinst;
	DeviceManager();
	CWinThread * pcpurunthread;
	virtual ~DeviceManager();
	int isrun,isrunth;//isrun用于输入给线程控制其运行于停止,isrunth是处理器线程发回的是否运行的状态


private:
	
	void * CreateMem(TCHAR * pName);
	void * Create8051CPU(TCHAR * DeviceName);
	void * CreateSerialBus(TCHAR *DeviceName);
};
extern DeviceManager DeviceMag;
#endif // !defined(AFX_DEVICEMANAGER_H__00B73D42_19CB_4F0E_9505_BDFCB1BE2877__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -