?? device.h
字號:
// device.h: interface for the device class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DEVICE_H__82D39F22_6DB7_460D_A350_BEC66C7CC5D3__INCLUDED_)
#define AFX_DEVICE_H__82D39F22_6DB7_460D_A350_BEC66C7CC5D3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef struct pcb
{
int id;
int devnum;
int need;
char state[8];
char name[20];
char deviceid[22];
struct neicun *nstart;//指向分配的內存
struct pcb *next;
};
struct chct
{
int channelid;
int state;
int coctnum;
struct coct *coct;
struct pcb* pcbhead;
struct pcb* pcbtail;
};
struct coct
{
int controllerid;
int state;
struct chct *chct_;
struct pcb* pcbhead;
struct pcb* pcbtail;
};
struct dct
{
char type[20];
int id;
int waite;
int busy;
struct coct *co;
int retrytimes;
struct pcb* pcbhead;
};
struct sdt
{
char type[20];
char deviceid[22];
struct dct *dct_;
int address;
struct sdt *next;
};
struct dev
{
int id;
char name[20];
bool exist;
};
struct exe
{
char pcbname[10];
char deviceid[22];
int state;
};
class device
{
public:
void exedev();
void run();
bool existdev(int n);
void outs(bool tf);
void back();
int add();
int dele();
int ask();
void init();
device();
virtual ~device();
protected:
struct chct ch[2];
struct coct co[3];
struct sdt *in;
struct sdt *out;
int inid;
int outid;
int pcbid;
struct dev indev[4];
struct dev outdev[4];
int cod[3];
struct exe exe[8];
};
#endif // !defined(AFX_DEVICE_H__82D39F22_6DB7_460D_A350_BEC66C7CC5D3__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -