|
New Features and Updates for XAPILast Update: 06/02/99
3. Current CFXDVCST.H
=====================
/*=====================================================================
*
* CFXDVCST.H Device-specific Device Status Block
*
* Portable ATB version.
*
* This block is filled by XAPI request "apigetdvcstat"
* function. This function provides additional information
* about the status of "nonstandard" devices, such as
* the DEC VT220 currently supported only in the Windows
* environment.
*
*======================================================================
* DATE | Programmer | Description
*-----------------------------------------------------------------------
*07/12/93 | L.ELLIS | Added stuff for Telnet:
* | |
* | | VT220 variable-portion modified
* | | to include telnet mode.
* | |
* | | TN3270 variable-portion defined.
* | |
*-----------------------------------------------------------------------
*06/22/94 | L.ELLIS | Added new key: ApkClearBuf
*-----------------------------------------------------------------------
*07/25/94 | R.Wessel | Added DOID to fixed portion.
* | | Portability Cleanup.
*-----------------------------------------------------------------------
*10/16/95 | L.ELLIS | Added stuff for LU62
*-----------------------------------------------------------------------
*10/16/95 | | Resynced all prod copies of CFXDVCST.H
*-----------------------------------------------------------------------
*07/25/96 | | VT320 stuff
*-----------------------------------------------------------------------
*09/05/96 | | Moved back into production library
*-----------------------------------------------------------------------
*03/02/98 | | Large SF support
*-----------------------------------------------------------------------
*08/19/98 | | Added DstTN3270_SSCP
*-----------------------------------------------------------------------
*03/03/99 | | Added printerstatus
*-----------------------------------------------------------------------
*03/31/99 | R.Wessel | Added TN5250 stuff
*-----------------------------------------------------------------------
*04/15/99 | R.Wessel | Added DstTN5250_FL_FESTATE
*======================================================================
*
*
*/
#include <cfxtype.h>
#ifdef CFPRAGMA_PACK_1_USE_INCLUDE
#include <cfxpck1.h>
#else
#pragma CFPRAGMA_PACK_1
#endif
struct api_device_status_block
{
/* 32-byte fixed portion */
short int rows;
short int cols;
long changecount;
char ccreliable;
short int DOID;
char keyboardtype;
#define DstKT_UNKNOWN (0)
#define DstKT_3270 ('1')
#define DstKT_3270_PROX ('2')
#define DstKT_5250 ('3')
#define DstKT_VT220 ('4')
char attributetype;
#define DstAT_UNKNOWN (0)
#define DstAT_NONE ('0')
#define DstAT_3270 ('1')
#define DstAT_5250 ('2')
#define DstAT_AS400 ('3')
#define DstAT_VT100 ('4')
#define DstAT_VT220 ('5')
unsigned short int MaxSF; //03/02/98
char fil1[15]; /* reserved*/ //03/02/98
short int blockID;
#define DstID_UNKNOWN (0)
#define DstID_Dst220 (1)
#define DstID_Dst320 (DstID_Dst220)
#define DstID_DstTN3270 (2)
#define DstID_DstRLNK (3)
#define DstID_DstTN5250 (4) //03/31/99
/* n-byte variable portion */
union
{
char fil2[32];
/* VT220/VT320 Device-specific Status */
struct
{
short int mode;
#define Dst220_VT52 (0)
#define Dst220_VT100 (1)
#define Dst220_VT200_7BIT (2)
#define Dst220_VT200_8BIT (3)
#define Dst220_VT300_7BIT (4)
#define Dst220_VT300_8BIT (5)
short int telnetmode;
#define Dst220_TELNET_NOT_TELNET (0)
#define Dst220_TELNET_DISC (1)
#define Dst220_TELNET_CONNECTING (2)
#define Dst220_TELNET_CONNECTED (3)
short int cursor_visible; // Cursor visible if !0
short int status_line_type;
#define Dst220_SLT_NONE (0)
#define Dst220_SLT_INDICATOR (1)
#define Dst220_SLT_HOST_WRITABLE (2)
#define Dst220_SLT_BLANK (3)
short int cursor_key_mode;
#define Dst220_CKM_CURSOR (0)
#define Dst220_CKM_APPLICATION (1)
short int numeric_keypad_mode;
#define Dst220_NKM_NUMERIC (0)
#define Dst220_NKM_APPLICATION (1)
short int keyboard_usage_mode;
#define Dst220_KUM_DATA (0)
#define Dst220_KUM_TYPEWRITER (1)
} Dst220;
#define Dst320 Dst220
/* Reliable Link Device-specific Status */
/* e.g. LU62 devices */
struct
{
short int protocol;
#define DST_RL_LU62 (0)
#define DST_RL_TCPIP (1)
short int linktype;
#define DST_RL_HALF_DUPLEX_NO_RTS (0)
#define DST_RL_HALF_DUPLEX_RTS (1)
#define DST_RL_FULL_DUPLEX (2)
short int MaximumPacing;
short int SuggestedPacing;
/*
* if pacing > 0, pacing = nbr of blocks
* which may be sent without waiting for
* intervening ACK.
*/
short int MaximumBlocksize; // maximum block size permissable
short int SuggestedBlocksize; // suggested block size
} DstRLNK;
/* TELNET/TN3270 device-specific Status */
struct
{
short int mode;
#define DstTN3270_3270 (0)
#define DstTN3270_NVT (1)
#define DstTN3270_DISC (2)
#define DstTN3270_CONNECTING (3)
#define DstTN3270_SSCP (4)
short int printerstatus; //03/03/99
#define DstTN3287_P_OFF (0)
#define DstTN3287_P_ERR (1)
#define DstTN3287_P_DISC (2)
#define DstTN3287_P_FAIL (3)
#define DstTN3287_P_CONN (4)
#define DstTN3287_P_RDY (5)
#define DstTN3287_P_BUSY (6)
} DstTN3270;
/* TELNET/TN5250 device-specific status - added 03/31/99 */
struct
{
short int mode;
#define DstTN5250_5250 (0)
#define DstTN5250_NVT (1)
#define DstTN5250_DISC (2)
#define DstTN5250_CONNECTING (3)
short int state;
#define DstTN5250_NON_5250 (0) // Not connected, etc.
#define DstTN5250_LOCKED (1)
#define DstTN5250_COMMAND (2)
#define DstTN5250_DATA (3)
#define DstTN5250_PREHELP_ERROR (4)
#define DstTN5250_POSTHELP_ERROR (5)
#define DstTN5250_SYSTEM_REQUEST (6)
short int message_line; // Position of message line
unsigned short flags; // Various flags
// x... .... .... .... - Message Line Active
// .x.. .... .... .... - Message Waiting Light
// ..x. .... .... .... - Insert Mode
// ...x .... .... .... - Field Exit Required State
// .... xxxx xxxx xxxx - Reserved
#define DstTN5250_FL_MESSAGELINE (0x8000)
#define DstTN5250_FL_MESSAGEWAITING (0x4000)
#define DstTN5250_FL_INSERTMODE (0x2000)
#define DstTN5250_FL_FESTATE (0x1000)
} DstTN5250;
} v;
};
#ifdef CFPRAGMA_PACK_DFLT_USE_INCLUDE
#include <cfxpckd.h>
#else
#pragma CFPRAGMA_PACK_DFLT
#endif
/**
*
* VT220 Device-specific Keys
* ...for use with the XAPI "apisndkey" function
*
**/
/* Control Keys */
#define Dsk220_BS (0x100)
#define Dsk220_Ansbk (0x101)
#define Dsk220_LF (0x102)
#define Dsk220_Return (0x103)
#define Dsk220_Break (0x104)
#define Dsk220_NoScroll (0x105)
#define Dsk220_TAB (0x106)
#define Dsk220_ESC (0x107)
#define Dsk220_CursorUp (0x109)
#define Dsk220_CursorDown (0x10a)
#define Dsk220_CursorRight (0x10b)
#define Dsk220_CursorLeft (0x10c)
/* Auxiliary Keypad Keys */
#define Dsk220_Aux0 (0x10d)
#define Dsk220_Aux1 (0x10e)
#define Dsk220_Aux2 (0x10f)
#define Dsk220_Aux3 (0x110)
#define Dsk220_Aux4 (0x111)
#define Dsk220_Aux5 (0x112)
#define Dsk220_Aux6 (0x113)
#define Dsk220_Aux7 (0x114)
#define Dsk220_Aux8 (0x115)
#define Dsk220_Aux9 (0x116)
#define Dsk220_AuxMinus (0x117)
#define Dsk220_AuxComma (0x118)
#define Dsk220_AuxPeriod (0x119)
#define Dsk220_AuxEnter (0x11a)
#define Dsk220_PF1 (0x11b)
#define Dsk220_PF2 (0x11c)
#define Dsk220_PF3 (0x11d)
#define Dsk220_PF4 (0x11e)
/* Keys valid only in VT200 mode (except F11-F13) */
#define Dsk220_Find (0x130)
#define Dsk220_InsertHere (0x131)
#define Dsk220_Remove (0x132)
#define Dsk220_Select (0x133)
#define Dsk220_PrevScreen (0x134)
#define Dsk220_NextScreen (0x135)
#define Dsk220_HoldScreen (0x136)
#define Dsk220_F6 (0x13a)
#define Dsk220_F7 (0x13b)
#define Dsk220_F8 (0x13c)
#define Dsk220_F9 (0x13d)
#define Dsk220_F10 (0x13e)
#define Dsk220_F11 (0x13f) /* ESC */
#define Dsk220_F12 (0x140) /* BS */
#define Dsk220_F13 (0x141) /* LF */
#define Dsk220_F14 (0x142)
#define Dsk220_F15 (0x143) /* HELP */
#define Dsk220_F16 (0x144) /* DO */
#define Dsk220_F17 (0x145)
#define Dsk220_F18 (0x146)
#define Dsk220_F19 (0x147)
#define Dsk220_F20 (0x148)
/* Shifted values for F6-F20 (User-defined Keys) */
#define Dsk220_ShiftF6 (0x149)
#define Dsk220_ShiftF7 (0x14a)
#define Dsk220_ShiftF8 (0x14b)
#define Dsk220_ShiftF9 (0x14c)
#define Dsk220_ShiftF10 (0x14d)
#define Dsk220_ShiftF11 (0x14e) /* ESC */
#define Dsk220_ShiftF12 (0x14f) /* BS */
#define Dsk220_ShiftF13 (0x150) /* LF */
#define Dsk220_ShiftF14 (0x151)
#define Dsk220_ShiftF15 (0x152) /* HELP */
#define Dsk220_ShiftF16 (0x153) /* DO */
#define Dsk220_ShiftF17 (0x154)
#define Dsk220_ShiftF18 (0x155)
#define Dsk220_ShiftF19 (0x156)
#define Dsk220_ShiftF20 (0x157)
#define Dsk220_Setup (0x158)
// Keys valid for Telnet terminal emulators
#define DskTELNET_SYNC (0x200)
#define DskTELNET_BRK (0x201)
#define DskTELNET_IP (0x202)
#define DskTELNET_AO (0x203)
#define DskTELNET_AYT (0x204)
#define DskTELNET_EC (0x205)
#define DskTELNET_EL (0x206)
#define DskTN3287_Enter (0x240)
#define DskTN3287_PA1 (0x241)
#define DskTN3287_PA2 (0x242)
#define DskTN3287_Cancel (0x243)
#define DskTN3287_Test (0x244)
#define DskTN3287_ClosePrint (0x245)
// Keys valid only for asynchronous devices
#define ApkClearBuf (0x300)
/*=====================================================================*/
#ifdef DST_OBS_DEFS
// Obsolete definitions follow...
#define VT52 (Dst220_VT52)
#define VT100 (Dst220_VT100)
#define VT200_7BIT (Dst220_VT200_7BIT)
#define VT200_8BIT (Dst220_VT200_8BIT)
#define VT300_7BIT (Dst220_VT300_7BIT)
#define VT300_8BIT (Dst220_VT300_8BIT)
#define TN220_NOT_TELNET (Dst220_TELNET_NOT_TELNET)
#define TN220_DISC (Dst220_TELNET_DISC)
#define TN220_CONNECTING (Dst220_TELNET_CONNECTING)
#define TN220_CONNECTED (Dst220_TELNET_CONNECTED)
#define TN3270_3270 (DstTN3270_3270)
#define TN3270_NVT (DstTN3270_NVT)
#define TN3270_DISC (DstTN3270_DISC)
#define TN3270_CONNECTING (DstTN3270_CONNECTING)
#define TELNET_SYNC (DskTELNET_SYNC)
#define TELNET_BRK (DskTELNET_BRK)
#define TELNET_IP (DskTELNET_IP)
#define TELNET_AO (DskTELNET_AO)
#define TELNET_AYT (DskTELNET_AYT)
#define TELNET_EC (DskTELNET_EC)
#define TELNET_EL (DskTELNET_EL)
#define TN3270 DstTN3270
#endif
/*=====================================================================*/
|