📄 pim3270.h
字号:
SES_EVENTS aeSesEvents; /* event(s) to wait for */
int aeSignal; /* signal to send on event */
} API_EVENTS;
typedef union /* union of API messages */
{
KEY_INTERCEPT amKeyInt; /* key intercept message */
API_KEYSTROKE amSendKey; /* send key message */
API_KEYINTSTAT amIntStat; /* keystroke intercept status */
API_EVENTS amEvents; /* session events from API */
DISP_SCREEN amDispScreen; /* display screen message */
DISP_FIELD amDispField; /* display field message */
DISP_AREA amDispArea; /* display area message */
SET_INHIBIT amSetInhibit; /* set inhibit message */
} PIM_API_MSGS;
typedef struct api_connection /* PIM session API process */
{
struct api_connection *ap_next; /* next API process in the list */
struct api_connection *ap_prev; /* previous API process in list */
PID ap_pid; /* API process ID */
KEY_INTERCEPT ap_keyint; /* API keyboard intercept state */
KEY_INTERCEPT ap_kiwait; /* intercept status wait state */
API_EVENTS ap_events; /* API events being waited for */
} API_CONNECTION;
typedef struct pim_api_cb /* PIM API Control Block */
{
int apiMaxConnect; /* max. # of API connections */
int apiNumConnect; /* current # of API connections */
API_CONNECTION *apiConnections; /* current API connections */
API_CONNECTION *apiMsgSender; /* ptr. to API sending message */
API_CONNECTION *apiLockPtr; /* ptr. to API locking session */
PIM_API_MSGS *apiMsgBuffer; /* API message receipt area */
int apiKeyIntCnt; /* # API key intercepts active */
int apiEventWaitCnt; /* # of APIs waiting on events */
} PIM_API_CB;
typedef struct pim_vdev /* virtual 3270 device entry points */
{
/*
General Message Processing Functions
*/
int (*vdBeginMessage)();/* start of a new message */
int (*vdEndMessage)(); /* end of received message */
/*
Screen related Functions
*/
int (*vdMoveCursor)(); /* move cursor position */
int (*vdClrScreen)(); /* clear screen */
int (*vdClrArea)(); /* clear area */
int (*vdSizeScreen)(); /* change screen size */
int (*vdDispAttr)(); /* put out an attribute byte */
int (*vdDispChar)(); /* put out a character */
int (*vdDeleteChar)(); /* delete a character */
int (*vdInsertChar)(); /* insert a character */
int (*vdRepeatChar)(); /* repeat a character */
int (*vdDispArea)(); /* display a chunk of data */
int (*vdCursorMode)(); /* change the cursor's appearance */
/*
General Device Functions
*/
int (*vdBeep)(); /* beep device (sound audible alarm) */
/*
Operator Infomation Area (OIA)/Status Related Functions
*/
int (*vdOIAWrite)(); /* write a given area of the OIA */
int (*vdOIAClear)(); /* clear a given area of the OIA */
int (*vdOnline)(); /* change in online state */
int (*vdPowerOn)(); /* change in power on/off state */
int (*vdOpenClose)(); /* change in open/close (to DH) state */
int (*vdSuspResume)(); /* change in suspend/resume state */
int (*vdInhibit)(); /* set/clear keyboard inhibit */
int (*vdKbdMode)(); /* change keyboard mode */
int (*vdChgOwner)(); /* change device's session owner */
int (*vdCommErr)(); /* Communications error */
int (*vdProgErr)(); /* Program error */
int (*vdMachErr)(); /* Machine error */
int (*vdChgField)(); /* current cursor field changed */
int (*vdRTM)(); /* RTM information changed */
/*
Keystroke Processing Related Functions
*/
int (*vdKeyIntercept)(); /* key intercept function */
int (*vdProcessKey)(); /* process (unknown) keystroke function */
int (*vdKeyReject)(); /* keystroke reject function */
int (*vdKeyClick)(); /* change key click */
/*
File Transfer Related Functions
*/
int (*vdFTStart)(); /* file transfer started */
int (*vdFTFinish)(); /* file transfer finished */
int (*vdFTValidFile)(); /* validate local file */
int (*vdFTOpen)(); /* open file */
int (*vdFTClose)(); /* close file */
int (*vdFTRead)(); /* read file data into buffer */
int (*vdFTWrite)(); /* write data from buffer into file */
int (*vdFTMessage)(); /* file transfer message received */
int (*vdFTError)(); /* file transfer error */
int (*vdFTCount)(); /* number of bytes transferred changed */
/*
Status Process Related Functions
*/
int (*vdSPLuControl)(); /* LU Control command received */
int (*vdSPControlAck)(); /* LU Control Acknowledge */
int (*vdSPRecvTable)(); /* received status table */
int (*vdSPMessage)(); /* received (status) message */
} VDEV_3270;
typedef struct /* PIM Response Time Monitor structure */
{
byte rtmFlags; /* RTM flags */
byte rtmCondition; /* RTM condition being waited for */
byte rtmMinutes; /* last time - minutes */
byte rtmSeconds; /* last time - seconds */
byte rtmTenthSecs; /* last time - tenths of a second */
} PIM_RTM;
/* defines for RTM flags (rtmFlags) field of PIM_RTM structure). */
#define rtmNOFLAGS 0x00 /* initializer */
#define rtmKEYENABLED 0x01 /* set if RTM key is toggled on */
#define rtmAUTHORIZED 0x02 /* set if display is authorized for RTM */
#define rtmDISPLAYED 0x04 /* set if RTM information is displayed */
#define rtmAUTOENABLE 0x08 /* enable key when first received */
#define rtmAPPLSTOP 0x10 /* set if application will stop RTM */
/* defines for RTM conditions (rtmCondition field of PIM_RTM structure) */
#define rtmDISABLED 0 /* RTM is disabled (no condition) */
#define rtmFIRSTCHAR 1 /* being timed on first character */
#define rtmKBUNLOCK 2 /* being timed on keyboard unlock */
#define rtmCDEB 3 /* being timed on Chg. Dir./End Bracket */
#define rtmLASTCHAR 4 /* being timed on last character */
/* The PIM Control Block structure defined below is the primary data
structure used in the application/PIM interface. Each 3270 session
opened by the PIM application must have a unique PIM Control Block
associated with it. This data structure may be allocated by the
application, or preferably by PIM using the alloc3270() function.
In order for RabbitPLUS 3270 API (HLLAPI) applications to interact
with the PIM application, the PIM Control Block and the associated
data structures it references (i.e., psScreen, psEAB, psFields, etc.)
must be allocated via the alloc3270() call.
*/
typedef struct pim_cb /* PIM Control Block structure */
{
/* These fields must be initialized for the environment to be valid */
int (*psPreProc)(); /* caller's pre-exit function */
int (*psPostProc)(); /* caller's post-exit function */
byte *psScreen; /* caller's screen buffer */
/* The following fields contain status and should be read-only */
int psFunction; /* function being performed */
int psStatus; /* function completion status */
short psAddr; /* session's LU address */
short psStAddr; /* Status Process address */
short psBufSize; /* size of buffer on last msg. */
short psHostCmd; /* 3270 command received */
char psWCC; /* 3270 write control character */
int psCursor; /* offset of cursor in buffer */
/* The following are updated on every screen download and status update */
int psState; /* device power on/off state */
char psKBLock; /* keyboard lock flag */
char psHWLock; /* host wait flag */
char psOwner; /* host session owner */
int psStatWord; /* status information bits */
int psProgChk; /* program check value */
int psCommChk; /* communications check value */
int psMachChk; /* machine check value */
int psProcState; /* device processing state */
/* New fields added for Extended Attribute, Session Pooling, and Model
3, 4, and 5 support:
*/
byte *psEAB; /* caller's Extended Attr. Buf. */
char psEABflag; /* EAB send/receive flag */
int psNumRows; /* # of rows on current screen */
int psNumCols; /* # of cols. on current screen */
int psScrSize; /* size of current screen */
PU_NAME psPUname; /* name of PU */
LOG_DEV_NAME psDevName; /* logical device name */
int psExtColor; /* extended color received flag */
/* New fields added for 8-bit Native Language Support (NLS), HLLAPI
compatable API interface, and Structured Field File Transfer:
*/
SHORT_NAME psShortName; /* short name */
short psDevID; /* (unique) device identifier */
short psSesID; /* session identifier */
int psSesDesc; /* session descriptor */
byte psSesType; /* session type */
byte psSuspResume; /* suspend/resume state */
byte psOpenState; /* session open/close state */
flag psOnline; /* online flag */
short psController; /* controller type connected to */
short psMsgType; /* last message type holder */
short psFromDevID; /* last device we received from */
short psFromSesID; /* last session we recv'd from */
PID psFromPID; /* PID of last device rcv'd fr. */
short psCommand; /* LU Control/message command */
short psValue; /* LU Control acknowledge value */
short psMaxFlds; /* max. # fields for session */
short psNumFlds; /* # fields for current screen */
FLDS_3270 *psFields; /* current screen field table */
short psFldIndex; /* current cursor field index */
short psOIASize; /* size of Operator Info. Area */
byte *psOIABuffer; /* Operator Info. Area buffer */
short psCurRow; /* current row of cursor */
short psCurCol; /* current column of cursor */
short psMaxRows; /* max. # rows for session */
short psMaxCols; /* max. # columns for session */
short psMaxScrn; /* max. screen size for session */
short psDefRows; /* default number of rows */
short psDefCols; /* default number of columns */
short psDefScrn; /* default screen size */
short psAltRows; /* alternate number of rows */
short psAltCols; /* alternate number of columns */
short psAltScrn; /* alternate screen size */
flag psFTdata; /* FT data received flag */
flag psFTlock; /* File Transfer lock flag */
byte *psFTBuffer; /* File Transfer data buffer */
int psFTBufSize; /* File Transfer buffer size */
FTCB *psFTCtlBlk; /* File Transfer control block */
short psMaxStTbl; /* max. # status table entries */
short psNumStTbl; /* # of status table entries */
SPStatus *psStatTbl; /* Status table buffer area */
int psMaxSendMsg; /* maximum send message size */
byte *psSendMsgBuf; /* send message buffer area */
int psMaxRecvMsg; /* maximum receive message size */
int psSizeRecvMsg; /* size of received message */
byte *psRecvMsgBuf; /* receive message buffer area */
flag psClrScrn; /* flag: clear screen? */
byte psKbdMode; /* keyboard mode */
short psInhType; /* keyboard inhibit type */
short psInhSubTyp; /* keyboard inhibit sub-type */
byte psNFldMode; /* numeric fld. validation mode */
byte *psNumChStr; /* numeric character string */
short psSzNumChStr; /* size of above string */
flag psBColrOvRd; /* base color override flag */
short psDevType; /* emulated device type */
short psProtocol; /* protocol type */
flag psDatawAID; /* flag: using data with AID? */
flag psPSAflag; /* Pres. Space Altered flag */
flag psAutoOn; /* automatic power on flag */
flag psSysLock; /* system (host) keyboard lock */
flag psKeyClick; /* key click flag */
byte psCursMode; /* cursor mode */
int psScrUsed; /* # of bytes used in screen */
DISP_MODE psDispMode; /* message display mode bits */
KEY_DISABLE psKeyDisable; /* key disable settings */
KEY_INTERCEPT psLocKeyInt; /* local key intercept params. */
PIM_API_CB psAPICtlBlk; /* API Control Block */
word psWSCtrl; /* Workstation Control flags */
VDEV_3270 psVirtDev; /* virtual device functions */
IPC_GLUE psIPCGlue; /* IPC glue */
PIM_RTM psRTM; /* Response Time Monitor info. */
DevPath psTtyName; /* tty name device is using */
char psEtoAName[rLANGLENGTH + 1];/* EtoA table name */
byte psOptFlags; /* optimization flags */
} PIMCtlBlk;
/*
Defines used in the PIM Control Block fields described in the
above data structure (flag fields are either zero for ON/TRUE
or non-zero for OFF/FALSE):
*/
/* NULL caller function definitions for ease of assignment: */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -