예제 #1
0
/*************************************************
  Function:         getNumberLenByType
  Description:      获得根据设备规则获取当前类型的长度
  Input:
        type        类型

  Output:           无
  Return:           正确  len
                    错误  -1
  Others:
*************************************************/
int8 operGuiStorage::getNumberLenByType(DEVICE_TYPE_E type)
{
    int8 max = -1;
    FULL_DEVICE_NO fulldevno = get_fulldevno();
    switch(type)
    {
        case DEVICE_TYPE_MANAGER:
        case DEVICE_TYPE_AREA:
            max = 2;
            break;

        case DEVICE_TYPE_STAIR:
            if (get_sys_type() == SYS_DIGITAL_TYPE)
            {
                max = (operGuiStorage::getFullDeviceNumber())->Rule.StairNoLen;
            }
            else if (get_sys_type() == SYS_6KLG_TYPE)
            {
                max = 2;
            }
            else if (get_sys_type() == SYS_6K_TYPE || get_sys_type() == SYS_3K_TYPE || get_sys_type() == SYS_1OR2_TYPE)
            {
                max = 8;
            }
            break;

        case DEVICE_TYPE_ROOM:
            if (get_sys_type() == SYS_DIGITAL_TYPE)
            {
                max = (operGuiStorage::getFullDeviceNumber())->Rule.RoomNoLen + (operGuiStorage::getFullDeviceNumber())->Rule.StairNoLen;
            }
            else if (get_sys_type() == SYS_6KLG_TYPE)
            {
                max = 4;
            }
            else if (get_sys_type() == SYS_3K_TYPE || get_sys_type() == SYS_1OR2_TYPE)
            {
                max = 7 + 1;
            }
            else if (get_sys_type() == SYS_6K_TYPE)
            {
                max = 9 + 2;
            }
            break;

        case DEVICE_TYPE_DOOR_NET:
            max = fulldevno.Rule.StairNoLen+fulldevno.Rule.RoomNoLen;
            break;

        case DEVICE_TYPE_UNIT_MANAGER:
            max = 6;
            break;

        default:
            break;
    }

    return max;
}
예제 #2
0
void get_system_information(void)
{
	cprintf("Getting system information: ");
	cprintf("CPU...");
	_cputype=get_cpu_type();_cpuvendor=get_cpu_id();
	cprintf("\b\b\b\b\b\bFPU...");
	_fputype=get_fpu_type();_fpuinfo=get_fpu_info();
	cprintf("\b\b\b\b\b\bSYS...");
	_systype=get_sys_type();_codecpl=get_cpl();_codeiopl=get_iopl();
	_extendertype=get_extender_type();
	_dpmiflags=get_dpmi_flags();
	if((_dpmiflags&0x02)==0) _modetype=1; else _modetype=0;
	cprintf("\b\b\b\b\b\bMEM...");
	_totalmemsize=get_total_size();
	_lomemsize=get_lomem_size();
	_himemsize=get_himem_size();
	printf("\b\b\b\b\b\bDone.  \n");
}
예제 #3
0
void ShowSysInfo()
{
	unsigned long n;
	char *systab[6]={"  Clean","    XMS","   VCPI","   DPMI","WinDPMI","Unknown" };
	char *cputab[6]={ "80386","80486","80586","80686","80786","80886" };
	char *filetab[5]={ " N/A", "\"LE\"", "\"LX\"", "\"LC\"", "\"PE\"" };

	SetColor(LIGHTWHITE);
	SetBackColor(CYAN);
	OpenWindow(2,1,10,30);
	SetColor(LIGHTGREEN);
	Print_At(2,4," General Information ");

	SetColor(LIGHTBLUE);
	Print_At( 3,3,"CPU Type:");
	Print_At( 4,3,"System Type:");
	Print_At( 5,3,"Free DOS Memory:");
	Print_At( 6,3,"Free High Memory:");
	Print_At( 8,3,"Bound File Type:");
	if(extn_type==2) Print_At( 9,3,"STUB/32C Version:");
	else		 Print_At( 9,3,"DOS/32A Version:");
	Print_At(10,3,"DOS Memory Required:");
	SetColor(LIGHTWHITE);

	n=get_cpu_type();
	if(n-3 > 5)
		Print_At(3,24,"?????");
	else
		Print_At(3,24,cputab[n-3]);

	systype=n=get_sys_type();
	Print_At(4,22,systab[n]);

	n=get_lomem_size()+get_dosmem_used(mem_dos32a);
	Print_At(5,21,"%6dKB",(n/1024)+1);

	n=get_himem_size();
	Print_At(6,21,"%6dKB",n/1024);

	Print_At(8,25,filetab[file_type]);

}