|
32 | 32 | * CommPort
|
33 | 33 | */
|
34 | 34 | public abstract class CommPort extends Object {
|
35 |
| - protected String name; |
36 |
| - private final static boolean debug = false; |
| 35 | + protected String name; |
| 36 | + private final static boolean debug = false; |
37 | 37 |
|
38 |
| - public abstract void enableReceiveFraming(int f) throws UnsupportedCommOperationException; |
| 38 | + public abstract void enableReceiveFraming(int f) throws UnsupportedCommOperationException; |
39 | 39 |
|
40 |
| - public abstract void disableReceiveFraming(); |
| 40 | + public abstract void disableReceiveFraming(); |
41 | 41 |
|
42 |
| - public abstract boolean isReceiveFramingEnabled(); |
| 42 | + public abstract boolean isReceiveFramingEnabled(); |
43 | 43 |
|
44 |
| - public abstract int getReceiveFramingByte(); |
| 44 | + public abstract int getReceiveFramingByte(); |
45 | 45 |
|
46 |
| - public abstract void disableReceiveTimeout(); |
| 46 | + public abstract void disableReceiveTimeout(); |
47 | 47 |
|
48 |
| - public abstract void enableReceiveTimeout(int time) throws UnsupportedCommOperationException; |
| 48 | + public abstract void enableReceiveTimeout(int time) throws UnsupportedCommOperationException; |
49 | 49 |
|
50 |
| - public abstract boolean isReceiveTimeoutEnabled(); |
| 50 | + public abstract boolean isReceiveTimeoutEnabled(); |
51 | 51 |
|
52 |
| - public abstract int getReceiveTimeout(); |
| 52 | + public abstract int getReceiveTimeout(); |
53 | 53 |
|
54 |
| - public abstract void enableReceiveThreshold(int thresh) throws UnsupportedCommOperationException; |
| 54 | + public abstract void enableReceiveThreshold(int thresh) throws UnsupportedCommOperationException; |
55 | 55 |
|
56 |
| - public abstract void disableReceiveThreshold(); |
| 56 | + public abstract void disableReceiveThreshold(); |
57 | 57 |
|
58 |
| - public abstract int getReceiveThreshold(); |
| 58 | + public abstract int getReceiveThreshold(); |
59 | 59 |
|
60 |
| - public abstract boolean isReceiveThresholdEnabled(); |
| 60 | + public abstract boolean isReceiveThresholdEnabled(); |
61 | 61 |
|
62 |
| - public abstract void setInputBufferSize(int size); |
| 62 | + public abstract void setInputBufferSize(int size); |
63 | 63 |
|
64 |
| - public abstract int getInputBufferSize(); |
| 64 | + public abstract int getInputBufferSize(); |
65 | 65 |
|
66 |
| - public abstract void setOutputBufferSize(int size); |
| 66 | + public abstract void setOutputBufferSize(int size); |
67 | 67 |
|
68 |
| - public abstract int getOutputBufferSize(); |
| 68 | + public abstract int getOutputBufferSize(); |
69 | 69 |
|
70 |
| - public void close() { |
71 |
| - if (debug) |
72 |
| - System.out.println("CommPort:close()"); |
| 70 | + public void close() { |
| 71 | + if (debug) |
| 72 | + System.out.println("CommPort:close()"); |
73 | 73 |
|
74 |
| - try { |
75 |
| - CommPortIdentifier cp = CommPortIdentifier.getPortIdentifier(this); |
76 |
| - if (cp != null) |
77 |
| - CommPortIdentifier.getPortIdentifier(this).internalClosePort(); |
78 |
| - } catch (NoSuchPortException e) {// JABA is not going to add code |
79 |
| - } |
| 74 | + try { |
| 75 | + CommPortIdentifier cp = CommPortIdentifier.getPortIdentifier(this); |
| 76 | + if (cp != null) |
| 77 | + CommPortIdentifier.getPortIdentifier(this).internalClosePort(); |
| 78 | + } catch (NoSuchPortException e) {// JABA is not going to add code |
80 | 79 | }
|
| 80 | + } |
81 | 81 |
|
82 |
| - public abstract InputStream getInputStream() throws IOException; |
| 82 | + public abstract InputStream getInputStream() throws IOException; |
83 | 83 |
|
84 |
| - public abstract OutputStream getOutputStream() throws IOException; |
| 84 | + public abstract OutputStream getOutputStream() throws IOException; |
85 | 85 |
|
86 |
| - public String getName() { |
87 |
| - if (debug) |
88 |
| - System.out.println("CommPort:getName()"); |
89 |
| - return (name); |
90 |
| - } |
| 86 | + public String getName() { |
| 87 | + if (debug) |
| 88 | + System.out.println("CommPort:getName()"); |
| 89 | + return (name); |
| 90 | + } |
91 | 91 |
|
92 |
| - @Override |
93 |
| - public String toString() { |
94 |
| - if (debug) |
95 |
| - System.out.println("CommPort:toString()"); |
96 |
| - return (name); |
97 |
| - } |
| 92 | + @Override |
| 93 | + public String toString() { |
| 94 | + if (debug) |
| 95 | + System.out.println("CommPort:toString()"); |
| 96 | + return (name); |
| 97 | + } |
98 | 98 | }
|
0 commit comments