00001 #include <stdio.h> 00002 #include <sys/types.h> 00003 #include <sys/socket.h> 00004 #include <netinet/in.h> 00005 #include <strings.h> 00006 #include <string.h> 00007 #include <arpa/inet.h> 00008 #include <stdlib.h> 00009 #include <unistd.h> 00010 #include <signal.h> 00011 #include <errno.h> 00012 #include <pthread.h> 00013 00014 #include "command_line_parser.h" 00015 #include "timer.h" 00016 #include "scheduler.h" 00017 #include "frame_comm.h" 00018 00019 #define STATE_DELAY_US 10000 00020 00021 void error(char *); 00022 00023 command_options_t options; 00024 ControlFrame_t msg; 00025 00026 int main(int argc, char *argv[]) { 00027 init_command_line_options(&options); 00028 command_line_parser (argc, argv, &options); 00029 00030 initControlFrame(&msg); 00031 printf("Cart Command Server Started\n"); 00032 00033 while (1) { 00034 scheduler(&options); 00035 } 00036 return(0); 00037 } 00038 00039 void error(char *msg) { 00040 perror(msg); 00041 exit(1); 00042 } 00043
1.3.9.1