home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
plawo22i.zip
/
PLWIDIS1.ZIP
/
ff
/
inc
/
eapimsg.h
Wrap
Text File
|
1992-07-28
|
27KB
|
618 lines
/*************************************************************************
*
* PlantWorks - Interface Services/2
* 5713-ADM
*
*************************************************************************/
/*************************************************************************
*
* DESCRIPTION: This is the IS/2 message definition file
* Line length must < 72 char. for portability
*************************************************************************/
/*
* IS/2 Transaction message definitions
*/
/*
** IS/2 Transaction ID Codes. These codes are used by the IS/2 Client on tid.
*/
#define EA_AUTHORIZE 1 /* start an IS/2 session */
#define EA_EXIT 2 /* exit an IS/2 session */
#define EA_SYMLOOKUP 3 /* symbol look up */
#define EA_VARINIT 4 /* initialize variable set */
#define EA_VARDELETE 5 /* delete variable set ID */
#define EA_READ 6 /* read data,variable/record */
#define EA_CANCEL 7 /* cancel a pending read */
#define EA_WRITE 8 /* write data, variable/record */
#define EA_TRIGCHAIN 9 /* trigger a chain to run */
#define EA_PRINT 10 /* print request */
#define EA_ALARM 11 /* modify/set an alarm */
#define EA_RECINIT 12 /* initialize a record ID */
#define EA_RECDELETE 13 /* delete a record ID */
#define EA_ERROR_MSG 14 /* error response message */
#define EA_AUTHERROR 15 /* authorization failure (int) */
#define MAX_T_ID 15 /* MAX T_ID no. */
/*
* IS/2 server resource name known to IS/2 client user
*/
#define EA_SERVER_NAME "EAPI.CS2NODE"
/*
* IS/2 server DAE resource name this is the resource name that IS/2 Client
* program used to send msg to
*/
#define EA_SEND_NAME "EAPISEND.CS2NODE"
/*
* IS/2 server DAE resource name the ea_send register on, but all of msg
* should send to "EAPI.nodename"
*/
/*
* processor type, used by ear_authorize.proc_type
*/
#define EA_CS2 1 /* 80286 + DAE CPU type */
#define EA_APPC2 2 /* 80286 + APPC CPU type */
#define EA_APPCMVS 3 /* 370 MVS+APPC+VTAM */
#define EA_USR1 4 /* user supplied conversion 1 */
#define EA_USR2 5 /* user supplied conversion 2 */
#define MAX_CPU_TYPE 5 /* max CPU type */
#define EA_APPCVM EA_APPCMVS /* 370 VM+APPC+VTAM */
/*
* Size of various data fields
*/
#define MAX_AUTH 32 /* max length of user name */
#define MAX_PASSWD 32 /* max length of password */
#define MAX_SYMB 32 /* max length of a symbol */
#define MAX_FILE_NAME 12 /* max length of File name */
#define MAX_EA_MSG 0x8000 /* max length of IS/2 msg */
#define MAX_CS2_RESOURCE_NAME 18 /* max length DAE resource name */
#define NUMVAR 1 /* Min number of variable */
/*
* transaction status, used by eas_header.status
*/
/* MNEMONIC NUMERIC VALUE */
#define EA_ERROR -1
#define EA_SUCCESS 0 /* Request successfully completed. */
#define EA_OK EA_SUCCESS
#define EA_NOPW 1 /* Request aborted - The PlantWorks
* system is unavailable due to
* processor or communications
* failure, or intentional PlantWorks
* shutdown. If this code is returned
* in a PW_STATUS array entry for an
* EA_READ/EA_WRITE request, it
* indicates that the specific
* variable was not transferred */
#define EA_BADPARAM 2 /* Request aborted - One or more of
* parameters in the request contain
* illegal values. See individual msg
* descriptions for specifics. */
#define EA_INSUFFPARAM 3 /* Request aborted - Fewer parameters
* were supplied with the request than
* are required. */
#define EA_NOMEM 4 /* Request aborted -Insufficient
* dynamic memory is available to the
* requesting program to process the
* request. */
#define EA_NOFFMEM 5 /* Request aborted -Insufficient
* dynamic memory is available in the
* PlantWorks system to process the
* request. */
#define EA_NOSYMBOL 6 /* Request aborted - A PlantWorks
* symbol specified in the request
* does not exist in the PlantWorks
* symbol table */
#define EA_BADSYMTYPE 7 /* Request aborted - The type code for
* a PlantWorks symbol specified in
* the request does not agree with the
* type in the PlantWorks symbol table */
#define EA_SYMAMBIG 8 /* Request aborted -A PlantWorks
* symbol as specified in the request
* is not unique. */
#define EA_IOERROR 9 /* Request aborted - An unrecoverable
* I/O error was encountered in the
* PlantWorks system. */
#define EA_ILLEGALREQ 10 /* Request aborted - The request
* resulted in an illegal request
* return from the PlantWorks service
* request */
#define EA_OVERRUN 11 /* Partial data was transmitted. There
* was insufficient buffer space
* available. The first part of the
* data for which space was provided
* has been transferred. */
#define EA_NOSPOOL 13 /* Printing was not performed.
* Spooling required in the PlantWorks
* system but unavailable for use. */
#define EA_NODEVICE 14 /* The requested device is not defined
* in the PlantWorks system */
#define EA_MULTVARERR 16 /* Request aborted - There were
* multiple variable specific errors.
* Check the PW_STATUS array for
* detailed error information. */
#define EA_PARTIALXFER 17 /* Request partially successful - One
* or more variables were not
* transferred.Check the PW_STATUS
* array for detailed error
* information. */
#define EA_NOPRIV 20 /* Request aborted - initialization
* has not been done or the requesting
* program has insufficient privilege
* for the requested function. */
#ifdef REL_2_0
#define EA_NOTCANCELLED 21 /* Request aborted - attempted to
* delete a database entry for which
* an asynchronous transfer is still
* taking place. A request to
* ea_cancel will facilitate success
* here. */
#endif
#define EA_CURRENT 22 /* Request aborted - attempted to
* reissue a request to ea_read with a
* varset_id which is already active. */
#define EA_BADSEQUENCE 28 /* Bad msg sequence, msg out of
* sequence */
#define EA_BADSIZE 29 /* Bad msg size, or msg length not
* consistent */
#define EA_NOVARSET 30 /* use varset_id/record_id before its
* defined */
#define EA_MAX_ERROR 30 /* MAXIMUM ERROR codes */
#define EA_OK_NOP 100 /* procedure function OK, don't send
* response msg */
/*
* EA_EXIT Type Codes -----------------------------
* used by ear.mode
*/
#define EA_EXIT_WAIT 0 /* exit with wait */
#define EA_EXIT_IMMEDIATELY 1 /* exit immediately, do not wait for
* any outstanding response */
/*
* Real Time Transfer Type Codes -----------------------------
*
* These are the definitions of the Real Time Transfer Type
* code. Variable type codes.
* Used by ear_varinit.pw_type,
* ear_recinit.pw_type,
* and eas_symlookup.data_type
*/
/*
* MNEMONIC NUMERIC VALUE
*/
#define EAD_FLAG 0x2 /* Flag - P_ORDINAL */
#define EAD_INT1 0x3 /* Byte - P_BYTE */
#define EAD_INT2 0x4 /* Integer - P_INTEGER */
#define EAD_FLOAT 0x5 /* Real - P_FLOAT */
#define EAD_INT4 0x6 /* Long Integer- P_LONG */
#define EAD_CHAR 0x8 /* TEXT string */
#define EAD_RECORD 0x11 /* Record, =S_SARRAY */
#define EAD_RECFORMAT 0x13 /* Record format =S_SKELTN */
#define EAD_ALARM 0x17 /* ALARM, =S_ALARM */
#define EAD_CHAIN 0x18 /* Chain */
#define EAD_TIMESTAMP 0x19 /* timestamp */
#define EAD_ARRAY 0x80 /* Array Element. */
#define EAD_OTHERS 0x1000 /* other types */
#define EAD_CHAR_MAX 255 /* max size of char string */
/*
* Internal definition
*/
#define EAD_FILLER 0x1 /* msg filler */
#define EAD_DOUBLE 0x7 /* Double- P_DOUBLE */
#define EAD_SHORT EAD_INT2 /* Short Integer */
#define EAD_REAL EAD_FLOAT /* Real - P_FLOAT */
#define EAD_SYMB 0xd /* FF symbol */
#define EAD_TEXT 0xe /* FF text, 64k max */
/*
* Transfer Type codes. Used by ear_varinit.transfer_type
* and ear_recinit.transfer_type
*
*/
/* MNEMONIC NUMERIC VALUE */
#define EAI_DEMAND 1 /* Demand read. */
#define EAI_WRITE 64 /* Overwrite output. */
#define EAI_TRIG_TTOF 4 /* Triggered read - true to false. */
#define EAI_TRIG_FTOT 8 /* Triggered read - false to true. */
#define EAI_TRIG_ANY 16 /* Triggered read - any. */
#define EAI_INCR 128 /* Incremental output. */
/*
** Alarm status values (copied from alarm.h)
** Documented in the "Definition Services/2" manual.
*/
#define ALM_NORMAL 0x00
#define ALM_IN_ALARM 0x01
#define ALM_HIGH 0x02
#define ALM_HIGH_HIGH 0x03
#define ALM_INSTR_HIGH 0x04
#define ALM_OUT_CLAMP_HIGH 0x05
#define ALM_LOW 0x06
#define ALM_LOW_LOW 0x07
#define ALM_INSTR_LOW 0x08
#define ALM_OUT_CLAMP_LOW 0x09
/*
* These are the IS/2 msg format definitions for each request/response msg
*/
#define FF_HEADER 0x02 /* FF msg basic header */
#define BINARY_APPC 'B' /* APPC binary message tag */
#define OS2_APPC_HEADER 1 /* length of OS/2 APPC header */
#define VTAM_APPC_HEADER 1 /* length of VTAM APPC header */
struct ea_cs2_header
{ /* message header from DAE */
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
};
struct ea_ap2_header
{ /* message header for OS/2 APPC */
char mts[OS2_APPC_HEADER];
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
};
struct ea_apv_header
{ /* message header for MVS/VTAM APPC */
char mts[VTAM_APPC_HEADER];
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
};
struct ear_header
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
};
struct eas_header
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
};
struct ear_alarm
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
char alarm_name[MAX_SYMB]; /* alarm name */
short transition; /* new alarm state */
short data_length; /* buffer length in data */
char alarm_data[NUMVAR]; /* the alarm data */
};
struct eas_alarm
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
};
struct ear_authorize
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
char proc_type; /* processor type of sender */
char r2; /* reserved */
char username[MAX_AUTH]; /* user name */
char password[MAX_PASSWD]; /* user password */
};
struct eas_authorize
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* message status */
};
struct ear_cancel
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short varset_id; /* variable set ID */
};
struct eas_cancel
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short varset_id; /* variable set ID */
};
struct ear_exit
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short mode; /* exit mode: 0=normal,1=forced */
};
struct eas_exit
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* transaction status */
};
struct eas_error
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* transaction status */
short err_offset; /* offset where error detected */
char req_tid; /* transaction ID */
};
struct ear_recinit
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short numvar; /* no. of field in a record */
short transfer_type; /* type of the xfer to make */
char pw_trigger[MAX_SYMB]; /* flag for trigger */
short pw_type[NUMVAR]; /* field data type */
char pw_name[MAX_SYMB]; /* name of the record */
};
struct eas_recinit_header
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short recset_id; /* rec_id of record group */
short numvar; /* # fields in this record */
};
struct eas_recinit
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short recset_id; /* rec_id for record group */
short numvar; /* no. of field linked */
short pw_status[NUMVAR]; /* status code for error */
};
struct ear_recdelete
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short recset_id; /* record to be deleted */
};
struct eas_recdelete
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short recset_id; /* record deleted */
};
struct ear_print
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
char print_name[MAX_SYMB]; /* printer name */
short record_no; /* multiple record ID # */
/*
* 0 = only record, 1 = Beginning of multiple record 2 = Middle of record
* 3 = last record of long record
*/
short data_length; /* byte count of the data */
char print_data[NUMVAR]; /* data to be printed */
};
struct eas_print
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short record_no; /* msg ID # for multiple record */
};
struct ear_read
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short varset_id; /* variable set ID to read */
};
struct eas_read_header
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* message status */
short varset_id; /* variable set ID have read */
short numvar; /* no. of variable linked */
};
struct eas_read
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* message status */
short varset_id; /* variable set ID have read */
short numvar; /* no. of variable linked */
short pw_status[NUMVAR]; /* status code for error */
char pw_var[NUMVAR];
};
struct ear_symlookup
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
char symbol[MAX_SYMB]; /* symbol name */
};
struct eas_symlookup
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
char node_name[MAX_SYMB]; /* network node name */
short data_type; /* symbol data type */
short data_length; /* data length in bytes */
};
/*
* struct to support optional symbol data
*/
struct type_desc
{
short pw_type; /* data type of each record variable */
short length; /* size of record variable in bytes */
};
struct rec_options
{
short numvar; /* numvar of variable in this record */
struct type_desc type_desc[NUMVAR]; /* array of type desciptors */
};
struct eas_symlookup1
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
char node_name[MAX_SYMB]; /* network node name */
short data_type; /* symbol data type */
short data_length; /* symbol data length in bytes */
struct rec_options options; /* optional data descrition for
* EAD_REC */
};
struct ear_trigchain
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
char chain_name[MAX_SYMB]; /* chain name to trigger */
};
struct eas_trigchain
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
char chain_name[MAX_SYMB]; /* chain name triggered */
};
struct ear_vardelete
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short varset_id; /* variable to be deleted */
};
struct eas_vardelete
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short varset_id; /* variable deleted */
};
struct ear_varinit
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short numvar; /* no. of variable to link */
short transfer_type; /* type of the xfer */
char pw_trigger[MAX_SYMB]; /* flag for trigger */
short pw_type[NUMVAR]; /* array of variable data types */
char pw_name[NUMVAR * MAX_SYMB]; /* list of variable names */
};
struct eas_varinit_header
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short varset_id; /* var_id for this variable group */
short numvar; /* no. of variable linked */
};
struct eas_varinit
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short varset_id; /* var_id for this variable group */
short numvar; /* no. of variable linked */
short pw_status[NUMVAR]; /* status code for error */
};
struct ear_write_header
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short varset_id; /* output variable ID */
short numvar; /* no. of variable to write */
};
struct ear_write
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short varset_id; /* variable ID for write */
short numvar; /* no. of variable to write */
char pw_var[NUMVAR];
};
struct eas_write_header
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short varset_id; /* output variable ID */
short numvar; /* no. of variable to write */
};
struct eas_write
{
char tid; /* transaction ID */
char u_msg_id; /* user provided msg ID */
short status; /* completion status */
short varset_id; /* variable ID for write */
short numvar; /* no. of variable to write */
short pw_status[NUMVAR];
};
/*
** Message structures for trigger task
*/
struct eat_cancel
{
unsigned short varsetid; /* varset id to be canceled */
};
struct eat_delete
{
unsigned short varsetid; /* varset id to be canceled */
};
struct eat_trigger_flag_init
{
unsigned short varsetid; /* varset id to be read */
unsigned short trigoptions;
char trigger_flag[MAX_SYMB];
};
/*
* End of message structures
*/