Files
qt-migration-legatus/qt5-before/dlbo/Lts/Tools/EsriHTML/Websockets/js/websocket.js
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-15 18:20:26 +00:00

201 lines
4.5 KiB
JavaScript

var exampleSocket;
var firstMsg = true;
var textBoxArr = [];
var SelBranchVal = "";
var connectedToServer = false;
var msg;
window.onload = function () {
WebSocketTest();
}
function WebSocketTest() {
if ("WebSocket" in window) {
{
var ipadresse = document.getElementById("ipadresse").value;
exampleSocket = new WebSocket("ws://" + ipadresse);
connectedToServer = true;
}
exampleSocket.onopen = function () {
document.getElementById("Serverconnect").innerHTML = "Server: connected";
document.getElementById("Serverconnect").style.color = "green"
};
//wird immer aufgerufen wenn der Socket eine Nachricht vom Server empfängt
exampleSocket.onmessage = function (event) {
console.log(msg);
msg = JSON.parse(event.data);
document.getElementById("receivedMessages").innerHTML += JSON.stringify(msg);
document.getElementById("receivedMessages").innerHTML += "<br>";
};
exampleSocket.onclose = function () {
// websocket is closed.
document.getElementById("Serverconnect").innerHTML = "Server: not connected";
document.getElementById("Serverconnect").style.color = "grey";
// document.getElementById("Wlsconnect").innerHTML = "Wls: not connected";
document.getElementById("Wlsconnect").style.color = "red";
connectedToServer = false;
alert("Connection to Server closed.");
};
}
else {
// The browser doesn't support WebSocket
alert("WebSocket is NOT supported by your Browser!");
}
}
function sendGetEssentials() {
exampleSocket.send(JSON.stringify({
type: "getEssentials",
uuid: "UUID"
}));
}
function sendMountTags() {
exampleSocket.send(JSON.stringify({
type: "mountTag",
uuid: "UUID",
data: {
mountingPointTag : "BarcodeTag1",
assetTag: "BarcodeAsset1"
}
}));
exampleSocket.send(JSON.stringify({
type: "mountTag",
uuid: "UUID",
data: {
mountingPointTag : "BarcodeTag2",
assetTag: "BarcodeAsset2"
}
}));
}
function sendGetAssets() {
exampleSocket.send(JSON.stringify({
type: "getAssets",
uuid: "UUID"
}));
}
function sendGetPlannedMounting() {
exampleSocket.send(JSON.stringify({
type: "getPlannedMounting",
uuid: "UUID"
}));
}
function sendGetObjectMounting() {
exampleSocket.send(JSON.stringify({
type: "getObjectMounting",
uuid: "UUID"
}));
}
//--------------------------------------------------------//
function servicePortsInformationRequest() {
console.log("servicePortsInformationRequest");
exampleSocket.send(JSON.stringify({
type: "servicePortsInformationRequest",
uuid: "UUID"
}));
}
//--------------------------------------------------------//
function baseDlRequest() {
exampleSocket.send(JSON.stringify({
type: "baseDlRequest",
uuid: "UUID"
}));
}
function pdfListRequest() {
exampleSocket.send(JSON.stringify({
type: "pdfListRequest",
uuid: "UUID"
}));
}
//--------------------------------------------------------//
function sendGetAssets() {
//exampleSocket schickt eine Abfrage an den Server
//liefert das asset mit der TypId zurück
// BSM
exampleSocket.send(JSON.stringify({
type: "getAssets",
uuid: "UUID",
data: {
assetTypeId: [1, 2, 3, 4, 5, 6, 10, 12]
}
}));
}
function sendAvsEndEnd() {
console.log("sendAvsEndEnd");
exampleSocket.send(JSON.stringify({
endTime: 1641887329958,
eventTime: 1641887329958,
eventType: 10,
id: 72774090,
lastRangeClosed: true,
streamName: "av_0141"
}));
}
function sendAvsOpen() {
console.log("sendAvsOpen");
exampleSocket.send(JSON.stringify({
endTime: 1641887329958,
eventTime: 1641887329958,
eventType: 10,
id: 72774090,
lastRangeClosed: true,
streamName: "av_0141"
}));
}
function sendMountTags() {
exampleSocket.send(JSON.stringify({
type: "mountTag",
uuid: "UUID",
data: {
mountingPointTag: "se_barcode_1",
assetTag: "asset_barcode_1"
}
}));
exampleSocket.send(JSON.stringify({
type: "mountTag",
uuid: "UUID",
data: {
mountingPointTag: "se_barcode_2",
assetTag: "asset_barcode_2"
}
}));
}