version 1.4, 2000/07/30 09:55:40 |
version 1.5, 2001/05/06 07:53:01 |
|
|
/* $OpenXM: OpenXM/src/kxx/oxserver00.c,v 1.3 2000/02/02 03:30:49 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kxx/oxserver00.c,v 1.4 2000/07/30 09:55:40 takayama Exp $ */ |
/* nullserver01 */ |
/* nullserver01 */ |
#include <stdio.h> |
#include <stdio.h> |
#include <sys/types.h> |
#include <sys/types.h> |
Line 33 main(int argc, char *argv[]) { |
|
Line 33 main(int argc, char *argv[]) { |
|
char *tigers[] = {"callsm1.sm1","tigers.sm1"}; |
char *tigers[] = {"callsm1.sm1","tigers.sm1"}; |
char *basicCD[] = {"basicCD.sm1"}; |
char *basicCD[] = {"basicCD.sm1"}; |
/* If you change the above, you need to change the argc of Sm1_start below. |
/* If you change the above, you need to change the argc of Sm1_start below. |
*/ |
*/ |
|
|
if (argc > 1) { |
if (argc > 1) { |
if (strcmp(argv[1],"-monitor")==0) { |
if (strcmp(argv[1],"-monitor")==0) { |
Line 116 nullserver(int fdStream) { |
|
Line 116 nullserver(int fdStream) { |
|
/* In case of error in the stack machine, pop the error info |
/* In case of error in the stack machine, pop the error info |
and send the error packet. */ |
and send the error packet. */ |
/* oxSendOXheader(ostream,OX_DATA,SerialOX++); |
/* oxSendOXheader(ostream,OX_DATA,SerialOX++); |
oxSendCmoError(ostream); |
oxSendCmoError(ostream); |
oxSendOXheader(ostream,OX_DATA,SerialOX++); |
oxSendOXheader(ostream,OX_DATA,SerialOX++); |
sprintf(sreason,"Jump here by sm1 error."); |
sprintf(sreason,"Jump here by sm1 error."); |
oxSendCmoError2(ostream,sreason); |
oxSendCmoError2(ostream,sreason); |
*/ |
*/ |
Sm1_pushError2(SerialCurrent,-1,"Global jump by sm1 error"); |
Sm1_pushError2(SerialCurrent,-1,"Global jump by sm1 error"); |
|
|
Line 164 nullserver(int fdStream) { |
|
Line 164 nullserver(int fdStream) { |
|
case OX_DATA: fprintf(stderr," OX_DATA \n"); break; |
case OX_DATA: fprintf(stderr," OX_DATA \n"); break; |
case OX_SYNC_BALL: fprintf(stderr," OX_SYNC_BALL \n"); break; |
case OX_SYNC_BALL: fprintf(stderr," OX_SYNC_BALL \n"); break; |
case -1: fprintf(stderr," End of file. Exiting the server child.\n"); |
case -1: fprintf(stderr," End of file. Exiting the server child.\n"); |
exit(); break; |
exit(); break; |
default: fprintf(stderr," ?! \n"); break; |
default: fprintf(stderr," ?! \n"); break; |
} |
} |
} |
} |
Line 228 nullserverCommand(ox_stream ostream) { |
|
Line 228 nullserverCommand(ox_stream ostream) { |
|
case SM_pushCMOtag: |
case SM_pushCMOtag: |
if (message) fprintf(stderr," pushCMOtag \n"); |
if (message) fprintf(stderr," pushCMOtag \n"); |
Sm1_pushCMOtag(SerialCurrent); |
Sm1_pushCMOtag(SerialCurrent); |
break; |
break; |
case SM_setName: |
case SM_setName: |
if (message) fprintf(stderr," setName \n"); |
if (message) fprintf(stderr," setName \n"); |
iresult = Sm1_setName(); |
iresult = Sm1_setName(); |
Line 278 nullserverCommand(ox_stream ostream) { |
|
Line 278 nullserverCommand(ox_stream ostream) { |
|
if (message) fprintf(stderr,"Done.\n"); |
if (message) fprintf(stderr,"Done.\n"); |
break; |
break; |
case SM_shutdown: |
case SM_shutdown: |
fprintf(stderr,"Shutting down the engine.\n"); |
fprintf(stderr,"Shutting down the engine.\n"); |
exit(0); |
exit(0); |
break; |
break; |
case SM_beginBlock: |
case SM_beginBlock: |
case SM_endBlock: |
case SM_endBlock: |
fprintf(stderr,"This command has not yet been implemented.\n"); |
fprintf(stderr,"This command has not yet been implemented.\n"); |
Line 305 nullserver_simplest(int fd) { |
|
Line 305 nullserver_simplest(int fd) { |
|
|
|
|
|
void controlResetHandler(sig) |
void controlResetHandler(sig) |
int sig; |
int sig; |
{ |
{ |
signal(sig,SIG_IGN); |
signal(sig,SIG_IGN); |
fprintf(stderr,"From controlResetHandler. OxCritical = %d\n",OxCritical); |
fprintf(stderr,"From controlResetHandler. OxCritical = %d\n",OxCritical); |