89 lines
2.9 KiB
C
89 lines
2.9 KiB
C
//----------------------------------------------------------------------
|
|
#ifndef DialogoH
|
|
#define DialogoH
|
|
#endif
|
|
|
|
//----------------------CODIGOS DEL BURR BROWN--------------------------
|
|
#define BB_VACIA_BUFFER "*3"
|
|
#define BB_PARA_COMUNICA "*4"
|
|
#define BB_REANUDA_COMUNICA "*5"
|
|
#define BB_DEF_TECLA_FUNCION "*6"
|
|
#define BB_ENTRADA_TARJETA "*11"
|
|
#define BB_ENTRADA_TECLADO "*12"
|
|
#define BB_MENSAJE_BLOQUEO "*13"
|
|
#define BB_MENSAJE_SCROLL "*14"
|
|
#define BB_ENTRADA_SECRETO "*15"
|
|
#define BB_CAMBIA_A_TARJETA "*21"
|
|
#define BB_CAMBIA_A_TECLADO "*22"
|
|
#define BB_CAM_TEC_TARJ_DES "*23"
|
|
|
|
//----------------------VARIABLES GLOBALES------------------------------
|
|
#define NUM_MAX_CAR_TEC_FUNCION 100
|
|
#define NUM_OCASIONAL 1
|
|
#define NUM_PERIODICA_AUT 13
|
|
#define TIEMPO_MENSAJE_PANTALLA 12000 //Milesimas de segundos
|
|
#define TIEMPO_CONTADOR_SEGUNDO 1000 //Milesimas de segundos
|
|
|
|
//----------------------DEFINICION DE FUNCIONES ------------------------
|
|
#define F1 "01"
|
|
#define F2 "02"
|
|
#define F3 "03"
|
|
#define F4 "04"
|
|
#define F5 "05"
|
|
#define F6 "06"
|
|
#define F7 "07"
|
|
#define F8 "08"
|
|
|
|
//-----------CODIGOS DEL NUMERO DE ELEMENTOS DE LA TARJETA--------------
|
|
#define NUM_ELE_CIS_TAR "01"
|
|
#define NUM_ELE_TRA_TAR "02"
|
|
#define NUM_ELE_CON_TAR "03"
|
|
|
|
//----------------POSICIONES DE LA RESPUESTA PERIODICA------------------
|
|
#define UBICACION_DATO_CORRECTO 4
|
|
#define UBICACION_REFERENCIA 5
|
|
#define UBICACION_DATO_LEIDO_TEC 6
|
|
#define UBICACION_DATO_LEIDO_TAR 12
|
|
#define UBICACION_ELEMENTO_TAR 10
|
|
|
|
//----------------------ERRORES DE LOS THREADS--------------------------
|
|
#define THREAD_CONT_NO_INICIADO 1
|
|
#define THREAD_AUT_NO_INICIADO 2
|
|
#define THREAD_PSE_NO_INICIADO 3
|
|
#define THREAD_PSS_NO_INICIADO 4
|
|
#define THREAD_ALB_NO_INICIADO 5
|
|
|
|
//----------------------Declaracion de Funciones------------------------
|
|
void Temporizador(void);
|
|
void DialogoAutorizacion(void);
|
|
void DialogoPesoEntrada(void);
|
|
void DialogoPesoSalida(void);
|
|
void DialogoAlbaran(void);
|
|
void ConseguirReferencia(char *cReferencia);
|
|
bool ComprobarTecladoTarjeta(void);
|
|
bool EsperarRespuestaOcasional(char cServidor,char *pszTipoId);
|
|
void DefinirTeclasFuncion(char cServidor,char *pszTipoID,char *Tecla,char *Mensaje,char cReferencia);
|
|
void MostrarResultado(char cServidor,char *sTipoID,int nResultado);
|
|
void AnimacionMontrel(char cServidor,char *sTipoID,char cReferencia);
|
|
|
|
//----------------------Estructura del Dialogo-------------------------------
|
|
typedef struct
|
|
{
|
|
char sCodigoCisDIA[4];
|
|
char sCodigoConDIA[4];
|
|
char sMatriculaTraDIA[11];
|
|
char cCodigoSumDIA;
|
|
BYTE byNumeroPedidoDIA[9];
|
|
}DIA;
|
|
|
|
//----------------------VARIABLES EXTERNAS-----------------------------------
|
|
extern BYTE CargarThreads(void);
|
|
extern void TerminarThread(HANDLE ThreadID);
|
|
extern void DialogoAutorizacion(void);
|
|
extern void DialogoPesoEntrada(void);
|
|
extern void DialogoPesoSalida(void);
|
|
extern void DialogoAlbaran(void);
|
|
extern void Temporizador(void);
|
|
extern bool ComprobarTecladoTarjeta(void);
|
|
|