Loading...
Select Version
&pagelevel(4)&pagelevel
Definitionen und Makros für den Kontrollblock EDTPARL
(arbeitsdateispezifische Einstellungen):
/* ********************************************************************* ** common typedefs ********************************************************************* */ #ifndef IEDT_TYPES typedef unsigned char iedbyte; typedef unsigned short iedshort; typedef unsigned long iedlong; typedef unsigned short iedutf16; #define IEDT_TYPES #endif /* ********************************************************************* ** IEDPARL parameter block V16 ********************************************************************* */ typedef struct IEDPARL_v16_mdl { /* interface identifier structure */ #pragma aligned 4 iedshort unit; /* function unit number : 66 */ iedbyte function; /* function number : 0 */ iedbyte version; /* interface version : 3 */ /* returncode unused, will be returned in control block IEDGLCB */ iedlong rc_nbr; /* output fields */ iedbyte first_line_window[8]; /* number of first line */ /* in window */ iedshort first_col_window; /* first column in window */ iedshort record_length_max; /* max. record length in */
/* in fullscreen mode */ iedbyte par_inf; /* INF on/off (1/0) */ iedbyte par_low; /* LOWER on/off (1/0) */ iedbyte par_hex; /* HEX on/off (1/0) */ iedbyte par_edit_long; /* EDIT-LONG on/off (1/0) */ iedbyte par_scale; /* SCALE on/off (1/0) */ iedbyte par_protection; /* PROTECTION on/off (1/0) */ iedbyte structure_symbol; /* structure symbol */ iedbyte open_flag; /* open flag (I/P/R/S/X/O) */ iedbyte empty_flag; /* empty y/n (1/0) */ iedbyte modified_flag; /* modified y/n (1/0) */ iedbyte std_file[54]; /* standard file name */ iedbyte std_library[54]; /* standard library name */ iedbyte std_plam_type[8]; /* standard plam type */ iedbyte std_code; /* standard code (E/I) */ iedbyte not_used1[3]; /* reserved */ iedbyte first_line1[8]; /* number of first line in window 1 */ iedshort first_col1; /* first column in window 1 */ iedbyte first_line2[8]; /* number of first line in window 2 */ iedshort first_col2; /* first column in window 2 */ iedbyte index_window1; /* INDEX OFF/ON/FULL (0/1/2) window 1 */ iedbyte index_window2; /* INDEX OFF/ON/FULL (0/1/2) window 2 */ /* description of opened data file */ union { iedbyte common_area[260]; /* common area */ struct { iedbyte file_name[54]; /* name of opened file or lib */ iedbyte plam_elem[64]; /* name of plam element */ iedbyte plam_vers[24]; /* name of plam version */ iedbyte plam_type[8]; /* plam type */ } file_or_plam_elem; struct { iedbyte ufs_name[256]; /* name of opened ufs file */ iedbyte code; /* code of opened ufs file (?)*/ } ufs_file; } file_description; /* reserved */ iedbyte not_used2[8]; } iedparl_v16;
/* ********************************************************************* ** IEDPARL parameter block V17 ********************************************************************* */ typedef struct IEDPARL_v17_mdl { /* interface identifier structure */ #pragma aligned 4 iedshort unit; /* function unit number : 66 */ iedbyte function; /* function number : 0 */ iedbyte version; /* interface version : 4 */ /* returncode unused, will be returned in control block IEDGLCB */ iedlong rc_nbr; /* output fields */ iedbyte first_line_window[8]; /* number of first line */ /* in window */ iedshort first_col_window; /* first column in window */ iedshort record_length_max; /* max. record length in */ /* in fullscreen mode */ iedbyte par_inf; /* INF on/off (1/0) */ iedbyte par_low; /* LOWER on/off (1/0) */ iedbyte par_hex; /* HEX on/off (1/0) */ iedbyte par_edit_long; /* EDIT-LONG on/off (1/0) */ iedbyte par_scale; /* SCALE on/off (1/0) */ iedbyte par_protection; /* PROTECTION on/off (1/0) */ iedbyte structure_symbol; /* structure symbol (if EBCDIC) */ iedbyte open_flag; /* open flag (I/P/R/S/X/O) */ iedbyte empty_flag; /* empty y/n (1/0) */ iedbyte modified_flag; /* modified y/n (1/0) */ iedbyte std_file[54]; /* standard file name */ iedbyte std_library[54]; /* standard library name */ iedbyte std_plam_type[8]; /* standard plam type */ iedbyte not_used1[4]; /* reserved */ iedbyte first_line1[8]; /* number of first line in window 1 */ iedshort first_col1; /* first column in window 1 */ iedbyte first_line2[8]; /* number of first line in window 2 */ iedshort first_col2; /* first column in window 2 */ iedbyte index_window1; /* INDEX OFF/ON/FULL (0/1/2) window 1 */ iedbyte index_window2; /* INDEX OFF/ON/FULL (0/1/2) window 2 */
/* description of opened data file */ union { iedbyte common_area[1024]; /* common area */ struct { iedbyte file_name[54]; /* name of opened file or lib */ iedbyte plam_elem[64]; /* name of plam element */ iedbyte plam_vers[24]; /* name of plam version */ iedbyte plam_type[8]; /* plam type */ } file_or_plam_elem; struct { iedbyte ufs_name[1024]; /* name of opened ufs file */ } ufs_file; } file_description; /* charset information */ iedbyte ccsn[8]; /* coded character set name */ iedbyte ccsn_global; /* ccsn is global (1/0) */ /* TODO: other local par settings? */ iedutf16 sym_structure; /* structure symbol */ } iedparl_v17; /* ********************************************************************* ** IEDPARL parameter block default ********************************************************************* */ #ifdef EDT_V17 typedef iedparl_v17 iedparl; #define IEDPARL_mdl IEDPARL_v17_mdl #else typedef iedparl_v16 iedparl; #define IEDPARL_mdl IEDPARL_v16_mdl #endif
/* ********************************************************************* ** special values in open_flag ********************************************************************* */ #define IEDPARLopen_isam 0xC9 /* 'I' ISAM file virtually opened */ #define IEDPARLopen_plam 0xD7 /* 'P' PLAM element opened */ #define IEDPARLopen_real 0xD9 /* 'R' ISAM file really opened */ #define IEDPARLopen_sam 0xE2 /* 'S' SAM file virtually opened */ #define IEDPARLopen_ufs 0xE7 /* 'X' UFS file virtually opened */ #define IEDPARLopen_no 0xD6 /* 'O' no file opened */ /* ********************************************************************* ** special on/off values ********************************************************************* */ #define IEDPARLoff 0xF0 /* '0' OFF */ #define IEDPARLon 0xF1 /* '1' ON */ /* ********************************************************************* ** special values in index ********************************************************************* */ #define IEDPARLindex_off 0xF0 /* '0' INDEX OFF */ #define IEDPARLindex_on 0xF1 /* '1' INDEX ON */ #define IEDPARLindex_full 0xF2 /* '2' EDIT FULL */ /* ********************************************************************* ** macros for initialization, access, and modification ********************************************************************* */ #define IEDPARL_UNIT_66 66 #define IEDPARL_FUNCT_0 0 #define IEDPARL_VERS_3 3 #define IEDPARL_VERS_4 4 #define IEDPARL_INIT_V16 { 66,0,3 } #define IEDPARL_INIT_V17 { 66,0,4 } #ifdef EDT_V17
#define IEDPARL_INIT IEDPARL_INIT_V17 #define IEDPARL_VERS_STD IEDPARL_VERS_4 #else #define IEDPARL_INIT IEDPARL_INIT_V16 #define IEDPARL_VERS_STD IEDPARL_VERS_3 #endif #define IEDPARL_MOD_VERS(p,v) (p).version = v #define IEDPARL_MOD_IFID(p,u,f,v) \ (p).unit = u, (p).function = f, (p).version = v