MsgtoPC
ORIGINAL:
!**********************************************************
!* Procedure MsgtoPC () *
!* *
!* Diese Prozedur �bertr�gt eine Meldung von der *
!* Vordergrundtask �ber die Task com (Hintergrundtask) *
!* zu dem RPC *
!* *
!* *
!* Input Parameter: string stMsgtpe *
!* string stWert *
!* *
!* Date: Version: Programmer: Reason: *
!* 16.11.95 1.00b B.Luckas *
!**********************************************************
PROC MsgtoPC(
num nMsgtype,
string stWert)
TEST nMsgtype
CASE syIRBStatus:
IF stWert="1" THEN
nFLRMode:=1;
nAlr:=G;
nAnr:=0;
nQpoa:=NULL;
nEpoa:=NULL;
nSpb:=N;
nQtta:=NULL;
nEtta:=NULL;
nStb:=N;
ENDIF
IF stWert="0" THEN
nFLRMode:=0;
ENDIF
nZ_tgm:=1;
handshakeZ;
CASE syErrorMsg:
!Umwandlung Fehlernummer
bconv:=StrToVal(stWert,nAnr);
nAlr:=K;
!Negativ Quittierung Positionierauftrag
IF nQpoa=P THEN
nQpoa:=NULL;
nEpoa:=N;
ENDIF
!Negativ Quittierung Transportauftrag
IF nQtta=P THEN
nQtta:=NULL;
nEtta:=N;
ENDIF
nZ_tgm:=1;
handshakeZ;
CASE syinit:
neustart;
nZ_tgm:=1;
handshakeZ;
DEFAULT:
TPWrite "Fehler bei MsgtoPC";
ENDTEST
ENDPROC
TRADUCCIÓN:
!**********************************************************
!* Procedimiento MsgtoPC () *
!* *
!* Este procedimiento transfiere un mensaje desde la *
!* tarea en primer plano a través de la tarea com (tarea en segundo plano) *
!* a la RPC *
!* *
!* *
!* Parámetros de entrada: cadena stMsgtype *
!* cadena stValue *
!* *
!* Fecha: Versión: Programador: Motivo: *
!* 16.11.95 1.00b B.Luckas *
!*********************************************************
PROC MsgtoPC(
num nMsgtype,
string stValue)
TEST nMsgtype
CASE syIRBStatus:
IF stValue="1" ENTONCES
Modo nFLRM:=1;
nAlr:=G;
nAnr:=0;
nQpoa:=NULL;
nEpoa:=NULL;
nSpb:=N;
nQtta:=NULL;
nEtta:=NULL;
nStb:=N;
ENDIF
SI stWert="0" ENTONCES
Modo nFLRM:=0;
ENDIF
nZ_tgm:=1;
apretón de manosZ;
CASE syErrorMsg:
!Número de error de conversión
bconv:=StrToVal(stWert,nAnr);
nAlr:=K;
Orden de posicionamiento de acuse de recibo negativo
SI nQpoa=P ENTONCES
nQpoa:=NULL;
nEpoa:=N;
FIN SI
Orden de transporte de acuse de recibo negativo
SI nQtta=P ENTONCES
nQtta:=NULL;
nEtta:=N;
FIN SI
nZ_tgm:=1;
handshakeZ;
CASO syinit:
reiniciar;
nZ_tgm:=1;
handshakeZ;
PREDETERMINADO:
TPWrite "Error en MsgtoPC";
FIN PRUEBA
FIN PROCESO
No Comments