Compare commits

..

1 Commits

Author SHA1 Message Date
holz holz@unicon-gmbh.de 2dbba91efa kleinere Korrekturen 2026-08-13 11:07:11 +02:00
3 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -26,7 +26,11 @@ class JsonHandler implements HttpHandler
this.agent = agent; this.agent = agent;
} }
/**
* GET-Request bearbeiten
* @param httpExchange
* @throws IOException
*/
@Override @Override
public void handle(HttpExchange httpExchange) throws IOException public void handle(HttpExchange httpExchange) throws IOException
{ {
+2 -1
View File
@@ -116,7 +116,7 @@ public class KebaAgent
/** /**
* alle wichtigen modbus-Daten beschaffen * alle wichtigen modbus-Daten beschaffen
* @param params * @param params URI-Parameter des GET-Requests (werden aktuell ignoriert)
* @return JSON-Daten * @return JSON-Daten
*/ */
String getDataAsJson(Map<String, String> params) String getDataAsJson(Map<String, String> params)
@@ -126,6 +126,7 @@ public class KebaAgent
JSONObject joRoot = new JSONObject(); JSONObject joRoot = new JSONObject();
JSONArray jaStations = new JSONArray(); JSONArray jaStations = new JSONArray();
System.out.printf("Req at %s\n", LocalDateTime.now().withNano(0));
// über alle Wallboxen ... // über alle Wallboxen ...
getAliases() getAliases()
.forEach(name -> .forEach(name ->
+1
View File
@@ -39,6 +39,7 @@ public class KebaModbus
private static int timeout_ms = 10000; private static int timeout_ms = 10000;
record RCacheEntry(String name, LocalDateTime ts, Integer value){}; record RCacheEntry(String name, LocalDateTime ts, Integer value){};
private Map<String, RCacheEntry> cache = new HashMap<>(); private Map<String, RCacheEntry> cache = new HashMap<>();