Skip to content

Commit 9bbc647

Browse files
committed
remove prints and add docs
1 parent 1c24f6a commit 9bbc647

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
This is an attempt to port the original work https://github.com/ornl-epics/pvws to a Spring Boot-based web application. While the code is adapted to the web socket APIs of Spring Boot, most of the code is essentially unchanged.
22

3+
Endpoints
4+
=========
5+
6+
7+
`HTTP`/`HTTPS`
8+
------
9+
`/pvws`
10+
11+
This shows a webpage with documentation and test utilities.
12+
13+
`pvws/info`
14+
15+
This returns JSON information with general server info.
16+
17+
`pvws/summary`
18+
19+
This returns JSON with a summary of all active web sockets.
20+
21+
`pvws/socket`
22+
23+
This returns JSON with details on all active web sockets and their PVs.
24+
25+
`pvws/pool`
26+
27+
This returns JSON with a listing of all PVs in the PV connection pool.
28+
29+
`pvws/pvget`
30+
31+
This returns a single value read from a PV in the same JSON format as a websocket message.
32+
33+
Takes the fully qualified PV address as the `name` parameter.
34+
35+
`WS`/`WSS`
36+
----------
37+
38+
`pvws/pv`
39+
40+
This is the main websocket connection endpoint. See `/pvws` for information on commands.
41+
342
Requirements
443
------------
544

src/main/java/org/phoebus/pvws/EpicsWebSocketServerApplication.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,15 @@ public String pvget(@RequestParam String name) {
6868
final WebSocketPV pv = new WebSocketPV(name, null);
6969
String ret;
7070
try {
71-
72-
// TODO make these configurable?
7371
int maxAttempts = 100;
7472
int retryDelay = 50;
7573

7674
VType lastValue = null;
77-
7875
for (int i = 0; i< maxAttempts; i++) {
7976
Thread.sleep(retryDelay);
8077
lastValue = pv.get();
8178
if (lastValue != null) break;
82-
System.out.println("value is" + lastValue + "attempt no " + i);
8379
}
84-
85-
System.out.println("value is" + lastValue);
8680
ret = Vtype2Json.toJson(name, lastValue, null, true, true);
8781
} catch (final Exception ex) {
8882
ret = String.format("Unable to get PV value for %s - exception %s", name, ex);

0 commit comments

Comments
 (0)