Subversion Repositories Projects

Rev

Rev 1560 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1560 Rev 1562
Line 68... Line 68...
68
                ConfigSet cs = null;
68
                ConfigSet cs = null;
Line 69... Line 69...
69
 
69
 
70
                UniversalReadParamSetRequestFrame frame = new UniversalReadParamSetRequestFrame();
70
                UniversalReadParamSetRequestFrame frame = new UniversalReadParamSetRequestFrame();
71
                frame.setConfigurationSetNumber(parameterSetNumber);
71
                frame.setConfigurationSetNumber(parameterSetNumber);
72
                q.sendRequest(frame);
72
                q.sendRequest(frame);
73
                UniversalReadParamSetResponseFrame r = (UniversalReadParamSetResponseFrame) q.getResponseFor(frame, 3000);
73
                UniversalReadParamSetResponseFrame r = (UniversalReadParamSetResponseFrame) q.getResponseFor(frame, 5000);
74
                if (r == null) {
74
                if (r == null) {
75
                        System.err.println("ERROR. Timeout waiting for response.");
75
                        System.err.println("ERROR. Timeout waiting for response.");
76
                } else {
76
                } else {
77
                        int paramSetVersion = r.getConfigurationVersion();
77
                        int paramSetVersion = r.getConfigurationVersion();
Line 242... Line 242...
242
        public static void main(String[] args) throws IOException {
242
        public static void main(String[] args) throws IOException {
243
                if (!"r".equals(args[0]) && !"w".equals(args[0])) help();
243
                if (!"r".equals(args[0]) && !"w".equals(args[0])) help();
244
                if ("w".equals(args[0]) && (args.length!=3 && args.length!=4)) help();
244
                if ("w".equals(args[0]) && (args.length!=3 && args.length!=4)) help();
245
                if ("r".equals(args[0]) && (args.length!=3 && args.length!=4)) help();
245
                if ("r".equals(args[0]) && (args.length!=3 && args.length!=4)) help();
Line 246... Line 246...
246
 
246
 
Line 247... Line 247...
247
                String portIdentifier = "COM10";
247
                String portIdentifier = null;
248
               
248
               
249
                if ("r".equals(args[0])) {
249
                if ("r".equals(args[0])) {
250
                        readConfiguration(portIdentifier, Integer.parseInt(args[1]));
250
                        readConfiguration(portIdentifier, Integer.parseInt(args[1]));