Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ПРОГРАММИРОВАНИЕ_САУ_КМО.doc
Скачиваний:
12
Добавлен:
06.11.2018
Размер:
918.02 Кб
Скачать

12. Файл sys_cnst.H. Глобальные константы программы scont.C.

[1] /*########################################################*/

[2] /*

[3] Copyright (C) 2008 by A.E.Stefanovich tel. 236-2729, 268-3916

[4] Moscow State University of the Instrumentation and Informatics

[5] MGUPI

[6] Chair Information Maintenance of Systems Robototechnical and Mechatronic

[7] IS 5

[8] */

[9] /*########################################################*/

[10] /*

[11] File: SYS_CNST.h

[12] Global Constants

[13] */

[14] /*########################################################*/

[15] /*============================= Global constants */

[16] #define LF printf("\n")

[17] #define CR printf("\r")

[18] #define HT printf("\t")

[19] #define BELL printf("\a")

[20] #define ALERT_SIGNAL printf("\a\a\a")

[21] /*----*/

[22] #define STOP getch()

[23] #define CALL_OFF 0

[24] #define YES_INI 1

[25] #define NOT_INI 0

[26] #define CLIP_ON 1

[27] /*---- Windows & Drafts */

[28] #define ROW 25

[29] #define COL 80

[30] #define ROW_DRAFT_ADD 20 /* ADD. BUS for full screen 20 */

[31] #define COL_DRAFT_ADD 55 /* ADD. BUS for full screen 55 */

[32] #define ROW_DRAFT_DEV 30 /* DEVICE for full screen 30 */

[33] #define COL_DRAFT_DEV 36 /* DEVICE for full screen 36 */

[34] #define COMPRESSION_X 0.8

[35] #define COMPRESSION_ADD_Y 0.286

[36] /*-*/

[37] #define WIND_HEIGHT 1.6 /* height by char */

[38] #define WIND_INTERVAL_X 2 /* pixel */

[39] #define WIND_INTERVAL_Y 2 /* pixel */

[40] #define FONT_DIM_WIND 6 /* into Tables */

[41] #define FONT_DIM_DRAFT 4 /* into Drafts */

[42] /*########################################################*/

* * *

13. Файл sys_var.H. Глобальные переменные программы scont.C.

[1] /*########################################################*/

[2] /*

[3] Copyright (C) 2008 by A.E.Stefanovich tel. 236-2729, 268-3916

[4] Moscow State University of the Instrumentation and Informatics

[5] MGUPI

[6] Chair Information Maintenance of Systems Robototechnical and Mechatronic

[7] IS 5

[8] */

[9] /*########################################################*/

[10] /*

[11] File: SYS_VAR.h

[12] Global Variables

[13] */

[14] /*########################################################*/

[15] /*============================= Global Variables */

[16] /*---- Devices 1,2 */

[17] unsigned int A2,A1,A0,A_dec; /* ENTRY ADDRESSES */

[18] unsigned int AI0,AI1,AI2; /* Invert. Entrances ADDRESS */

[19] unsigned int C2,C1,C0,C_dec; /* ENTRY COMMANDS*/

[20] unsigned int CI0,CI1,CI2; /* Invert. Entrances COMMANDS */

[21] /*---- Buffers of the strings */

[22] char Fname_entry[80];

[23] char Fname_exit[80];

[24] char Regime_work[80];

[25] char Str_number_commands[80];

[26] char Str_counter_commands[80];

[27] char Str_add[80];

[28] char Str_com[80];

[29] char Str_int_ordered[80];

[30] char Str_int_counted[80];

[31] char Str_time_pc_ordered[80];

[32] char Str_time_pc_counted[80];

[33] char Str_date_pc_counted[80];

[34] char Str_error_sys[80];

[35] char Messages_exec[80];

[36] char Messages_next[80];

[37] /*---- Num. commands in the input file Max: 4 294 967 295 */

[38] unsigned long Number_commands=0;

[39] /*---- Counter of the commands Max: 4 294 967 295 */

[40] unsigned long Counter_commands=0;

[41] /*---- Hand or file ordered interval between the commands

[42] [milliseconds] */

[43] unsigned long Interval_ordered=0;

[44] unsigned int Hint_ord,Mint_ord,Sint_ord;

[45] /*---- Counter of the intervals Max: 4 294 967 295 s */

[46] unsigned long Interval_counted=0;

[47] /* REVERS COUNT (!!!) =Interval_ordered-Interval_counted

[48] [ look : Int_cnt() with revers */

[49] unsigned int Hint_cnt,Mint_cnt,Sint_cnt;

[50] /*---- Time PC */

[51] struct time Time_now;

[52] unsigned long Time_pc_counted=0; /* Max: 4 294 967 295 s */

[53] unsigned int H,M,S;

[54] /*---- Time ordered */

[55] unsigned int Ho,Mo,So;

[56] unsigned long Time_ordered=0; /* Max: 4 294 967 295 s */

[57] /*---- Files */

[58] FILE *Fp1,*Fp2;

[59] FILE *FpBC_0,*FpBC_1,*FpBC_2,*FpBC_3,*FpBC_4,*FpBC_5,*FpBC_6,*FpBC_7;

[60] /*---- Tables */

[61] int Maxx,Maxy; /* Max. dimens. of the screen in the pix. */

[62] /*---- Tables 1 (Left) */

[63] int Left_x_1;

[64] int Right_x_1;

[65] int Left_y_1;

[66] int Right_y_1;

[67] /*---- Tables 2 (Right) */

[68] int Left_x_2;

[69] int Right_x_2;

[70] int Left_y_2;

[71] int Right_y_2;

[72] /*----*/

[73] int Font[8]; /* NN user characters */

[74] /*---- Texts of the Title sheet */

[75] char *Title_1=

[76] " Moscow State University of the Instrumentation and Informatics ";

[77] char *Title_2=

[78] " S Y S T E M C O N T R O L A E S ";

[79] char *Title_3=

[80] " Student: L.V. Doronina ";

[81] char *Title_4=

[82] " Group: IS 5-94-02 (d); Code: 94505 ";

[83] char *Title_5=

[84] " Discipline: Programming (3403) ";

[85] char *Title_6=

[86] " Specialty: 2204.01 ";

[87] char *Title_7=

[88] " Chair Information Maintenance of Systems Robototechnical and Mechatronic IS 5 ";

[89] char *Title_8=

[90] " Teacher: A.E. Stefanovich ";

[91] char *Title_9=

[92] " Year: 2008 ";

[93] char *Title_10=" ( a u t o m a t ) ";

[94] char *Title_11=" ( a u t o m a t with Black Case ) ";

[95] /*----*/

[96] int Flag_ini;

[97] /*########################################################*/

* * *