You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cg...@apache.org on 2026/01/05 20:36:20 UTC
(plc4x-extras) 02/02: Working on DataBrowser support.
This is an automated email from the ASF dual-hosted git repository.
cgarcia pushed a commit to branch feature/merlot
in repository https://gitbox.apache.org/repos/asf/plc4x-extras.git
commit 355a340b643ed0c4539694291d8c7e0c9e4fa51b
Merge: 092dcc0 f98cfde
Author: César García <ce...@ceos.com.ve>
AuthorDate: Mon Jan 5 16:36:04 2026 -0400
Working on DataBrowser support.
.../impl/MerlotDataBrowserSupportImpl.java | 15 +-
.../OSGI-INF/blueprint/archiver-service.xml | 2 +-
.../org.apache.plc4x.merlot.das.api/.classpath | 14 +-
.../.settings/org.eclipse.jdt.core.prefs | 6 +-
.../plc4x/merlot/api/PlcGeneralFunction.java | 4 +
.../plc4x/merlot/api/core/PlcStaticHelper.java | 591 +++++++++++++++++++++
.../merlot/api/impl/PlcGeneralFunctionImpl.java | 39 +-
.../apache/plc4x/merlot/api/impl/PlcItemImpl.java | 36 +-
.../plc4x/merlot/api/impl/PlcSecureBootImpl.java | 19 +-
.../src/main/resources/proto/EPICSEvent.proto | 228 ++++++++
.../merlot/org.apache.plc4x.merlot.db/.classpath | 2 +-
.../.settings/org.eclipse.jdt.core.prefs | 6 +-
.../org/apache/plc4x/merlot/db/api/DBRecord.java | 18 +
.../plc4x/merlot/db/core/DBBooleanFactory.java | 28 +-
.../apache/plc4x/merlot/db/core/DBByteFactory.java | 28 +-
.../plc4x/merlot/db/core/DBDoubleFactory.java | 32 +-
.../plc4x/merlot/db/core/DBFloatFactory.java | 34 +-
.../apache/plc4x/merlot/db/core/DBIntFactory.java | 30 +-
.../apache/plc4x/merlot/db/core/DBLongFactory.java | 32 +-
.../plc4x/merlot/db/core/DBShortFactory.java | 24 +-
.../plc4x/merlot/db/core/DBStringFactory.java | 24 +-
.../plc4x/merlot/db/core/DBUByteFactory.java | 30 +-
.../apache/plc4x/merlot/db/core/DBUIntFactory.java | 30 +-
.../plc4x/merlot/db/core/DBULongFactory.java | 30 +-
.../plc4x/merlot/db/core/DBUShortFactory.java | 30 +-
.../plc4x/merlot/drv/s7/impl/S7PlcModelImpl.java | 100 ++--
.../merlot/drv/s7/impl/S7PlcTagFunctionImpl.java | 2 +-
.../merlot/drv/s7/core/S7DBAiFactoryTest.java | 210 ++++++++
.../merlot/drv/s7/core/S7DBAoFactoryTest.java | 178 +++++++
.../org.apache.plc4x.merlot.drv.simulated/pom.xml | 5 +
.../impl/SimulatedPlcModelFactoryImpl.java | 42 ++
.../drv/simulated/impl/SimulatedPlcModelImpl.java | 172 ++++++
.../impl/SimulatedPlcTagFunctionImpl.java | 125 ++++-
.../OSGI-INF/blueprint/simulated-drv-service.xml | 18 +-
34 files changed, 1765 insertions(+), 419 deletions(-)
diff --cc plc4j/tools/merlot/org.apache.plc4x.merlot.archiver/src/main/java/org/apache/plc4x/merlot/archiver/impl/MerlotDataBrowserSupportImpl.java
index 88b85ff,9de2a10..6198ba9
--- a/plc4j/tools/merlot/org.apache.plc4x.merlot.archiver/src/main/java/org/apache/plc4x/merlot/archiver/impl/MerlotDataBrowserSupportImpl.java
+++ b/plc4j/tools/merlot/org.apache.plc4x.merlot.archiver/src/main/java/org/apache/plc4x/merlot/archiver/impl/MerlotDataBrowserSupportImpl.java
@@@ -52,11 -52,11 +52,11 @@@ public class MerlotDataBrowserSupportIm
try {
server = HttpServer.create(new InetSocketAddress(2000), 0);
// Create a context for a specific path and set the handler
- server.createContext("/retrieval/bpl/searchForPVsRegex", new MyHandler());
- server.createContext("/retrieval/data/getData.raw", new MyHandler2());
+ server.createContext("/request/bpl/searchForPVsRegex", new MyHandler());
+ server.createContext("/request/data/getData.raw", new MyHandler());
server.setExecutor(null); // Use the default executor
server.start();
- System.out.println("Server is running on port 8000");
+ System.out.println("Server is running on port 2000");
} catch (IOException e) {
System.out.println("Error starting the server: " + e.getMessage());
}
@@@ -91,10 -99,10 +99,11 @@@
public void handle(HttpExchange exchange) throws IOException
{
// Handle the request
- System.out.println("3 Protocol: " + exchange.getProtocol());
- System.out.println("3 Method : " + exchange.getRequestMethod());
- System.out.println("3 URI : " + exchange.getRequestURI().toString());
- String response = "uno\r\ndos\r\ntres\r\n ";
+ System.out.println("Protocol: " + exchange.getProtocol());
+ System.out.println("Method : " + exchange.getRequestMethod());
+ System.out.println("URI : " + exchange.getRequestURI().toString());
+ String response = "uno\r\ndos\r\ntres\r\n";
++
exchange.sendResponseHeaders(200, response.length());
OutputStream os = exchange.getResponseBody();
os.write(response.getBytes());
@@@ -107,15 -115,15 +116,15 @@@
public void handle(HttpExchange exchange) throws IOException
{
// Handle the request
- System.out.println("4 Protocol: " + exchange.getProtocol());
- System.out.println("4 Method : " + exchange.getRequestMethod());
- System.out.println("4 URI : " + exchange.getRequestURI().toString());
- String response = "uno\r\ndos\r\ntres\r\n ";
+ System.out.println("2 Protocol: " + exchange.getProtocol());
+ System.out.println("2 Method : " + exchange.getRequestMethod());
+ System.out.println("2 URI : " + exchange.getRequestURI().toString());
+ String response = "uno\r\ndos\r\ntres\r\n";
++
exchange.sendResponseHeaders(200, response.length());
OutputStream os = exchange.getResponseBody();
os.write(response.getBytes());
os.close();
}
- }
- }
--
++ }
}