Serial Communication Control Structure; Protocol - VeriFone MX800 series Programmer's Manual

Hide thumbs Also See for MX800 series:
Table of Contents

Advertisement

Serial
Communication
Control
Structure

Protocol

The following are the structures defined for configuring serial ports on the M
series of terminals. They contain all the necessary elements for defining the ports
into the different modes that each of them support.
typedef struct{
short status;
short comm_handle;
short visa_sel; /* 0 - visa not selected, 1 - visa selected */
int port;
void (*pEcrReceive) (void); /* ecr rx callback for application */
struct Opn_Blk openBlock;
}ECR_INFO;
/* --------------------- Packet Defines --------------------------*/
typedef struct
unsigned char stx_char;
unsigned char etx_char;
unsigned char count;
int max_pkt;
void (*pPktHandler) (char , int); /* rx callback for packet mode
*/
} packet_parm_t;
/* --------------------- ECR tailgate Defines ---------------------*/
typedef struct
{unsigned char poll_addr;
} ECRtailgate_parm_t;
/* -------------------- Open Block Structure ----------------------*/
struct Opn_Blk
{unsigned int rate;
unsigned int format;
unsigned int protocol;
unsigned int parameter;
packet_parm_t packet_parms;
union {
ECRtailgate_parm_t ECRtailgate_parms;
} trailer;
};
The structures defined above comprise the necessary settings needed to
configure a serial port for RS232/485, Tailgate, Visa, Packet mode or other
protocols.
The main structure is the Open Block structure (Opn_Blk), which contains an
element called protocol. The protocol variable indicates what mode the port
should be configured for and further defines what other fields are applicable for
that mode.
D

Serial Communication Control Structure

X
M
800 S
P
ERIES
ROGRAMMERS
D
EVICE
RIVERS
x
800
93
G
UIDE

Advertisement

Table of Contents
loading

Table of Contents