// Parse jarx config file int readConfig( char *cmd, char *jarfile, char *classpath, char *classname, char *versionmin ) { FILE *fh; char line[LINEMAXLEN]; fh = fopen( cmd, "r" ); if ( fh == NULL ) { return 1; } else { while ( fgets( line, LINEMAXLEN, fh ) ) { truncateNewline( line ); if ( getConfigParam( jarfile, line, JARX_JARFILE, sizeof( JARX_JARFILE ) - 1 ) ) ; else if ( getConfigParam( classpath, line, JARX_CLASSPATH, sizeof( JARX_CLASSPATH ) - 1 ) ) ; else if ( getConfigParam( classname, line, MAINCLASS, sizeof( MAINCLASS ) - 1 ) ) ; else getConfigParam( versionmin, line, JARX_VERSIONMIN, sizeof( JARX_VERSIONMIN ) - 1 ); } fclose( fh ); } return 0; }
uint8_t Trex::getUART_Error_Shutdown() { _uart_error_shutdown = getConfigParam(UART_Error_Shutdown); return _uart_error_shutdown; }
uint8_t Trex::getEnable_UART_Response_Delay() { _uart_response_delay = getConfigParam(Enable_UART_Response_Delay); return _uart_response_delay; }
uint8_t Trex::getSerial_Timeout() { _serial_timeout = getConfigParam(Serial_Timeout); return _serial_timeout; }
uint8_t Trex::getParabolic_Channels() { _parabolic_channels = getConfigParam(Parabolic_Channels); return _parabolic_channels; }
uint8_t Trex::getReversed_Channels() { _reversed_channels = getConfigParam(Reversed_Channels); return _reversed_channels; }
uint8_t Trex::getIgnored_Channels() { _ignored_channels = getConfigParam(Ignored_Channels); return _ignored_channels; }
uint8_t Trex::getDevice_Number() { _device_number = getConfigParam(Device_Number); return _device_number; }