Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
SET(bsm_SRCS
|
||||
bsm_api.cpp
|
||||
bsm_api.h
|
||||
bsm_socket.cpp
|
||||
bsm_socket.h
|
||||
bsm_socket_handler.cpp
|
||||
bsm_socket_handler.h
|
||||
bsm_telegrams_alive.h
|
||||
bsm_telegrams_base.cpp
|
||||
bsm_telegrams_base.h
|
||||
bsm_telegrams_bit_timeout_report.cpp
|
||||
bsm_telegrams_bit_timeout_report.h
|
||||
bsm_telegrams_bit_timeout_request.h
|
||||
bsm_telegrams_chopped_signal_flash.cpp
|
||||
bsm_telegrams_chopped_signal_flash.h
|
||||
bsm_telegrams_configuration_report.cpp
|
||||
bsm_telegrams_configuration_report.h
|
||||
bsm_telegrams_configuration_request.h
|
||||
bsm_telegrams_configuration_setup.cpp
|
||||
bsm_telegrams_configuration_setup.h
|
||||
bsm_telegrams_direct_fire.cpp
|
||||
bsm_telegrams_direct_fire.h
|
||||
bsm_telegrams_observer_controller.cpp
|
||||
bsm_telegrams_observer_controller.h
|
||||
bsm_telegrams_sw_version_report.cpp
|
||||
bsm_telegrams_sw_version_report.h
|
||||
bsm_telegrams_sw_version_request.h
|
||||
bsm_telegrams_technical_status.cpp
|
||||
bsm_telegrams_technical_status.h
|
||||
bsm_telegrams_technical_status_request.h
|
||||
bsm_types.h
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV BuildingControlBsm SHARED ${bsm_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlBsm
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
BuildingControlCommon
|
||||
)
|
||||
|
||||
NGL_ADD_EXECUTABLE(AAR SV BuildingControlTestBsm bsm_test_main.cpp)
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlTestBsm
|
||||
BuildingControlBsm
|
||||
nglcoreapplication
|
||||
)
|
||||
@@ -0,0 +1,99 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Api for BSM access
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-26
|
||||
*/
|
||||
|
||||
#include "bsm_api.h"
|
||||
#include "bsm_socket_handler.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
Api::Api(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_socketHandler(new SocketHandler(this))
|
||||
, m_logger(BuildingControlUnit::getLogger("BSM.Api"))
|
||||
{
|
||||
connect(m_socketHandler, &SocketHandler::opticalShot,
|
||||
this, &Api::opticalShot);
|
||||
connect(m_socketHandler, &SocketHandler::opticalShotOC,
|
||||
this, &Api::opticalShotOC);
|
||||
connect(m_socketHandler, &SocketHandler::bsmStateChanged,
|
||||
this, &Api::bsmStateChanged);
|
||||
}
|
||||
|
||||
Api::~Api()
|
||||
{
|
||||
delete m_socketHandler;
|
||||
}
|
||||
|
||||
bool Api::init(const BuildingBsmConfig &bsmConfig)
|
||||
{
|
||||
return m_socketHandler->init(bsmConfig);
|
||||
}
|
||||
|
||||
bool Api::triggerFlashlight(int bsmId, const QString &hostname, int numberOfFlashes, int pauseBetweenFlashesSec)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "triggerFlashlight bsmId=" << bsmId
|
||||
<< " hostname=" << hostname
|
||||
<< " numberOfFlashes=" << numberOfFlashes
|
||||
<< " pauseBetweenFlashesSec=" << pauseBetweenFlashesSec;
|
||||
return m_socketHandler->triggerFlashlight(bsmId, hostname, numberOfFlashes, pauseBetweenFlashesSec);
|
||||
}
|
||||
|
||||
bool Api::triggerFlashlightPulse(int bsmId, const QString &hostname,
|
||||
int numberOfFlashes,
|
||||
int pauseDuration,
|
||||
int choppedConfiguration,
|
||||
int flashDuration)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "triggerFlashlightPulse bsmId=" << bsmId
|
||||
<< " hostname=" << hostname
|
||||
<< " numberOfFlashes=" << numberOfFlashes
|
||||
<< " pauseDuration=" << pauseDuration
|
||||
<< " choppedConfiguration=" << choppedConfiguration
|
||||
<< " flashDuration=" << flashDuration;
|
||||
return m_socketHandler->triggerFlashlightPulse(bsmId, hostname, numberOfFlashes, pauseDuration, choppedConfiguration, flashDuration);
|
||||
}
|
||||
|
||||
bool Api::triggerFlashlights( int numberOfFlashes,
|
||||
int pauseDuration,
|
||||
int choppedConfiguration,
|
||||
int flashDuration)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "triggerFlashlights numberOfFlashes=" << numberOfFlashes
|
||||
<< " pauseDuration=" << pauseDuration
|
||||
<< " choppedConfiguration" << choppedConfiguration
|
||||
<< " flashDuration=" << flashDuration;
|
||||
return m_socketHandler->triggerFlashlights( numberOfFlashes, pauseDuration, choppedConfiguration, flashDuration);
|
||||
}
|
||||
|
||||
|
||||
QVector<BsmState> Api::bsmStates() const
|
||||
{
|
||||
return m_socketHandler->bsmStates();
|
||||
}
|
||||
|
||||
bool Api::getBsmConfiguration(int bsmId)
|
||||
{
|
||||
return m_socketHandler->getBsmConfiguration(bsmId);
|
||||
}
|
||||
|
||||
bool Api::getBsmBitTimeout(int bsmId)
|
||||
{
|
||||
return m_socketHandler->getBsmBitTimeout(bsmId);
|
||||
}
|
||||
|
||||
bool Api::getBsmTechnicalStatus(int bsmId)
|
||||
{
|
||||
return m_socketHandler->getBsmTechnicalStatus(bsmId);
|
||||
}
|
||||
|
||||
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Api for BSM access
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-26
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <BSM/buildingcontrolbsm_export.h>
|
||||
#include <QObject>
|
||||
#include <logger.h>
|
||||
#include "bsm_types.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
class SocketHandler;
|
||||
class BUILDINGCONTROLBSM_EXPORT Api : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Api(QObject *parent = nullptr);
|
||||
~Api();
|
||||
|
||||
QVector<BsmState> bsmStates() const;
|
||||
bool init(const BuildingBsmConfig &bsmConfig);
|
||||
public Q_SLOTS:
|
||||
bool triggerFlashlight(int bsmId, const QString &hostname = QString(), int numberOfFlashes = 1, int pauseBetweenFlashesSec = 1);
|
||||
bool triggerFlashlightPulse(int bsmId, const QString &hostname = QString(),
|
||||
int numberOfFlashes = 1,
|
||||
int pauseDuration = 1,
|
||||
int choppedConfiguration = 10,
|
||||
int flashDuration = 30);
|
||||
bool triggerFlashlights(int numberOfFlashes,
|
||||
int pauseDuration,
|
||||
int choppedConfiguration,
|
||||
int flashDuration);
|
||||
bool getBsmConfiguration(int bsmId);
|
||||
bool getBsmBitTimeout(int bsmId);
|
||||
bool getBsmTechnicalStatus(int bsmId);
|
||||
|
||||
Q_SIGNALS:
|
||||
void opticalShot(qint64 timeMSec,
|
||||
int sensorId,
|
||||
int originatorId,
|
||||
int ammunitionId,
|
||||
int deposition1,
|
||||
int deposition2);
|
||||
void opticalShotOC(qint64 timeMSec,
|
||||
int sensorId,
|
||||
int originatorId,
|
||||
int ammunitionId,
|
||||
DamageState damageState);
|
||||
void bsmStateChanged(const QVector<BsmState> &bsmStates);
|
||||
private:
|
||||
SocketHandler *m_socketHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,141 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* One connection to a bsm
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-18
|
||||
*/
|
||||
|
||||
|
||||
#include "bsm_socket.h"
|
||||
#include "bsm_telegrams_configuration_setup.h"
|
||||
#include <QTimer>
|
||||
#include <QHostAddress>
|
||||
|
||||
static const int s_aliveTimeout = 10; // 10 seconds
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
Socket::Socket(const Bsm &cfg, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_config(cfg)
|
||||
, m_tcpSocket(new QTcpSocket(this))
|
||||
, m_reconnectTimer(nullptr)
|
||||
, m_aliveTimer(new QTimer(this))
|
||||
, m_logger(BuildingControlUnit::getLogger("BSM.Socket"))
|
||||
{
|
||||
m_aliveTimer->setTimerType(Qt::VeryCoarseTimer);
|
||||
m_aliveTimer->setSingleShot(true);
|
||||
m_aliveTimer->setInterval(s_aliveTimeout * 2 * 1000);
|
||||
connect(m_aliveTimer, &QTimer::timeout, this, &Socket::onAliveTimeout);
|
||||
|
||||
connect(m_tcpSocket, &QTcpSocket::connected,
|
||||
this, &Socket::onConnected);
|
||||
connect(m_tcpSocket, &QTcpSocket::disconnected,
|
||||
this, &Socket::onDisconnected);
|
||||
connect(m_tcpSocket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error),
|
||||
this, &Socket::onError);
|
||||
connect(m_tcpSocket, &QTcpSocket::readyRead,
|
||||
this, &Socket::onReadyRead);
|
||||
onConnect();
|
||||
}
|
||||
|
||||
bool Socket::isConnected() const
|
||||
{
|
||||
return m_tcpSocket && (m_tcpSocket->state() == QAbstractSocket::ConnectedState);
|
||||
}
|
||||
|
||||
bool Socket::sendData(const QByteArray &data)
|
||||
{
|
||||
if (!isConnected())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "BSM " << m_config.id << ": Trying to send data but not connected!";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "BSM " << m_config.id << ": sending data: 0x" << data.toHex();
|
||||
m_tcpSocket->write(data);
|
||||
m_tcpSocket->flush();
|
||||
return true;
|
||||
}
|
||||
|
||||
void Socket::setVersionInformation(int verMajor, int verMinor, int verRev, const QString &manufacturer)
|
||||
{
|
||||
m_versionInfo = QStringLiteral("%1.%2-%3 (%4)").arg(verMajor).arg(verMinor).arg(verRev).arg(manufacturer);
|
||||
INFO_LOG(m_logger) << "BSM " << m_config.id
|
||||
<< ": version = " << m_versionInfo;
|
||||
}
|
||||
|
||||
void Socket::gotAlive()
|
||||
{
|
||||
// restart timer
|
||||
if (m_aliveTimer)
|
||||
m_aliveTimer->start();
|
||||
}
|
||||
|
||||
|
||||
void Socket::onConnected()
|
||||
{
|
||||
INFO_LOG(m_logger) << "BSM " << m_config.id << " is connected to "
|
||||
<< m_tcpSocket->peerAddress().toString() << ":" << m_tcpSocket->peerPort();
|
||||
Telegrams::PanConfigurationSetup tele;
|
||||
tele.m_aliveMessage = s_aliveTimeout;
|
||||
sendData(tele.toBytestream());
|
||||
m_aliveTimer->start();
|
||||
|
||||
emit connected(m_config.id);
|
||||
}
|
||||
|
||||
void Socket::onDisconnected()
|
||||
{
|
||||
INFO_LOG(m_logger) << "BSM " << m_config.id << " is disconnected";
|
||||
m_versionInfo.clear();
|
||||
startReconnectTimer();
|
||||
emit disconnected(m_config.id);
|
||||
}
|
||||
|
||||
void Socket::onError(QAbstractSocket::SocketError error)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "BSM " << m_config.id
|
||||
<< " can not connect to " << m_config.hostname << ":" << m_config.port
|
||||
<< ": " << m_tcpSocket->errorString()
|
||||
<< " (" << error << ");";
|
||||
startReconnectTimer();
|
||||
}
|
||||
|
||||
void Socket::onConnect()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "BSM " << m_config.id
|
||||
<< " trying to connect to " << m_config.hostname << ":" << m_config.port;
|
||||
m_tcpSocket->connectToHost(m_config.hostname, m_config.port);
|
||||
}
|
||||
|
||||
void Socket::onReadyRead()
|
||||
{
|
||||
emit dataAvailable(m_config.id, m_tcpSocket->readAll());
|
||||
}
|
||||
|
||||
void Socket::onAliveTimeout()
|
||||
{
|
||||
WARNING_LOG(m_logger) << "BSM " << m_config.id
|
||||
<< " alive timeout! Reconnecting";
|
||||
//m_tcpSocket->disconnectFromHost();
|
||||
}
|
||||
|
||||
void Socket::startReconnectTimer()
|
||||
{
|
||||
if (!m_reconnectTimer)
|
||||
{
|
||||
m_reconnectTimer = new QTimer(this);
|
||||
m_reconnectTimer->setTimerType(Qt::VeryCoarseTimer);
|
||||
m_reconnectTimer->setSingleShot(true);
|
||||
connect(m_reconnectTimer, &QTimer::timeout, this, &Socket::onConnect);
|
||||
}
|
||||
m_reconnectTimer->start(2000); // after 2sec
|
||||
if (m_aliveTimer)
|
||||
m_aliveTimer->stop();
|
||||
}
|
||||
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* One connection to a bsm
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-18
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QHostAddress>
|
||||
#include <QTcpSocket>
|
||||
#include <logger.h>
|
||||
#include "bsm_types.h"
|
||||
|
||||
class QTimer;
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
class Socket : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Socket(const BuildingControlUnit::Bsm &cfg, QObject *parent = nullptr);
|
||||
|
||||
bool isConnected() const;
|
||||
bool sendData(const QByteArray &data);
|
||||
const BuildingControlUnit::Bsm &bsmConfig() const { return m_config; }
|
||||
|
||||
QString versionInfo() const { return m_versionInfo; }
|
||||
void setVersionInformation(int verMajor, int verMinor, int verRev, const QString &manufacturer);
|
||||
void gotAlive();
|
||||
QHostAddress peerAddress() const { return m_tcpSocket->peerAddress(); }
|
||||
Q_SIGNALS:
|
||||
void dataAvailable(int id, const QByteArray &data);
|
||||
void connected(int id);
|
||||
void disconnected(int id);
|
||||
private Q_SLOTS:
|
||||
void onConnected();
|
||||
void onDisconnected();
|
||||
void onError(QAbstractSocket::SocketError error);
|
||||
void onConnect();
|
||||
void onReadyRead();
|
||||
void onAliveTimeout();
|
||||
private:
|
||||
void startReconnectTimer();
|
||||
private:
|
||||
BuildingControlUnit::Bsm m_config;
|
||||
QTcpSocket *m_tcpSocket;
|
||||
QTimer *m_reconnectTimer;
|
||||
QTimer *m_aliveTimer;
|
||||
QString m_versionInfo;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,469 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Handle incoming/outgoing data from/to all BSMs of one building
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-18
|
||||
*/
|
||||
|
||||
#include "bsm_socket_handler.h"
|
||||
#include "bsm_telegrams_base.h"
|
||||
#include "bsm_telegrams_bit_timeout_request.h"
|
||||
#include "bsm_telegrams_chopped_signal_flash.h"
|
||||
#include "bsm_telegrams_configuration_request.h"
|
||||
#include "bsm_telegrams_direct_fire.h"
|
||||
#include "bsm_telegrams_observer_controller.h"
|
||||
#include "bsm_telegrams_sw_version_report.h"
|
||||
#include "bsm_telegrams_sw_version_request.h"
|
||||
#include "bsm_telegrams_technical_status_request.h"
|
||||
#include <QDateTime>
|
||||
#include <QHostInfo>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
static const qint64 s_opticalTimeSlot = 100;
|
||||
|
||||
SocketHandler::SocketHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(BuildingControlUnit::getLogger("BSM.SocketHandler"))
|
||||
{
|
||||
connect(&m_cleanupQueueTimer, &QTimer::timeout,
|
||||
this, &SocketHandler::onCleanupQueue);
|
||||
|
||||
m_cleanupQueueTimer.setSingleShot(false);
|
||||
m_cleanupQueueTimer.setInterval(10000);
|
||||
m_cleanupQueueTimer.setTimerType(Qt::VeryCoarseTimer);
|
||||
m_cleanupQueueTimer.start();
|
||||
|
||||
|
||||
connect(&m_bsmStateTimer, &QTimer::timeout, this, &SocketHandler::onBsmStateTimerTimeOut);
|
||||
m_bsmStateTimer.setSingleShot(true);
|
||||
m_bsmStateTimer.setInterval(500);
|
||||
m_bsmStateTimer.setTimerType(Qt::VeryCoarseTimer);
|
||||
}
|
||||
|
||||
bool SocketHandler::init(const BuildingBsmConfig &bsmConfig)
|
||||
{
|
||||
// remove old sockets (should never happen)
|
||||
qDeleteAll(m_sockets);
|
||||
m_sockets.clear();
|
||||
m_socketData.clear();
|
||||
for (const Bsm &c : bsmConfig.bsmMap)
|
||||
{
|
||||
Socket *s = new Socket(c, this);//THIS
|
||||
|
||||
connect(s, &Socket::dataAvailable,
|
||||
this, &SocketHandler::onDataAvailable);
|
||||
connect(s, &Socket::disconnected,
|
||||
this, &SocketHandler::onSocketDisconnected);
|
||||
connect(s, &Socket::connected,
|
||||
this, &SocketHandler::onSocketConnected);
|
||||
m_sockets[c.id] = s;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SocketHandler::triggerFlashlight(int bsmId, const QString &hostname, int numberOfFlashes, int pauseBetweenFlashesSec)
|
||||
{
|
||||
Socket *s = hostname.isEmpty() ? getSocketForBsm(bsmId) : getSocketForBsm(hostname);
|
||||
if (!s)
|
||||
return false;
|
||||
DEBUG_LOG(m_logger) << "triggerFlashlight BSM Socket with socketId " << bsmId;
|
||||
Telegrams::PanChoppedSignalFlashlight flash;
|
||||
flash.m_noOfFlashes = qBound(0, numberOfFlashes, 255);
|
||||
flash.m_pauseDuration = qBound(1, pauseBetweenFlashesSec, 10);
|
||||
flash.m_flashDuration = 1;
|
||||
return s->sendData(flash.toBytestream());
|
||||
}
|
||||
|
||||
bool SocketHandler::triggerFlashlightPulse(int bsmId, const QString &hostname,
|
||||
int numberOfFlashes,
|
||||
int pauseDuration,
|
||||
int choppedConfiguration,
|
||||
int flashDuration)
|
||||
{
|
||||
Socket *s = hostname.isEmpty() ? getSocketForBsm(bsmId) : getSocketForBsm(hostname);
|
||||
if (!s)
|
||||
return false;
|
||||
DEBUG_LOG(m_logger) << "triggerFlashlightPulse BSM Socket with socketId " << bsmId
|
||||
<< " hostname=" << hostname
|
||||
<< " numberOfFlashes=" << numberOfFlashes
|
||||
<< " pauseDuration=" << pauseDuration
|
||||
<< " choppedConfiguration=" << choppedConfiguration
|
||||
<< " flashDuration=" << flashDuration;
|
||||
Telegrams::PanChoppedSignalFlashlight flash;
|
||||
flash.m_noOfFlashes = qBound(0, numberOfFlashes, 255);
|
||||
flash.m_pauseDuration = qBound(1, pauseDuration, 10);
|
||||
flash.m_choppedFlashConfig = qBound(2, choppedConfiguration, 10);
|
||||
flash.m_flashDuration = flashDuration;
|
||||
return s->sendData(flash.toBytestream());
|
||||
}
|
||||
|
||||
|
||||
bool SocketHandler::triggerFlashlights(int numberOfFlashes,
|
||||
int pauseDuration,
|
||||
int choppedConfiguration,
|
||||
int flashDuration)
|
||||
{
|
||||
int cntSocketsActive = 0;
|
||||
Telegrams::PanChoppedSignalFlashlight flash;
|
||||
flash.m_noOfFlashes = qBound(0, numberOfFlashes, 255);
|
||||
flash.m_pauseDuration = qBound(1, pauseDuration, 10);
|
||||
flash.m_choppedFlashConfig = qBound(2, choppedConfiguration, 10);
|
||||
flash.m_flashDuration = flashDuration;
|
||||
const QByteArray data = flash.toBytestream();
|
||||
for (Socket *s : qAsConst(m_sockets))
|
||||
{
|
||||
if (s->isConnected())
|
||||
{
|
||||
if (s->sendData(data))
|
||||
++cntSocketsActive;
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "BSM " << s->bsmConfig().id
|
||||
<< " is not connected - can not activate flash light";
|
||||
}
|
||||
if (cntSocketsActive == 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No active bsm - can not trigger flash light for all bsm";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SocketHandler::getBsmConfiguration(int bsmId)
|
||||
{
|
||||
Socket *s = getSocketForBsm(bsmId);
|
||||
if (!s)
|
||||
return false;
|
||||
Telegrams::PanConfigurationRequest req;
|
||||
return s->sendData(req.toBytestream());
|
||||
}
|
||||
|
||||
bool SocketHandler::getBsmBitTimeout(int bsmId)
|
||||
{
|
||||
Socket *s = getSocketForBsm(bsmId);
|
||||
if (!s)
|
||||
return false;
|
||||
Telegrams::PanBitTimeoutRequest req;
|
||||
return s->sendData(req.toBytestream());
|
||||
}
|
||||
|
||||
bool SocketHandler::getBsmTechnicalStatus(int bsmId)
|
||||
{
|
||||
Socket *s = getSocketForBsm(bsmId);
|
||||
if (!s)
|
||||
return false;
|
||||
Telegrams::PanTechnicalStatusRequest req;
|
||||
return s->sendData(req.toBytestream());
|
||||
}
|
||||
|
||||
QVector<BsmState> SocketHandler::bsmStates() const
|
||||
{
|
||||
QVector<BsmState> ret;
|
||||
ret.reserve(m_sockets.size());
|
||||
for (const Socket *s : m_sockets)
|
||||
{
|
||||
BsmState bs(s->bsmConfig());
|
||||
bs.bConnected = s->isConnected();
|
||||
bs.versionInfo = s->versionInfo();
|
||||
ret += bs;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void SocketHandler::onBsmStateTimerTimeOut()
|
||||
{
|
||||
emit bsmStateChanged(bsmStates());
|
||||
}
|
||||
|
||||
void SocketHandler::onDataAvailable(int id, const QByteArray &data)
|
||||
{
|
||||
m_socketData[id] = parseBuffer(id, m_socketData[id] + data);
|
||||
}
|
||||
|
||||
void SocketHandler::onSocketConnected(int id)
|
||||
{
|
||||
requestVersion(id); // hopefully 500ms are enough for a version request
|
||||
DEBUG_LOG(m_logger) << "BSM Socket with id " << id << " connected";
|
||||
m_bsmStateTimer.start();
|
||||
}
|
||||
|
||||
void SocketHandler::onSocketDisconnected(int id)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "BSM Socket with id " << id << " disconnected";
|
||||
m_socketData[id].clear();
|
||||
m_bsmStateTimer.start();
|
||||
}
|
||||
|
||||
|
||||
void SocketHandler::onCleanupQueue()
|
||||
{
|
||||
if (m_lastShots.isEmpty())
|
||||
return;
|
||||
QVector<OpticalShot> activeShots;
|
||||
qint64 tNow = QDateTime::currentMSecsSinceEpoch();
|
||||
for (const OpticalShot &os : qAsConst(m_lastShots))
|
||||
{
|
||||
if (os.timeStampMSec < tNow - s_opticalTimeSlot)
|
||||
continue;
|
||||
activeShots += os;
|
||||
}
|
||||
m_lastShots = activeShots;
|
||||
}
|
||||
|
||||
Socket *SocketHandler::getSocketForBsm(int bsmId)
|
||||
{
|
||||
Socket *s = m_sockets.value(bsmId);
|
||||
if (!s)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Got invalid bsm id (" << bsmId << ") to trigger flashlight";
|
||||
return nullptr;
|
||||
}
|
||||
if (!s->isConnected())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Bsm with id " << bsmId
|
||||
<< " is not connected - can not activate flash light";
|
||||
return nullptr;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
Socket *SocketHandler::getSocketForBsm(const QString &hostname)
|
||||
{
|
||||
const QHostInfo hi = QHostInfo::fromName(hostname);
|
||||
const auto addresses = hi.addresses();
|
||||
if (addresses.isEmpty())
|
||||
return nullptr;
|
||||
for (const QHostAddress &ha : addresses)
|
||||
{
|
||||
if (ha.isLoopback())
|
||||
continue;
|
||||
for (Socket *s : qAsConst(m_sockets))
|
||||
{
|
||||
if (s->peerAddress() == ha)
|
||||
return s;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
QByteArray SocketHandler::parseBuffer(int id, const QByteArray &buffer)
|
||||
{
|
||||
int iEndPos = 0;
|
||||
int iCurReadPos = 0;
|
||||
while (findNextSyncStartByte(buffer, iCurReadPos))
|
||||
{
|
||||
const int iStartPos = iCurReadPos;
|
||||
if (!findNextSyncEndByte(buffer, iCurReadPos))
|
||||
break;
|
||||
iEndPos = iCurReadPos;
|
||||
parseBsmTelegram(id, buffer.mid(iStartPos + 1, iEndPos - iStartPos - 1));
|
||||
}
|
||||
return buffer.mid(iEndPos);
|
||||
}
|
||||
|
||||
void SocketHandler::parseBsmTelegram(int id, const QByteArray &baTele)
|
||||
{
|
||||
Telegrams::Telegram *tele = Telegrams::Telegram::telegramFromBytestream(baTele);
|
||||
if (!tele)
|
||||
return;
|
||||
if (tele->telId() != Telegrams::PanTelegramId::ALIVE)
|
||||
DEBUG_LOG(m_logger) << "Got tele from bsm with id " << id << ": " << tele->print();
|
||||
switch (tele->telId())
|
||||
{
|
||||
case Telegrams::PanTelegramId::ALIVE:
|
||||
{
|
||||
Socket *s = m_sockets.value(id);
|
||||
if (s)
|
||||
s->gotAlive();
|
||||
break;
|
||||
}
|
||||
case Telegrams::PanTelegramId::REQ_BIT_TIMEOUT:
|
||||
case Telegrams::PanTelegramId::BIT_TIMEOUT_REPORT:
|
||||
case Telegrams::PanTelegramId::REQ_SW_VERSION:
|
||||
case Telegrams::PanTelegramId::CONFIGURATION_SETUP:
|
||||
case Telegrams::PanTelegramId::REQ_CONFIGURATION:
|
||||
case Telegrams::PanTelegramId::REQ_TECHNICAL_STATUS:
|
||||
case Telegrams::PanTelegramId::TECHNICAL_STATUS:
|
||||
case Telegrams::PanTelegramId::SIGNAL_FLASHLIGHT:
|
||||
case Telegrams::PanTelegramId::CHOPPED_SIGNAL_FLASH:
|
||||
break;
|
||||
case Telegrams::PanTelegramId::CONFIGURATION_REPORT:
|
||||
// request version
|
||||
//requestVersion(id);
|
||||
break;
|
||||
case Telegrams::PanTelegramId::SW_VERSION_REPORT:
|
||||
{
|
||||
Telegrams::PanSwVersionReport *rep = static_cast<Telegrams::PanSwVersionReport *>(tele);
|
||||
Socket *s = m_sockets.value(id);
|
||||
if (s)
|
||||
s->setVersionInformation(rep->m_mainVersion,
|
||||
rep->m_subVersion,
|
||||
rep->m_revision,
|
||||
QString::fromLatin1(rep->m_manufacturer));
|
||||
break;
|
||||
}
|
||||
case Telegrams::PanTelegramId::ER_DIRECT_FIRE:
|
||||
handleDirectFire(id, static_cast<Telegrams::PanDirectFire *>(tele));
|
||||
break;
|
||||
case Telegrams::PanTelegramId::ER_OBSERVER_CONTR:
|
||||
handleObserverController(id, static_cast<Telegrams::PanObserverController *>(tele));
|
||||
break;
|
||||
}
|
||||
delete tele;
|
||||
}
|
||||
|
||||
|
||||
bool SocketHandler::requestVersion(int id)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Requesting version for BSM " << id;
|
||||
Socket *s = m_sockets.value(id);
|
||||
if (!s || !s->isConnected())
|
||||
return false;
|
||||
|
||||
Telegrams::PanSwVersionRequest tele;
|
||||
return s->sendData(tele.toBytestream());
|
||||
}
|
||||
|
||||
void SocketHandler::handleDirectFire(int id, const Telegrams::PanDirectFire *tele)
|
||||
{
|
||||
if (!tele)
|
||||
return;
|
||||
|
||||
if (tele->m_ammunitionId == 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Got direct fire without valid ammunition - ignoring: " << tele->print();
|
||||
return;
|
||||
}
|
||||
OpticalShot osNew;
|
||||
osNew.id = id;
|
||||
osNew.ammunitionId = tele->m_ammunitionId;
|
||||
osNew.originatorId = tele->m_originatorId;
|
||||
osNew.deposition1 = tele->m_deposition1;
|
||||
osNew.deposition2 = tele->m_deposition2;
|
||||
osNew.timeStampMSec = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
m_lastShots += osNew;
|
||||
QTimer::singleShot(500, this, &SocketHandler::handleDirectFireSummray);
|
||||
|
||||
}
|
||||
|
||||
void SocketHandler::handleDirectFireSummray()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "handleDirectFireSummray m_lastShots.size=" << m_lastShots.size();
|
||||
OpticalShot osNew;
|
||||
if ( m_lastShots.size() == 0)
|
||||
return;
|
||||
int distance = 3000; // Unrealistisch hohe Distanz
|
||||
DEBUG_LOG(m_logger) << "distance=" << distance;
|
||||
for (const OpticalShot &os : qAsConst(m_lastShots))
|
||||
{
|
||||
int act_distance = os.deposition1 * os.deposition1 + os.deposition2 * os.deposition2;
|
||||
DEBUG_LOG(m_logger) << "act_distance=" << act_distance << " BSM-ID=" << os.id
|
||||
<< " ammunitionId=" << os.ammunitionId;
|
||||
if ( act_distance < distance)
|
||||
{
|
||||
distance = act_distance;
|
||||
DEBUG_LOG(m_logger) << "distance=" << distance << " BSM-ID=" << os.id;
|
||||
osNew = os;
|
||||
}
|
||||
}
|
||||
|
||||
emit opticalShot(QDateTime::currentMSecsSinceEpoch(),
|
||||
osNew.id,
|
||||
osNew.originatorId,
|
||||
osNew.ammunitionId,
|
||||
osNew.deposition1,
|
||||
osNew.deposition2);
|
||||
m_lastShots.clear();
|
||||
}
|
||||
|
||||
void SocketHandler::handleObserverController(int id, const Telegrams::PanObserverController *tele)
|
||||
{
|
||||
DamageState damageState = DamageState::Unknown;
|
||||
if (tele->m_codeNo == 2) // Zerstoerung
|
||||
damageState = DamageState::Destroyed;
|
||||
else if (tele->m_codeNo == 4 || tele->m_codeNo == 18 || tele->m_codeNo == 28) // Aktivierung, Reaktivierung
|
||||
damageState = DamageState::NoDamage;
|
||||
if (damageState == DamageState::Unknown)
|
||||
return;
|
||||
if (m_timerOC.isValid())
|
||||
{
|
||||
if (m_timerOC.elapsed() < 500) // < 500ms -> ignore event
|
||||
return;
|
||||
}
|
||||
m_timerOC.start();
|
||||
|
||||
emit opticalShotOC(QDateTime::currentMSecsSinceEpoch(),
|
||||
id,
|
||||
tele->m_originatorId,
|
||||
tele->m_ammunitionId,
|
||||
damageState);
|
||||
}
|
||||
|
||||
bool SocketHandler::findNextSyncStartByte(const QByteArray &buffer, int &iCurReadPos)
|
||||
{
|
||||
// Suchen nach s_stx
|
||||
while (iCurReadPos < buffer.size())
|
||||
{
|
||||
const char data = buffer.at(iCurReadPos);
|
||||
if (data == Telegrams::Telegram::s_stx)
|
||||
return true;
|
||||
++iCurReadPos;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SocketHandler::findNextSyncEndByte(const QByteArray &buffer, int &iCurReadPos)
|
||||
{
|
||||
// Suchen nach s_endMark
|
||||
while (iCurReadPos < buffer.size())
|
||||
{
|
||||
const char data = buffer.at(iCurReadPos);
|
||||
if (data == Telegrams::Telegram::s_etx)
|
||||
return true;
|
||||
++iCurReadPos;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool isSameAmmuniton(int a1, int a2)
|
||||
{
|
||||
if (a1 == a2 - 1)
|
||||
return true;
|
||||
if (a1 == a2)
|
||||
return true;
|
||||
if (a1 == a2 + 1)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool isSameOriginator(int o1, int o2)
|
||||
{
|
||||
if (o1 == o2)
|
||||
return true;
|
||||
// o1 == 0 || o2 == 0 is filtered out before
|
||||
if (o1 == 0)
|
||||
return true;
|
||||
if (o2 == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SocketHandler::isSameOpticalShot(const OpticalShot &o1, const OpticalShot &o2)
|
||||
{
|
||||
// mehr als 100ms auseinander -> nicht der gleiche Treffer
|
||||
if (o1.timeStampMSec < o2.timeStampMSec - s_opticalTimeSlot)
|
||||
return false;
|
||||
return (isSameAmmuniton(o1.ammunitionId, o2.ammunitionId) &&
|
||||
isSameOriginator(o1.originatorId, o2.originatorId));
|
||||
}
|
||||
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,101 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Handle incoming/outgoing data from/to all BSMs of one building
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-18
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QTimer>
|
||||
#include <QElapsedTimer>
|
||||
#include <logger.h>
|
||||
#include "bsm_socket.h"
|
||||
#include "bsm_telegrams_base.h"
|
||||
#include "bsm_types.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class PanDirectFire;
|
||||
class PanObserverController;
|
||||
}
|
||||
|
||||
|
||||
class SocketHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SocketHandler(QObject *parent = nullptr);
|
||||
|
||||
bool init(const BuildingBsmConfig &bsmConfig);
|
||||
bool triggerFlashlight(int bsmId, const QString &hostname, int numberOfFlashes, int pauseBetweenFlashesSec);
|
||||
bool triggerFlashlightPulse(int bsmId, const QString &hostname = QString(),
|
||||
int numberOfFlashes = 1,
|
||||
int pauseDuration = 1,
|
||||
int choppedConfiguration = 10,
|
||||
int flashDuration = 30);
|
||||
|
||||
bool triggerFlashlights(int numberOfFlashes,
|
||||
int pauseDuration,
|
||||
int choppedConfiguration,
|
||||
int flashDuration);
|
||||
|
||||
bool getBsmConfiguration(int bsmId);
|
||||
bool getBsmBitTimeout(int bsmId);
|
||||
bool getBsmTechnicalStatus(int bsmId);
|
||||
|
||||
QVector<BsmState> bsmStates() const;
|
||||
Q_SIGNALS:
|
||||
void opticalShot(qint64 timeMSec,
|
||||
int sensorId,
|
||||
int originatorId,
|
||||
int ammunitionId,
|
||||
int deposition1,
|
||||
int deposition2);
|
||||
void opticalShotOC(qint64 timeMSec,
|
||||
int sensorId,
|
||||
int originatorId,
|
||||
int ammunitionId,
|
||||
DamageState damageState);
|
||||
void bsmStateChanged(const QVector<BsmState> &bsmStates);
|
||||
private Q_SLOTS:
|
||||
void onBsmStateTimerTimeOut();
|
||||
void onDataAvailable(int id, const QByteArray &data);
|
||||
void onSocketConnected(int id);
|
||||
void onSocketDisconnected(int id);
|
||||
void onCleanupQueue();
|
||||
void handleDirectFireSummray();
|
||||
|
||||
private:
|
||||
Socket *getSocketForBsm(int bsmId);
|
||||
Socket *getSocketForBsm(const QString &hostname);
|
||||
QByteArray parseBuffer(int id, const QByteArray &buffer);
|
||||
void parseBsmTelegram(int id, const QByteArray &baTele);
|
||||
bool requestVersion(int id);
|
||||
void handleDirectFire(int id, const Telegrams::PanDirectFire *tele);
|
||||
void handleObserverController(int id, const Telegrams::PanObserverController *tele);
|
||||
|
||||
static bool findNextSyncStartByte(const QByteArray &buffer, int &iCurReadPos);
|
||||
static bool findNextSyncEndByte(const QByteArray &buffer, int &iCurReadPos);
|
||||
static QByteArray substituteData(const QByteArray &data);
|
||||
static QByteArray desubstituteData(const QByteArray &data);
|
||||
static bool isSameOpticalShot(const OpticalShot &o1, const OpticalShot &o2);
|
||||
private:
|
||||
QMap<int, Socket *> m_sockets;
|
||||
QMap<int, QByteArray> m_socketData;
|
||||
QVector<OpticalShot> m_lastShots;
|
||||
QElapsedTimer m_timerOC;
|
||||
QTimer m_cleanupQueueTimer;
|
||||
QTimer m_bsmStateTimer;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms Alive
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanAlive : public Telegram
|
||||
{
|
||||
public:
|
||||
PanAlive()
|
||||
: Telegram(PanTelegramId::ALIVE)
|
||||
{}
|
||||
|
||||
static Telegram *fromBytestream(const QByteArray &data)
|
||||
{
|
||||
Q_UNUSED(data)
|
||||
return new PanAlive;
|
||||
}
|
||||
protected:
|
||||
QByteArray payload() const override
|
||||
{
|
||||
return QByteArray();
|
||||
}
|
||||
};
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,279 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Oberklasser der BSM-Telegramme
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
#include "bsm_telegrams_alive.h"
|
||||
#include "bsm_telegrams_bit_timeout_report.h"
|
||||
#include "bsm_telegrams_direct_fire.h"
|
||||
#include "bsm_telegrams_sw_version_report.h"
|
||||
#include "bsm_telegrams_sw_version_request.h"
|
||||
#include "bsm_telegrams_configuration_report.h"
|
||||
#include "bsm_telegrams_observer_controller.h"
|
||||
#include "bsm_telegrams_technical_status.h"
|
||||
|
||||
#include <logger.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
static inline QByteArray escapeData(const QByteArray &bufferData)
|
||||
{
|
||||
QByteArray ret;
|
||||
ret.reserve(bufferData.size() * 1.2);
|
||||
for (const unsigned char c : bufferData)
|
||||
{
|
||||
if (c >= 0x20 && c < 0x7f)
|
||||
ret += c;
|
||||
else
|
||||
ret += "\\x" + QByteArray::number(static_cast<unsigned char>(c), 16);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray toString(PanTelegramId teleId)
|
||||
{
|
||||
switch (teleId)
|
||||
{
|
||||
case PanTelegramId::ALIVE:
|
||||
return "ALIVE";
|
||||
case PanTelegramId::REQ_BIT_TIMEOUT:
|
||||
return "REQ_BIT_TIMEOUT";
|
||||
case PanTelegramId::BIT_TIMEOUT_REPORT:
|
||||
return "BIT_TIMEOUT_REPORT";
|
||||
case PanTelegramId::REQ_SW_VERSION:
|
||||
return "REQ_SW_VERSION";
|
||||
case PanTelegramId::SW_VERSION_REPORT:
|
||||
return "SW_VERSION_REPORT";
|
||||
case PanTelegramId::CONFIGURATION_SETUP:
|
||||
return "CONFIGURATION_SETUP";
|
||||
case PanTelegramId::REQ_CONFIGURATION:
|
||||
return "REQ_CONFIGURATION";
|
||||
case PanTelegramId::CONFIGURATION_REPORT:
|
||||
return "CONFIGURATION_REPORT";
|
||||
case PanTelegramId::ER_DIRECT_FIRE:
|
||||
return "ER_DIRECT_FIRE";
|
||||
case PanTelegramId::ER_OBSERVER_CONTR:
|
||||
return "ER_OBSERVER_CONTR";
|
||||
case PanTelegramId::REQ_TECHNICAL_STATUS:
|
||||
return "REQ_TECHNICAL_STATUS";
|
||||
case PanTelegramId::TECHNICAL_STATUS:
|
||||
return "TECHNICAL_STATUS";
|
||||
case PanTelegramId::SIGNAL_FLASHLIGHT:
|
||||
return "SIGNAL_FLASHLIGHT";
|
||||
case PanTelegramId::CHOPPED_SIGNAL_FLASH:
|
||||
return "CHOPPED_SIGNAL_FLASH";
|
||||
}
|
||||
return QByteArray("Unknown: ") + QByteArray::number(static_cast<int>(teleId));
|
||||
}
|
||||
|
||||
QByteArray Telegram::toBytestream() const
|
||||
{
|
||||
const int teleId = static_cast<int>(telId());
|
||||
const int payloadLen = payload().size();
|
||||
|
||||
QByteArray ret;
|
||||
ret.reserve(5 + payloadLen);
|
||||
|
||||
// N. Thoden, 02.11.2021
|
||||
// without resize following message appears:
|
||||
// "Using QByteRef with an index pointing outside the valid range of a QByteArray. The corresponding behavior is deprecated, and will be changed in a future version of Qt."
|
||||
// Qt doc at operator[]: "If an assignment is made beyond the end of the byte array, the array is extended with resize() before the assignment takes place."
|
||||
// so resize explicit:
|
||||
ret.resize(2);
|
||||
ret[0] = teleId & 0xFF; //Message.ID (LSB)
|
||||
ret[1] = ((teleId & 0x100) >> 1) | (((payloadLen + 3) & 0x1F) << 2); //Bit 1 MsgID-MSB; Bit 2-6 Length (Payload == Datafields+Checksum)
|
||||
// END
|
||||
|
||||
ret += payload();
|
||||
ret += calcChecksum(ret);
|
||||
|
||||
ret = substituteData(ret);
|
||||
ret.prepend(s_stx);
|
||||
ret.append(s_etx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Telegram *Telegram::telegramFromBytestream(const QByteArray &data_)
|
||||
{
|
||||
NGL::INGLLogger &logger = BuildingControlUnit::getLogger("BSM.Telegrams");
|
||||
QByteArray data = desubstituteData(data_);
|
||||
if (data.size() < 2)
|
||||
return nullptr;
|
||||
TRACE_LOG(logger) << "Incoming data: 0x" << data.toHex();
|
||||
|
||||
const unsigned char cs = data.at(data.size() - 1);
|
||||
// jetzt checksum wegnehmen
|
||||
data.chop(1);
|
||||
// und checksumme über Rest berechnen
|
||||
const unsigned char csCalc = calcChecksum(data);
|
||||
if (cs != csCalc)
|
||||
{
|
||||
WARNING_LOG(logger) << "Checksum does not match. Is: 0x" << QByteArray::number(cs, 16)
|
||||
<< ", should be: 0x" << QByteArray::number(csCalc, 16);
|
||||
}
|
||||
|
||||
int msg_id; // die ersten 9 Bits
|
||||
int msg_id_lsb = static_cast<int>(data.at(0)) & 0xFF;
|
||||
int msg_id_msb = static_cast<int>(data.at(1)) & 0x80;
|
||||
msg_id_msb <<= 1;
|
||||
msg_id = msg_id_lsb + msg_id_msb;
|
||||
const PanTelegramId teleId = static_cast<PanTelegramId>(msg_id);
|
||||
const QByteArray payload = data.mid(2);
|
||||
TRACE_LOG(logger) << "incoming data: " << data.toHex() << ", - payload: " << payload.toHex();
|
||||
|
||||
Telegram *tele = nullptr;
|
||||
switch (teleId)
|
||||
{
|
||||
case PanTelegramId::ALIVE:
|
||||
tele = PanAlive::fromBytestream(payload);
|
||||
break;
|
||||
case PanTelegramId::REQ_BIT_TIMEOUT:
|
||||
break;
|
||||
case PanTelegramId::BIT_TIMEOUT_REPORT:
|
||||
tele = PanBitTimeoutReport::fromBytestream(payload);
|
||||
break;
|
||||
case PanTelegramId::SW_VERSION_REPORT:
|
||||
tele = PanSwVersionReport::fromBytestream(payload);
|
||||
break;
|
||||
case PanTelegramId::REQ_SW_VERSION:
|
||||
break;
|
||||
case PanTelegramId::CONFIGURATION_SETUP:
|
||||
break;
|
||||
case PanTelegramId::REQ_CONFIGURATION:
|
||||
break;
|
||||
case PanTelegramId::CONFIGURATION_REPORT:
|
||||
tele = PanConfigurationReport::fromBytestream(payload);
|
||||
break;
|
||||
case PanTelegramId::ER_DIRECT_FIRE:
|
||||
tele = PanDirectFire::fromBytestream(payload);
|
||||
break;
|
||||
case PanTelegramId::ER_OBSERVER_CONTR:
|
||||
tele = PanObserverController::fromBytestream(payload);
|
||||
break;
|
||||
case PanTelegramId::REQ_TECHNICAL_STATUS:
|
||||
break;
|
||||
case PanTelegramId::TECHNICAL_STATUS:
|
||||
tele = PanTechnicalStatus::fromBytestream(payload);
|
||||
break;
|
||||
case PanTelegramId::SIGNAL_FLASHLIGHT:
|
||||
break;
|
||||
case PanTelegramId::CHOPPED_SIGNAL_FLASH:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!tele)
|
||||
{
|
||||
WARNING_LOG(logger) << "Error parsing bsm tele with id " << toString(teleId)
|
||||
<< ", data: " << escapeData(data);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// if (tele->telId() != PanTelegramId::ALIVE)
|
||||
// DEBUG_LOG(logger) << "tele: " << tele->print();
|
||||
// }
|
||||
return tele;
|
||||
}
|
||||
|
||||
unsigned short Telegram::decode_ushort_little(const QByteArray &data, const int start, bool &bOk)
|
||||
{
|
||||
bOk = false;
|
||||
// Always 2 Bytes
|
||||
unsigned short byte1 = 0;
|
||||
unsigned short byte2 = 0;
|
||||
if (start + 2 <= data.size())
|
||||
{
|
||||
byte1 = ((data[start + 1]) & 0xFF) << 8;
|
||||
byte2 = (data[start]) & 0xFF;
|
||||
bOk = true;
|
||||
}
|
||||
|
||||
return (byte1 + byte2);
|
||||
}
|
||||
|
||||
unsigned char Telegram::calcChecksum(const QByteArray &data)
|
||||
{
|
||||
unsigned char cs = 0;
|
||||
for (const unsigned char c : data)
|
||||
cs += c;
|
||||
return cs ^ 0xff;
|
||||
}
|
||||
|
||||
|
||||
QByteArray Telegram::substituteData(const QByteArray &data)
|
||||
{
|
||||
QByteArray ret;
|
||||
ret.reserve(data.size());
|
||||
|
||||
for (const unsigned char c : data)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case s_stx:
|
||||
ret += s_subMark;
|
||||
ret += s_subStx;
|
||||
break;
|
||||
case s_etx:
|
||||
ret += s_subMark;
|
||||
ret += s_subEtx;
|
||||
break;
|
||||
case s_subMark:
|
||||
ret += s_subMark;
|
||||
ret += static_cast<char>(s_subSub);
|
||||
break;
|
||||
default:
|
||||
ret += c;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray Telegram::desubstituteData(const QByteArray &data)
|
||||
{
|
||||
QByteArray ret;
|
||||
ret.reserve(data.size());
|
||||
for (int i = 0; i < data.size(); ++i)
|
||||
{
|
||||
const unsigned char c = data.at(i);
|
||||
if (c == s_subMark)
|
||||
{
|
||||
++i;
|
||||
if (i < data.size())
|
||||
{
|
||||
const unsigned char s = data.at(i);
|
||||
switch (s)
|
||||
{
|
||||
case s_subStx:
|
||||
ret += s_stx;
|
||||
break;
|
||||
case s_subEtx:
|
||||
ret += s_etx;
|
||||
break;
|
||||
case s_subSub:
|
||||
ret += s_subMark;
|
||||
break;
|
||||
default:
|
||||
ret += s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ret += c;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} //namespace BuildingControlUnit
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Oberklasser der BSM-Telegramme
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QByteArray>
|
||||
#include "buildingcontrolbsm_export.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
enum class PanTelegramId
|
||||
{
|
||||
ALIVE = 0x08,
|
||||
REQ_BIT_TIMEOUT = 0x09,
|
||||
BIT_TIMEOUT_REPORT = 0x0a,
|
||||
REQ_SW_VERSION = 0x0e,
|
||||
SW_VERSION_REPORT = 0x0f,
|
||||
CONFIGURATION_SETUP = 0x20,
|
||||
REQ_CONFIGURATION = 0x21,
|
||||
CONFIGURATION_REPORT = 0x22,
|
||||
ER_DIRECT_FIRE = 0x23,
|
||||
ER_OBSERVER_CONTR = 0x24,
|
||||
REQ_TECHNICAL_STATUS = 0x27,
|
||||
TECHNICAL_STATUS = 0x28,
|
||||
SIGNAL_FLASHLIGHT = 0x30, // not described in icd
|
||||
CHOPPED_SIGNAL_FLASH = 0x39,
|
||||
};
|
||||
QByteArray toString(PanTelegramId teleId);
|
||||
|
||||
class BUILDINGCONTROLBSM_EXPORT Telegram
|
||||
{
|
||||
protected:
|
||||
explicit Telegram(PanTelegramId telId)
|
||||
: m_telId(telId)
|
||||
{}
|
||||
public:
|
||||
virtual ~Telegram() = default;
|
||||
|
||||
virtual QByteArray print() const
|
||||
{
|
||||
return toString(m_telId);
|
||||
}
|
||||
QByteArray toBytestream() const;
|
||||
|
||||
PanTelegramId telId() const
|
||||
{
|
||||
return m_telId;
|
||||
}
|
||||
|
||||
static Telegram *telegramFromBytestream(const QByteArray &data_);
|
||||
static const unsigned char s_stx = 0x02;
|
||||
static const unsigned char s_etx = 0x03;
|
||||
static const unsigned char s_subMark = 0x80;
|
||||
static const unsigned char s_subStx = 0x82;
|
||||
static const unsigned char s_subEtx = 0x83;
|
||||
static const unsigned char s_subSub = 0x00;
|
||||
protected:
|
||||
virtual QByteArray payload() const = 0;
|
||||
static unsigned short decode_ushort_little(const QByteArray &data, const int start, bool &bOk);
|
||||
private:
|
||||
static unsigned char calcChecksum(const QByteArray &data);
|
||||
static QByteArray substituteData(const QByteArray &data);
|
||||
static QByteArray desubstituteData(const QByteArray &data);
|
||||
PanTelegramId m_telId;
|
||||
};
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms BitTimeoutReport
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
|
||||
#include "bsm_telegrams_bit_timeout_report.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
QByteArray PanBitTimeoutReport::print() const
|
||||
{
|
||||
QByteArray ret = Telegram::print() ;
|
||||
ret += "\n BitTimeout = " + QByteArray::number(m_bitTimeout);
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PanBitTimeoutReport::payload() const
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
Telegram *PanBitTimeoutReport::fromBytestream(const QByteArray &data)
|
||||
{
|
||||
if (data.length() < 2)
|
||||
return nullptr;
|
||||
|
||||
bool bOk = true;
|
||||
PanBitTimeoutReport rep;
|
||||
rep.m_bitTimeout = decode_ushort_little(data, 0, bOk);
|
||||
return bOk ? new PanBitTimeoutReport(rep) : nullptr;
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms BitTimeoutReport
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanBitTimeoutReport : public Telegram
|
||||
{
|
||||
public:
|
||||
PanBitTimeoutReport()
|
||||
: Telegram(PanTelegramId::BIT_TIMEOUT_REPORT)
|
||||
{}
|
||||
|
||||
QByteArray print() const override;
|
||||
static Telegram *fromBytestream(const QByteArray &data);
|
||||
|
||||
unsigned short m_bitTimeout = 0;
|
||||
protected:
|
||||
QByteArray payload() const override;
|
||||
};
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanSwVersionRequest
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanBitTimeoutRequest : public Telegram
|
||||
{
|
||||
public:
|
||||
PanBitTimeoutRequest()
|
||||
: Telegram(PanTelegramId::REQ_BIT_TIMEOUT)
|
||||
{}
|
||||
|
||||
static Telegram *fromBytestream(const QByteArray &data)
|
||||
{
|
||||
Q_UNUSED(data);
|
||||
Q_ASSERT(false);
|
||||
return new PanBitTimeoutRequest;
|
||||
}
|
||||
protected:
|
||||
QByteArray payload() const override
|
||||
{
|
||||
return QByteArray();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanChoppedSignalFlashlight
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "bsm_telegrams_chopped_signal_flash.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
QByteArray PanChoppedSignalFlashlight::print() const
|
||||
{
|
||||
QByteArray ret = Telegram::print() ;
|
||||
ret += "\n Number of Flashes = " + QByteArray::number(m_noOfFlashes);
|
||||
ret += "\n Pause duration = " + QByteArray::number(m_pauseDuration);
|
||||
ret += "\n Choped Flash configuration = " + QByteArray::number(m_choppedFlashConfig);
|
||||
ret += "\n Number of Flash Pulses = " + QByteArray::number(m_noOfFlashPulses);
|
||||
ret += "\n Flash duration = " + QByteArray::number(m_flashDuration);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PanChoppedSignalFlashlight::payload() const
|
||||
{
|
||||
QByteArray result;
|
||||
result.resize(5);
|
||||
result[0] = m_noOfFlashes;
|
||||
result[1] = m_pauseDuration;
|
||||
result[2] = m_choppedFlashConfig;
|
||||
result[3] = m_noOfFlashPulses;
|
||||
result[4] = m_flashDuration;
|
||||
return result;
|
||||
}
|
||||
|
||||
Telegram *PanChoppedSignalFlashlight::fromBytestream(const QByteArray &data)
|
||||
{
|
||||
Q_UNUSED(data);
|
||||
Q_ASSERT(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanChoppedSignalFlashlight
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanChoppedSignalFlashlight : public Telegram
|
||||
{
|
||||
public:
|
||||
PanChoppedSignalFlashlight()
|
||||
: Telegram(PanTelegramId::CHOPPED_SIGNAL_FLASH)
|
||||
{}
|
||||
|
||||
QByteArray print() const override;
|
||||
static Telegram *fromBytestream(const QByteArray &data);
|
||||
|
||||
char m_noOfFlashes = 0;
|
||||
char m_pauseDuration = 0;
|
||||
char m_choppedFlashConfig = 0;
|
||||
char m_noOfFlashPulses = 0;
|
||||
char m_flashDuration = 0;
|
||||
protected:
|
||||
QByteArray payload() const override;
|
||||
};
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanConfigurationReport
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "bsm_telegrams_configuration_report.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
QByteArray PanConfigurationReport::print() const
|
||||
{
|
||||
QByteArray ret = Telegram::print() ;
|
||||
ret += "\n Reserved1 = " + QByteArray::number(m_reserved1);
|
||||
ret += "\n ModesOfOperations = " + QByteArray::number(m_modesOfOperations);
|
||||
ret += "\n AlivePresence = " + QByteArray::number(m_aliveMessage);
|
||||
ret += "\n Reserved2 = " + QByteArray::number(m_reserved2);
|
||||
ret += "\n Position = " + QByteArray::number(m_position);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PanConfigurationReport::payload() const
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
Telegram *PanConfigurationReport::fromBytestream(const QByteArray &data)
|
||||
{
|
||||
if (data.length() < 5)
|
||||
return nullptr;
|
||||
|
||||
PanConfigurationReport rep;
|
||||
rep.m_reserved1 = static_cast<unsigned short>(data[0]);
|
||||
rep.m_modesOfOperations = static_cast<unsigned short>(data[1]);
|
||||
rep.m_aliveMessage = static_cast<unsigned short>(data[2]);
|
||||
rep.m_reserved2 = static_cast<unsigned short>(data[3]);
|
||||
rep.m_position = static_cast<unsigned short>(data[4]);
|
||||
// the last 2 bytes are rde specific and not decoded here
|
||||
|
||||
return new PanConfigurationReport(rep);
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanConfigurationReport
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanConfigurationReport : public Telegram
|
||||
{
|
||||
public:
|
||||
PanConfigurationReport()
|
||||
: Telegram(PanTelegramId::CONFIGURATION_REPORT)
|
||||
{}
|
||||
|
||||
QByteArray print() const override;
|
||||
static Telegram *fromBytestream(const QByteArray &data);
|
||||
|
||||
unsigned short m_reserved1 = 0;
|
||||
unsigned short m_modesOfOperations = 0;
|
||||
unsigned short m_aliveMessage = 0;
|
||||
unsigned short m_reserved2 = 0;
|
||||
unsigned short m_position = 0;
|
||||
protected:
|
||||
QByteArray payload() const override;
|
||||
};
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanSwVersionRequest
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanConfigurationRequest : public Telegram
|
||||
{
|
||||
public:
|
||||
PanConfigurationRequest()
|
||||
: Telegram(PanTelegramId::REQ_CONFIGURATION)
|
||||
{}
|
||||
|
||||
static Telegram *fromBytestream(const QByteArray &data)
|
||||
{
|
||||
Q_UNUSED(data);
|
||||
Q_ASSERT(false);
|
||||
return new PanConfigurationRequest;
|
||||
}
|
||||
protected:
|
||||
QByteArray payload() const override
|
||||
{
|
||||
return QByteArray();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanConfigurationSetup
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "bsm_telegrams_configuration_setup.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
QByteArray PanConfigurationSetup::print() const
|
||||
{
|
||||
QByteArray ret = Telegram::print() ;
|
||||
ret += "\n Modes of Operations = " + QByteArray::number(m_modesOfOperations);
|
||||
ret += "\n Alive message [s] = " + QByteArray::number(m_aliveMessage);
|
||||
ret += "\n IpsInterval [s] = " + QByteArray::number(m_ipsInterval);
|
||||
ret += "\n reserved = " + QByteArray::number(m_reserved);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PanConfigurationSetup::payload() const
|
||||
{
|
||||
QByteArray result;
|
||||
result.resize(4);
|
||||
result[0] = m_modesOfOperations;
|
||||
result[1] = m_ipsInterval;
|
||||
result[2] = static_cast<unsigned char>(m_aliveMessage / 10); // 10s
|
||||
result[3] = m_reserved;
|
||||
return result;
|
||||
}
|
||||
|
||||
Telegram *PanConfigurationSetup::fromBytestream(const QByteArray &data)
|
||||
{
|
||||
Q_UNUSED(data);
|
||||
Q_ASSERT(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanConfigurationSetup
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanConfigurationSetup : public Telegram
|
||||
{
|
||||
public:
|
||||
PanConfigurationSetup()
|
||||
: Telegram(PanTelegramId::CONFIGURATION_SETUP)
|
||||
{}
|
||||
|
||||
QByteArray print() const override;
|
||||
static Telegram *fromBytestream(const QByteArray &data);
|
||||
|
||||
int m_aliveMessage = 0; // in seconds
|
||||
|
||||
char m_ipsInterval = 0;
|
||||
// enable OSAG 2.0
|
||||
char m_modesOfOperations = 0b00000001;
|
||||
char m_reserved = 0;
|
||||
protected:
|
||||
QByteArray payload() const override;
|
||||
};
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanErDirectFire
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "bsm_telegrams_direct_fire.h"
|
||||
#include "logger.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
QByteArray PanDirectFire::print() const
|
||||
{
|
||||
QByteArray ret = Telegram::print() ;
|
||||
ret += "\n TimeofEvent = " + QByteArray::number(m_timeofEvent);
|
||||
ret += "\n AmmunitionId = " + QByteArray::number(m_ammunitionId);
|
||||
ret += "\n Deposition1 = " + QByteArray::number(m_deposition1);
|
||||
ret += "\n Deposition2 = " + QByteArray::number(m_deposition2);
|
||||
ret += "\n NumberOpticalPulses = " + QByteArray::number(m_numberOpticalPulses);
|
||||
ret += "\n IDNumberOriginator = " + QByteArray::number(m_originatorId);
|
||||
ret += "\n DetectorNo = " + QByteArray::number(m_detectorNo);
|
||||
ret += "\n AmmunitionChildCode = " + QByteArray::number(m_ammunitionChildCode);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PanDirectFire::payload() const
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
Telegram *PanDirectFire::fromBytestream(const QByteArray &data)
|
||||
{
|
||||
NGL::INGLLogger &logger = getLogger("PanDirectFire");
|
||||
DEBUG_LOG(logger) << "data.length=" << data.length();
|
||||
if (data.length() < 9)
|
||||
return nullptr;
|
||||
|
||||
bool bOk = true;
|
||||
PanDirectFire rep;
|
||||
rep.m_timeofEvent = decode_ushort_little(data, 0, bOk);
|
||||
rep.m_ammunitionId = decode_ushort_little(data, 2, bOk);
|
||||
if (data.length() == 9)
|
||||
{
|
||||
rep.m_deposition1 = static_cast<short>(data[3]);
|
||||
rep.m_deposition2 = static_cast<short>(data[4]);
|
||||
rep.m_numberOpticalPulses = static_cast<unsigned short>(data[5]);
|
||||
rep.m_originatorId = decode_ushort_little(data, 6, bOk);
|
||||
rep.m_detectorNo = static_cast<unsigned short>(data[8] & 0xFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
rep.m_deposition1 = static_cast<short>(data[4]);
|
||||
rep.m_deposition2 = static_cast<short>(data[5]);
|
||||
rep.m_numberOpticalPulses = static_cast<unsigned short>(data[6]);
|
||||
rep.m_originatorId = decode_ushort_little(data, 7, bOk);
|
||||
rep.m_detectorNo = static_cast<unsigned short>(data[9] & 0xFF);
|
||||
}
|
||||
// optional
|
||||
if (data.length() >= 12)
|
||||
rep.m_ammunitionChildCode = decode_ushort_little(data, 10, bOk);
|
||||
|
||||
return bOk ? new PanDirectFire(rep) : nullptr;
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanErDirectFire
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
#include <QObject>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanDirectFire : public Telegram
|
||||
{
|
||||
public:
|
||||
PanDirectFire()
|
||||
: Telegram(PanTelegramId::ER_DIRECT_FIRE)
|
||||
{}
|
||||
|
||||
QByteArray print() const override;
|
||||
static Telegram *fromBytestream(const QByteArray &data);
|
||||
|
||||
short m_timeofEvent = 0;
|
||||
unsigned short m_ammunitionId = 0;
|
||||
short m_deposition1 = 0;
|
||||
short m_deposition2 = 0;
|
||||
unsigned short m_numberOpticalPulses = 0;
|
||||
unsigned short m_originatorId = 0;
|
||||
unsigned short m_detectorNo = 0;
|
||||
unsigned short m_ammunitionChildCode = 0;
|
||||
protected:
|
||||
QByteArray payload() const override;
|
||||
};
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanObserverController
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "bsm_telegrams_observer_controller.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
QByteArray PanObserverController::print() const
|
||||
{
|
||||
QByteArray ret = Telegram::print() ;
|
||||
|
||||
ret += "\n TimeofEvent = " + QByteArray::number(m_timeofEvent);
|
||||
ret += "\n AmmunitionId = " + QByteArray::number(m_ammunitionId);
|
||||
switch (m_ammunitionId)
|
||||
{
|
||||
case 208:
|
||||
ret += " (Observer/Controller)";
|
||||
break;
|
||||
case 209:
|
||||
ret += " (Medical Gun)";
|
||||
break;
|
||||
case 210:
|
||||
ret += " (Logistic Gun)";
|
||||
break;
|
||||
case 211:
|
||||
ret += " (Configuration Tool)";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret += "\n Code Number = " + QByteArray::number(m_codeNo);
|
||||
ret += "\n Detector Number = " + QByteArray::number(m_detectorNo);
|
||||
switch (m_codeNo)
|
||||
{
|
||||
case 1:
|
||||
ret += " (Test)";
|
||||
break;
|
||||
case 2:
|
||||
ret += " (Zerstoerung, Ausfall)";
|
||||
break;
|
||||
case 4:
|
||||
ret += " (Aktivierung)";
|
||||
break;
|
||||
case 18:
|
||||
ret += " (Reaktivierung)";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret += "\n ID Originator = " + QByteArray::number(m_originatorId);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PanObserverController::payload() const
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
Telegram *PanObserverController::fromBytestream(const QByteArray &data)
|
||||
{
|
||||
if (data.length() < 6)
|
||||
return nullptr;
|
||||
|
||||
bool bOk = true;
|
||||
PanObserverController rep;
|
||||
rep.m_timeofEvent = decode_ushort_little(data, 0, bOk);
|
||||
rep.m_ammunitionId = static_cast<unsigned short>(data[2] & 0xFF);
|
||||
rep.m_codeNo = static_cast<unsigned short>(data[3] & 0xFF);
|
||||
rep.m_detectorNo = static_cast<unsigned short>(data[4] & 0xFF);
|
||||
rep.m_originatorId = decode_ushort_little(data, 5, bOk);
|
||||
|
||||
return bOk ? new PanObserverController(rep) : nullptr;
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanObserverController
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanObserverController : public Telegram
|
||||
{
|
||||
public:
|
||||
PanObserverController()
|
||||
: Telegram(PanTelegramId::ER_OBSERVER_CONTR)
|
||||
{}
|
||||
|
||||
QByteArray print() const override;
|
||||
static Telegram *fromBytestream(const QByteArray &data);
|
||||
|
||||
unsigned short m_timeofEvent = 0;
|
||||
unsigned short m_ammunitionId = 0;
|
||||
unsigned short m_codeNo = 0;
|
||||
unsigned short m_detectorNo = 0;
|
||||
unsigned short m_originatorId = 0;
|
||||
protected:
|
||||
QByteArray payload() const override;
|
||||
};
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms SwVersionReport
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "bsm_telegrams_sw_version_report.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
QByteArray PanSwVersionReport::print() const
|
||||
{
|
||||
QByteArray ret = Telegram::print() ;
|
||||
ret += "\n mainVersion = " + QByteArray::number(m_mainVersion);
|
||||
ret += "\n subVersion = " + QByteArray::number(m_subVersion);
|
||||
ret += "\n revision = " + QByteArray::number(m_revision);
|
||||
ret += "\n manufacturer = " + m_manufacturer;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PanSwVersionReport::payload() const
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
Telegram *PanSwVersionReport::fromBytestream(const QByteArray &data)
|
||||
{
|
||||
if (data.length() < 4)
|
||||
return nullptr;
|
||||
|
||||
PanSwVersionReport rep;
|
||||
unsigned short version = (unsigned short)data.at(0);
|
||||
version <<= 8;
|
||||
version |= (unsigned short)(data.at(1));
|
||||
|
||||
// highest 4 bits
|
||||
rep.m_mainVersion = (version & 0xF000) >> 12;
|
||||
// next 7 bits
|
||||
rep.m_subVersion = (version & 0x0FE0) >> 5;
|
||||
// last 5 bits
|
||||
rep.m_revision = (version & 0x001F); // not used as letter
|
||||
|
||||
rep.m_manufacturer = data.mid(2, 8);
|
||||
|
||||
return new PanSwVersionReport(rep);
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms SwVersionReport
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanSwVersionReport : public Telegram
|
||||
{
|
||||
public:
|
||||
PanSwVersionReport()
|
||||
: Telegram(PanTelegramId::SW_VERSION_REPORT)
|
||||
{}
|
||||
|
||||
QByteArray print() const override;
|
||||
static Telegram *fromBytestream(const QByteArray &data);
|
||||
|
||||
QByteArray m_manufacturer;
|
||||
int m_mainVersion = 0;
|
||||
int m_subVersion = 0;
|
||||
int m_revision = 0;
|
||||
protected:
|
||||
QByteArray payload() const override;
|
||||
};
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanSwVersionRequest
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanSwVersionRequest : public Telegram
|
||||
{
|
||||
public:
|
||||
PanSwVersionRequest()
|
||||
: Telegram(PanTelegramId::REQ_SW_VERSION)
|
||||
{}
|
||||
|
||||
static Telegram *fromBytestream(const QByteArray &data)
|
||||
{
|
||||
Q_UNUSED(data);
|
||||
Q_ASSERT(false);
|
||||
return new PanSwVersionRequest;
|
||||
}
|
||||
protected:
|
||||
QByteArray payload() const override
|
||||
{
|
||||
return QByteArray();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanTechnicalStatus
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include "bsm_telegrams_technical_status.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
|
||||
QByteArray PanTechnicalStatus::print() const
|
||||
{
|
||||
QByteArray ret = Telegram::print() ;
|
||||
|
||||
unsigned short first = m_failures;
|
||||
unsigned short failRFComm = (first & 0x80) >> 7;
|
||||
unsigned short failRAM = (first & 0x40) >> 6;
|
||||
unsigned short failFlashRom = (first & 0x20) >> 5;
|
||||
unsigned short batteryLow = (first & 0x10) >> 4;
|
||||
unsigned short batteryEol = (first & 0x8) >> 3;
|
||||
unsigned short optical = (first & 0x4) >> 2;
|
||||
unsigned short flashlight = (first & 0x2) >> 1;
|
||||
|
||||
|
||||
ret += "\n TimeofEvent = " + QByteArray::number(m_timeofEvent);
|
||||
ret += "\n Failures = " + QByteArray::number(m_failures);
|
||||
ret += "\n FailRFComm = " + QByteArray::number(failRFComm);
|
||||
ret += "\n FailRAM = " + QByteArray::number(failRAM);
|
||||
ret += "\n FailROM = " + QByteArray::number(failFlashRom);
|
||||
ret += "\n MCBattery = " + QByteArray::number(batteryLow);
|
||||
ret += "\n OSBattery = " + QByteArray::number(batteryEol);
|
||||
ret += "\n Optical = " + QByteArray::number(optical);
|
||||
ret += "\n Flashlight = " + QByteArray::number(flashlight);
|
||||
ret += "\n RFCommCRCErrorCount = " + QByteArray::number(m_rfCommCRCErrorCount);
|
||||
ret += "\n LostBeaconsCount = " + QByteArray::number(m_lostBeaconsCount);
|
||||
ret += "\n DetectorNo = " + QByteArray::number(m_detectorNo);
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PanTechnicalStatus::payload() const
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
Telegram *PanTechnicalStatus::fromBytestream(const QByteArray &data)
|
||||
{
|
||||
if (data.length() < 6)
|
||||
return nullptr;
|
||||
|
||||
bool bOk = true;
|
||||
PanTechnicalStatus rep;
|
||||
rep.m_timeofEvent = decode_ushort_little(data, 0, bOk);
|
||||
rep.m_failures = static_cast<unsigned short>(data[2] & 0xFF);
|
||||
rep.m_rfCommCRCErrorCount = static_cast<unsigned short>(data[3] & 0xFF);
|
||||
rep.m_lostBeaconsCount = static_cast<unsigned short>(data[4] & 0xFF);
|
||||
rep.m_detectorNo = static_cast<unsigned short>(data[5] & 0xFF);
|
||||
|
||||
return bOk ? new PanTechnicalStatus(rep) : nullptr;
|
||||
}
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanTechnicalStatus
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanTechnicalStatus : public Telegram
|
||||
{
|
||||
public:
|
||||
PanTechnicalStatus()
|
||||
: Telegram(PanTelegramId::TECHNICAL_STATUS)
|
||||
{}
|
||||
|
||||
QByteArray print() const override;
|
||||
static Telegram *fromBytestream(const QByteArray &data);
|
||||
|
||||
unsigned short m_timeofEvent = 0;
|
||||
unsigned short m_failures = 0;
|
||||
unsigned short m_rfCommCRCErrorCount = 0;
|
||||
unsigned short m_lostBeaconsCount = 0;
|
||||
unsigned short m_detectorNo = 0;
|
||||
|
||||
protected:
|
||||
QByteArray payload() const override;
|
||||
};
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Definition des PAN-Telegramms PanSwVersionRequest
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bsm_telegrams_base.h"
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BUILDINGCONTROLBSM_EXPORT PanTechnicalStatusRequest : public Telegram
|
||||
{
|
||||
public:
|
||||
PanTechnicalStatusRequest()
|
||||
: Telegram(PanTelegramId::REQ_TECHNICAL_STATUS)
|
||||
{}
|
||||
|
||||
static Telegram *fromBytestream(const QByteArray &data)
|
||||
{
|
||||
Q_UNUSED(data);
|
||||
Q_ASSERT(false);
|
||||
return new PanTechnicalStatusRequest;
|
||||
}
|
||||
protected:
|
||||
QByteArray payload() const override
|
||||
{
|
||||
return QByteArray();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Telegrams
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Kleines Testprogramm für BSMs
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <QVector>
|
||||
#include "bsm_api.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
NGLCoreApplication app(argc, argv);
|
||||
app.createLogger("BCU", -1);
|
||||
|
||||
BuildingControlUnit::BuildingBsmConfig config;
|
||||
BuildingControlUnit::Bsm c;
|
||||
c.id = 42;
|
||||
//c.hostname = QStringLiteral("192.168.133.177");
|
||||
c.hostname = QStringLiteral("localhost");
|
||||
c.port = 10001;
|
||||
config.bsmMap.insert(c.id, c);
|
||||
BuildingControlUnit::BSM::Api *a = new BuildingControlUnit::BSM::Api;
|
||||
|
||||
int ret = -1;
|
||||
if (a->init(config))
|
||||
ret = app.exec();
|
||||
delete a;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Api for BSM access
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-26
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <bcu_types.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace BSM
|
||||
{
|
||||
enum FlashState
|
||||
{
|
||||
Off,
|
||||
On
|
||||
};
|
||||
|
||||
struct OpticalShot
|
||||
{
|
||||
int id = 0;
|
||||
int ammunitionId = 0;
|
||||
int originatorId = 0;
|
||||
int deposition1 = 0;
|
||||
int deposition2 = 0;
|
||||
int64_t timeStampMSec = 0;
|
||||
};
|
||||
|
||||
struct BsmState : public BuildingControlUnit::Bsm
|
||||
{
|
||||
QString versionInfo;
|
||||
bool bConnected = false;
|
||||
|
||||
explicit BsmState(const BuildingControlUnit::Bsm &c = BuildingControlUnit::Bsm())
|
||||
: BuildingControlUnit::Bsm(c)
|
||||
{}
|
||||
};
|
||||
} // namespace BSM
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author:
|
||||
#
|
||||
|
||||
ADD_SUBDIRECTORY(BSM)
|
||||
ADD_SUBDIRECTORY(Json)
|
||||
ADD_SUBDIRECTORY(VWM)
|
||||
ADD_SUBDIRECTORY(ControlEffects)
|
||||
|
||||
SET(bcc_SRCS
|
||||
bcu_types.h
|
||||
bcu_xml_reader.cpp
|
||||
bcu_xml_reader.h
|
||||
logger.cpp
|
||||
logger.h
|
||||
settings.cpp
|
||||
settings.h
|
||||
web_socket_telegrams.cpp
|
||||
web_socket_telegrams.h
|
||||
)
|
||||
|
||||
SET(bc_SRCS
|
||||
main.cpp
|
||||
main_handler.cpp
|
||||
main_handler.h
|
||||
handle_http_request.cpp
|
||||
handle_http_request.h
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV BuildingControlCommon SHARED ${bcc_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlCommon
|
||||
PRIVATE
|
||||
Qt5::Xml
|
||||
nglsettings
|
||||
ngltools
|
||||
PUBLIC
|
||||
NGLLogger
|
||||
Qt5::Core
|
||||
LtsUtilsCoreHeaderOnly
|
||||
)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(BuildingControlCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
NGL_ADD_EXECUTABLE(AAR SV BuildingControlUnit ${bc_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlUnit
|
||||
Qt5::Core
|
||||
Qt5::WebSockets
|
||||
# Qt5::Test
|
||||
Qt5::Xml
|
||||
Qt5::Network
|
||||
Qt5::Concurrent
|
||||
BuildingControlBsm
|
||||
BuildingControlCommon
|
||||
BuildingControlJson
|
||||
BuildingControlVwm
|
||||
ControlEffects
|
||||
LtsCommandLineParser
|
||||
nglcoreapplication
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(BuildingControlUnit)
|
||||
|
||||
NGL_INSTALL(AAR SV FILES log4cxx_bcu.props DESTINATION bin)
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
SET(co_SRCS
|
||||
xmlreader.cpp
|
||||
xmlreader.h
|
||||
handeleffects.cpp
|
||||
handeleffects.h
|
||||
handeleffect.cpp
|
||||
handeleffect.h
|
||||
)
|
||||
|
||||
SET(cot_SRCS
|
||||
xmlreader.cpp
|
||||
xmlreader.h
|
||||
effect_test_main.cpp
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV ControlEffects SHARED ${co_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(ControlEffects
|
||||
NGLLogger
|
||||
Qt5::Concurrent
|
||||
Qt5::Core
|
||||
# Qt5::Test
|
||||
Qt5::Xml
|
||||
Qt5::Network
|
||||
BuildingControlCommon
|
||||
BuildingControlVwm
|
||||
BuildingControlBsm
|
||||
nglcoreapplication
|
||||
)
|
||||
|
||||
NGL_ADD_EXECUTABLE(AAR SV ControlEffectsTest ${cot_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(ControlEffectsTest
|
||||
NGLLogger
|
||||
Qt5::Concurrent
|
||||
Qt5::Core
|
||||
# Qt5::Test
|
||||
Qt5::Xml
|
||||
Qt5::Network
|
||||
BuildingControlCommon
|
||||
BuildingControlVwm
|
||||
nglcoreapplication
|
||||
)
|
||||
NGL_INSTALL_TARGET(ControlEffectsTest)
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Kleines Testprogramm für BSMs
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLSA, 2013-03-05
|
||||
*/
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <QNetworkProxy>
|
||||
#include <memory>
|
||||
#include <settings.h>
|
||||
#include "xmlreader.h"
|
||||
#include "logger.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// QString hostname = QStringLiteral("ubeecu0002");
|
||||
NGLCoreApplication app(argc, argv);
|
||||
QNetworkProxy::setApplicationProxy(QNetworkProxy());
|
||||
app.createLogger("BCU");
|
||||
BuildingControlUnit::XmlReader *xmlReader = new BuildingControlUnit::XmlReader();
|
||||
//BuildingControlUnit::HandelEffects * handelEffects = new BuildingControlUnit::HandelEffects();
|
||||
//BuildingControlUnit::HandleHttpRequest * handleHttpRequest = new BuildingControlUnit::HandleHttpRequest;
|
||||
//QString filename = "C:/HomeOffice/Buildings/BuildingControlUnit/effect_config.xml";
|
||||
//QString filename = "/shd/CTC/TOOLS/HomeOffice/Malte1/Personen/effect_config.xml";
|
||||
//QString filename = "/shd/CTC/TOOLS/TDS/TDS-source/Lts/Proxies/Buildings/BuildingControlUnit/effect_config.xml";
|
||||
QString filename = QStringLiteral("/tmp/effect_config.xml");
|
||||
|
||||
xmlReader->init(filename);
|
||||
|
||||
//handelEffects->init(filename, hostname);
|
||||
//handelEffects->printEffects();
|
||||
//qDebug() << "---------------------------------------------";
|
||||
//qDebug() << "--- Start Effects: ---";
|
||||
//qDebug() << "---------------------------------------------";
|
||||
//handelEffects->startEffects(80);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* One Effect Handler. Destroyed/created on Range change
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2021-05-31
|
||||
*/
|
||||
|
||||
#include "handeleffect.h"
|
||||
#include <QUrlQuery>
|
||||
#include <QTimer>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
|
||||
HandelEffect::HandelEffect(QObject *parent, const QString &loggerchannel)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger(QStringLiteral("HandelSingleEffect.") + loggerchannel))
|
||||
{
|
||||
}
|
||||
|
||||
bool HandelEffect::init(const QVector<Action *> &actions, int repetitions = 1)
|
||||
{
|
||||
if (actions.isEmpty())
|
||||
return false;
|
||||
|
||||
m_actions = actions;
|
||||
m_currentAction = nullptr;
|
||||
m_repeatCount = repetitions; // Usually The action list is only worked over once.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//void handleEffect(const Effect *effect, QVector<Action *> actions, int damage, bool background);
|
||||
void HandelEffect::handleEffect()
|
||||
{
|
||||
// No current Action? Start over or be ready
|
||||
if (!m_currentAction)
|
||||
{
|
||||
// Infinite Repeat Actions must start with repeatCount = -1
|
||||
if (m_repeatCount != 0)
|
||||
{
|
||||
m_currentAction = m_actions.first();
|
||||
--m_repeatCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
emit effectReady();
|
||||
deleteLater();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int index = m_actions.indexOf(m_currentAction);
|
||||
++index;
|
||||
m_currentAction = m_actions.value(index, nullptr);
|
||||
if (!m_currentAction)
|
||||
{
|
||||
QTimer::singleShot(0, this, &HandelEffect::handleEffect);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch (m_currentAction->aclass)
|
||||
{
|
||||
case AC_Unset:
|
||||
DEBUG_LOG(m_logger) << "---- This is unset ----";
|
||||
break;
|
||||
case AC_Standard:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "---- This is a standard Action ----";
|
||||
if (!m_currentAction->url.isEmpty())
|
||||
{
|
||||
// Todo: Is there a standard action valid for BSM? If so, we need to consider!
|
||||
DEBUG_LOG(m_logger) << "---- emit newHttpRequest(a->url):" << m_currentAction->url.toString();
|
||||
emit newHttpRequest(m_currentAction->url);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AC_Repeat:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "---- This is a Repeat Action";
|
||||
const RepeatAction *ra = static_cast<const RepeatAction *>(m_currentAction);
|
||||
|
||||
HandelEffect *he = new HandelEffect(this);
|
||||
he->init(ra->actions, ra->count);
|
||||
connect(he, &HandelEffect::effectReady, this, &HandelEffect::handleEffect);
|
||||
connect(he, &HandelEffect::newHttpRequest, this, &HandelEffect::newHttpRequest);
|
||||
connect(he, &HandelEffect::triggerAllFlashlights, this, &HandelEffect::triggerAllFlashlights);
|
||||
QTimer::singleShot(0, he, &HandelEffect::handleEffect);
|
||||
// To avoid the Timer call at the end of this method:
|
||||
return;
|
||||
// So this instance does nothing unless child-he is ready.
|
||||
}
|
||||
case AC_Pause:
|
||||
{
|
||||
const PauseAction *pa = static_cast<const PauseAction *>(m_currentAction);
|
||||
DEBUG_LOG(m_logger) << "---- This is a Pause Action Pause=" << pa->pause
|
||||
<< " comment=" << pa->comment;
|
||||
|
||||
QTimer::singleShot(pa->pause, this, &HandelEffect::handleEffect);
|
||||
// To avoid the Timer call at the end of this method:
|
||||
return;
|
||||
// So this instance does nothing unless timer returns.
|
||||
}
|
||||
case AC_Bsm:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "---- This is a Bsm Action ";
|
||||
const BsmAction *ba = static_cast<const BsmAction*>(m_currentAction);
|
||||
if (!ba->isNull())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "emit triggerAllFlashlights ------ atype=" << m_currentAction->atype
|
||||
<< " pause=" << ba->pause
|
||||
<< " choplength=" << ba->choplength
|
||||
<< " pulses=" << ba->pulses
|
||||
<< " pulseduration=" << ba->pulseduration
|
||||
<< " comment=" << ba->comment
|
||||
<< " this: " << this;
|
||||
emit triggerAllFlashlights(ba->pulses, ba->pause, ba->choplength, ba->pulseduration);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "--- End Action ";
|
||||
|
||||
// Start next action with ending this method.
|
||||
QTimer::singleShot(0, this, &HandelEffect::handleEffect);
|
||||
} // end printActions
|
||||
|
||||
} //namespace BuildingControlUnit
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* One Effect Handler. Destroyed/created on Range change
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2021-05-31
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "xmlreader.h"
|
||||
#include <logger.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
|
||||
class HandelEffect: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
HandelEffect(QObject* parent = nullptr, const QString &loggerchannel = QString());
|
||||
|
||||
bool init(const QVector<Action*> &actions, int repetitions);
|
||||
|
||||
signals:
|
||||
void newHttpRequest(const QUrl &url);
|
||||
void triggerAllFlashlights(int numberOfFlashes,
|
||||
int pauseDuration,
|
||||
int choppedConfiguration,
|
||||
int flashDuration);
|
||||
void effectReady();
|
||||
|
||||
public slots:
|
||||
void handleEffect();
|
||||
|
||||
private:
|
||||
QVector<Action *> m_actions;
|
||||
Action *m_currentAction{nullptr};
|
||||
int m_repeatCount{1};
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
+502
@@ -0,0 +1,502 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Effects (plural) handler, handles all effects at one EGCU or BSM
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2021-06-02
|
||||
*/
|
||||
|
||||
#include "handeleffects.h"
|
||||
#include "handeleffect.h"
|
||||
#include "handle_http_request.h"
|
||||
#include <QTimer>
|
||||
#include <QUrlQuery>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QDateTime>
|
||||
#include <QJsonArray>
|
||||
#include <QDateTime>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
|
||||
HandelEffects::HandelEffects(QObject *parent, const QString &loggerchannel)
|
||||
: QObject(parent)
|
||||
, m_sounds(EffectOverride::EO_Auto)
|
||||
, m_getRelayStateTimer(new QTimer(this))
|
||||
, m_logger(getLogger(QStringLiteral("HandelEffects.") + loggerchannel))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "HandelEffects::init loggerchannel=" << loggerchannel;
|
||||
// create a timer
|
||||
|
||||
// setup signal and slot
|
||||
connect(m_getRelayStateTimer, &QTimer::timeout,
|
||||
this, &HandelEffects::onRelayStateTimerTimeout);
|
||||
|
||||
}
|
||||
|
||||
HandelEffects::~HandelEffects()
|
||||
{
|
||||
}
|
||||
|
||||
void HandelEffects::init(const QString &controlEffectsCfg, const QString &hostname, EffectType et)
|
||||
|
||||
{
|
||||
m_xmlReader.init(controlEffectsCfg);
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandelEffects::init";
|
||||
m_hostname = hostname;
|
||||
m_lastDamage = -1;
|
||||
m_effectType = et;
|
||||
// msec
|
||||
if (et == ET_Relay)
|
||||
m_getRelayStateTimer->start(contents().updateRelayState);
|
||||
}
|
||||
|
||||
void HandelEffects::startEffects(int damagePercent)
|
||||
{
|
||||
if (m_lastDamage == damagePercent)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "damagePercent=" << damagePercent
|
||||
<< " m_lastDamage=" << m_lastDamage
|
||||
<< " return";
|
||||
return;
|
||||
}
|
||||
|
||||
for (Effect *e : contents().constEffects())
|
||||
{
|
||||
// If this Instance does not handle BSM, skip BSM-Effects
|
||||
if (e->effectType == ET_BsmFlash && m_effectType != ET_BsmFlash)
|
||||
continue;
|
||||
|
||||
// If this Instance has BSM API, it is only for BSM, so skip sounds
|
||||
if (e->effectType == ET_BackgroundSound && m_effectType == ET_BsmFlash)
|
||||
continue;
|
||||
|
||||
// If this Instance has BSM API, it is only for BSM, so skip relays
|
||||
if (e->effectType == ET_Relay && m_effectType == ET_BsmFlash)
|
||||
continue;
|
||||
|
||||
DEBUG_LOG(m_logger) << "- HandelEffects::Starting Effect " << e << " of Type " << e->effectType << ". ----"
|
||||
<< " name=" << e->name;
|
||||
for (const Range *range : e->constRanges())
|
||||
{
|
||||
if (!range->fits(damagePercent))
|
||||
continue;
|
||||
|
||||
if (range->fits(m_lastDamage) && !range->restartOnChange)
|
||||
continue;
|
||||
|
||||
// We must restart the actions for that range. Either, because the range changed or because restart is commanded.
|
||||
// Thus, we kill the old HandelEffect and start over.
|
||||
createEffectHandler(e, range);
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "- End Effect ";
|
||||
}
|
||||
m_lastDamage = damagePercent;
|
||||
}
|
||||
|
||||
void HandelEffects::createEffectHandler(Effect *e, const Range *range)
|
||||
{
|
||||
HandelEffect *handelEffect = e->effectHandler;
|
||||
delete handelEffect; // This also deletes the child handelEffect in case of Repeat actions!
|
||||
|
||||
handelEffect = new HandelEffect(this, m_hostname.isEmpty() ? QLatin1String("BSM") : m_hostname);
|
||||
e->effectHandler = handelEffect;
|
||||
if (e->override == EO_Auto)
|
||||
{
|
||||
if (m_effectType == ET_BsmFlash)
|
||||
{
|
||||
INFO_LOG(m_logger) << "setOverrides connect Flashes" ;
|
||||
connect(handelEffect, &HandelEffect::triggerAllFlashlights, this, &HandelEffects::triggerAllFlashlights, Qt::UniqueConnection);
|
||||
}
|
||||
else
|
||||
connect(handelEffect, &HandelEffect::newHttpRequest, this, &HandelEffects::sendHttpRequest, Qt::UniqueConnection);
|
||||
}
|
||||
|
||||
connect(handelEffect, &HandelEffect::effectReady, this, &HandelEffects::onEffectReady);
|
||||
|
||||
DEBUG_LOG(m_logger) << "-- HandelEffects::Starting Range " << range->min << " - " << range->max
|
||||
<< ". ----";
|
||||
|
||||
DEBUG_LOG(m_logger) << "-- Range has " << range->actions.count() << " actions";
|
||||
|
||||
handelEffect->init(range->actions, 1);
|
||||
|
||||
QTimer::singleShot(0, handelEffect, &HandelEffect::handleEffect);
|
||||
DEBUG_LOG(m_logger) << "-- End Range ";
|
||||
}
|
||||
|
||||
void HandelEffects::playHitSound(const int hitSoundId)
|
||||
{
|
||||
if (m_sounds == EffectOverride::EO_Off)
|
||||
return;
|
||||
|
||||
QUrl url = XmlReader::createPreparedUrl(contents(), m_hostname);
|
||||
url.setPath(QStringLiteral("/hitsound.php"));
|
||||
|
||||
QUrlQuery query;
|
||||
query.addQueryItem(QStringLiteral("sound"), QString::number(hitSoundId));
|
||||
query.addQueryItem(QStringLiteral("vol"), QString::number(contents().hitSoundVolume));
|
||||
url.setQuery(query);
|
||||
|
||||
emit newHttpRequest(url, HandleHttpQueueMessageStatus::MS_Single);
|
||||
}
|
||||
|
||||
void HandelEffects::switchRelay(const SwitchRelayValues &switchRelayValues)
|
||||
{
|
||||
QUrl url = XmlReader::createPreparedUrl(contents(), m_hostname);
|
||||
url.setPath(QStringLiteral("/relay.php"));
|
||||
|
||||
QUrlQuery query;
|
||||
query.addQueryItem(QStringLiteral("number"), QString::number(switchRelayValues.id));
|
||||
query.addQueryItem(QStringLiteral("state"), QString::number(switchRelayValues.bcuRelayState));
|
||||
if (switchRelayValues.bcuRelayState == BRS_Pulse)
|
||||
{
|
||||
query.addQueryItem(QStringLiteral("pulse"), QString::number(switchRelayValues.pulse));
|
||||
query.addQueryItem(QStringLiteral("repeat"), QString::number(switchRelayValues.count-1));
|
||||
query.addQueryItem(QStringLiteral("delay"), QString::number(switchRelayValues.delay));
|
||||
}
|
||||
url.setQuery(query);
|
||||
|
||||
emit newHttpRequest(url, HandleHttpQueueMessageStatus::MS_Single);
|
||||
}
|
||||
|
||||
|
||||
void HandelEffects::setOverrides(const QVector<BcuEffectState> &effectStates)
|
||||
{
|
||||
m_effectStates = effectStates; // Save effectStates to restore overrides
|
||||
DEBUG_LOG(m_logger) << "In set overrides for " << m_hostname << ", effectStates.size: " << effectStates.size();
|
||||
for(const auto &es : qAsConst(m_effectStates))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_effectStates: es.id=" << es.id
|
||||
<< ", es.type=" << es.type
|
||||
<< ", es.override=" << es.effectOverride;
|
||||
}
|
||||
m_sounds = EffectOverride::EO_Auto;
|
||||
DEBUG_LOG(m_logger) << "Nun die Schleife:";
|
||||
for(const auto &es : qAsConst(effectStates))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "es.id=" << es.id
|
||||
<< ", es.type=" << es.type
|
||||
<< ", es.override=" << es.effectOverride;
|
||||
switch (es.type) {
|
||||
case BET_BackgroundSound:
|
||||
{
|
||||
for (Effect *e : contents().constEffects())
|
||||
{
|
||||
if (e->effectType != ET_BackgroundSound)
|
||||
continue;
|
||||
EffectOverride eo = static_cast<EffectOverride>(es.effectOverride);
|
||||
e->override = eo;
|
||||
m_sounds = eo;
|
||||
|
||||
if (eo == EO_Auto)
|
||||
createEffectHandler(e,e->getRangeByDamagePercent(m_lastDamage));
|
||||
else
|
||||
{
|
||||
if (e->effectHandler)
|
||||
{
|
||||
disconnect(e->effectHandler, &HandelEffect::newHttpRequest, this, &HandelEffects::sendHttpRequest);
|
||||
INFO_LOG(m_logger) << "setOverrides emit triggerAllFlashlights(0,0,0,0)" ;
|
||||
emit triggerAllFlashlights(0,0,0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (es.effectOverride == BEO_Off )
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "BEO_Off";
|
||||
// Stop all Sounds:
|
||||
QUrl url = XmlReader::createPreparedUrl(contents(), m_hostname);
|
||||
QUrlQuery query;
|
||||
url.setPath(QStringLiteral("/bgsound.php"));
|
||||
query.addQueryItem(QStringLiteral("control"), QString::number(BCS_Stop_All_Soundfiles));
|
||||
query.addQueryItem(QStringLiteral("category"), QStringLiteral("people")); // dummy for ICD
|
||||
query.addQueryItem(QStringLiteral("sound"), QStringLiteral("0")); // dummy for ICD
|
||||
|
||||
url.setQuery(query);
|
||||
sendHttpRequest(url);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case BET_Relay:
|
||||
{
|
||||
for (Effect *e : contents().constEffects())
|
||||
{
|
||||
if (e->effectType != ET_Relay)
|
||||
continue;
|
||||
if (e->id != es.id)
|
||||
continue;
|
||||
EffectOverride eo = static_cast<EffectOverride>(es.effectOverride);
|
||||
if (eo == e->override)
|
||||
//continue;
|
||||
e->override = eo;
|
||||
if (es.effectOverride != BEO_Auto)
|
||||
{
|
||||
SwitchRelayValues relayValues;
|
||||
relayValues.id = e->id;
|
||||
relayValues.bcuRelayState = static_cast<BcuRelayState>(es.effectOverride);
|
||||
switchRelay(relayValues);
|
||||
if (e->effectHandler)
|
||||
disconnect(e->effectHandler, &HandelEffect::newHttpRequest, this, &HandelEffects::sendHttpRequest);
|
||||
}
|
||||
else
|
||||
createEffectHandler(e,e->getRangeByDamagePercent(m_lastDamage));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case BET_BsmFlash:
|
||||
{
|
||||
if (m_effectType != ET_BsmFlash)
|
||||
break;
|
||||
for (Effect *e : contents().constEffects())
|
||||
{
|
||||
if (e->effectType != ET_BsmFlash)
|
||||
continue;
|
||||
EffectOverride eo = static_cast<EffectOverride>(es.effectOverride);
|
||||
if (eo == e->override)
|
||||
continue;
|
||||
e->override = eo;
|
||||
if (es.effectOverride != BEO_Off) // -1 for back to auto or 1 for permanently on which in this case shall also be "auto"...
|
||||
createEffectHandler(e,e->getRangeByDamagePercent(m_lastDamage));
|
||||
else
|
||||
{
|
||||
if (e->effectHandler)
|
||||
{
|
||||
INFO_LOG(m_logger) << "setOverrides disconnect Flashes" ;
|
||||
disconnect (e->effectHandler, &HandelEffect::triggerAllFlashlights, this, &HandelEffects::triggerAllFlashlights);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QVector<BcuEffectState> HandelEffects::getOverrides()
|
||||
{
|
||||
QVector<BcuEffectState> overrides;
|
||||
for (Effect *effect : contents().constEffects())
|
||||
{
|
||||
BcuEffectState override;
|
||||
override.id = effect->id;
|
||||
switch (effect->effectType)
|
||||
{
|
||||
case BuildingControlUnit::ET_Unset:
|
||||
override.type = BET_Unset;
|
||||
break;
|
||||
case BuildingControlUnit::ET_Relay:
|
||||
override.type = BET_Relay;
|
||||
break;
|
||||
case BuildingControlUnit::ET_BackgroundSound:
|
||||
override.type = BET_BackgroundSound;
|
||||
break;
|
||||
case BuildingControlUnit::ET_BsmFlash:
|
||||
override.type = BET_BsmFlash;
|
||||
break;
|
||||
} // switch
|
||||
|
||||
switch (effect->override)
|
||||
{
|
||||
case EO_Auto:
|
||||
override.effectOverride = BEO_Auto;
|
||||
break;
|
||||
case EO_Off:
|
||||
override.effectOverride = BEO_Off;
|
||||
break;
|
||||
case EO_On:
|
||||
override.effectOverride = BEO_On;
|
||||
break;
|
||||
|
||||
} // switch
|
||||
DEBUG_LOG(m_logger) << "getOverrides "
|
||||
<< " id=" << override.id
|
||||
<< " type=" << override.type
|
||||
<< " override" << override.effectOverride;
|
||||
overrides.append(override);
|
||||
} // for
|
||||
return overrides;
|
||||
} // END getOverrides
|
||||
|
||||
void HandelEffects::onEffectReady()
|
||||
{
|
||||
// Effect will delete itself, but we have to remove the pointer from the corresponding effect.
|
||||
for (Effect *e : contents().constEffects())
|
||||
{
|
||||
if (e->effectHandler != sender())
|
||||
continue;
|
||||
|
||||
e->effectHandler = nullptr;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void HandelEffects::sendHttpRequest(const QUrl &url)
|
||||
{
|
||||
QUrl copy = url;
|
||||
copy.setHost(m_hostname);
|
||||
DEBUG_LOG(m_logger) << "sendHttpRequest" << copy.toString();
|
||||
emit newHttpRequest(copy, HandleHttpQueueMessageStatus::MS_Single);
|
||||
}
|
||||
|
||||
void HandelEffects::onRelayStateTimerTimeout()
|
||||
{
|
||||
if ( m_offlineCounter == 3 )
|
||||
{
|
||||
m_offlineState = true;
|
||||
NOTICE_LOG(m_logger) << "!!!!!!!!! Send Offline State !!!!!!!!!!!!!!!! m_offlineState=" << m_offlineState;
|
||||
m_relayState.offlineTime = QDateTime::currentMSecsSinceEpoch();
|
||||
emit sendRelayState(m_relayState);
|
||||
m_overridesSend = false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "send get relay-State contents()=" << contents().toString()
|
||||
<< " m_offlineCounter=" << m_offlineCounter;
|
||||
QUrl url = XmlReader::createPreparedUrl(contents(), m_hostname);
|
||||
url.setPath(QStringLiteral("/relay.php"));
|
||||
QUrlQuery query;
|
||||
query.addQueryItem(QStringLiteral("state"), QString::number(BRS_State));
|
||||
url.setQuery(query);
|
||||
emit newHttpRequest(url, HandleHttpQueueMessageStatus::MS_Cyclic);
|
||||
m_offlineCounter++;
|
||||
}
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
void HandelEffects::handleEgcuReplyObject(const QString &host, const QByteArray &data)
|
||||
{
|
||||
bool relayStateChanged = false;
|
||||
TRACE_LOG(m_logger) << "handleEgcuReply Object:" << data
|
||||
<< " m_offlineState=" << m_offlineState;
|
||||
|
||||
if (m_offlineState)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "State wiederherstellen !!!!!!!!!!! m_offlineState=" << m_offlineState;
|
||||
m_offlineState = false;
|
||||
setOverrides(m_effectStates);
|
||||
}
|
||||
|
||||
RelayState lastRelayState = m_relayState;
|
||||
m_relayState.relayStates.clear();
|
||||
const QJsonObject jsonObject = QJsonDocument::fromJson(data).object();
|
||||
const QJsonObject stateObj = jsonObject[QStringLiteral("State")].toObject();
|
||||
for (auto it = stateObj.constBegin(); it != stateObj.constEnd(); ++it)
|
||||
{
|
||||
RelayStateInfo rsi;
|
||||
rsi.id = it.key().toInt();
|
||||
rsi.state = it.value().isString() ? (it.value().toString().compare(QLatin1String("on"), Qt::CaseInsensitive) == 0) : it.value().toBool(false);
|
||||
m_relayState.relayStates.append(rsi);
|
||||
TRACE_LOG(m_logger) << "id=" << rsi.id
|
||||
<< " state=" << rsi.state;
|
||||
}
|
||||
if ( m_relayState.relayStates.size() == lastRelayState.relayStates.size())
|
||||
{
|
||||
for (int i = 0; i < m_relayState.relayStates.size(); ++i)
|
||||
{
|
||||
if (m_relayState.relayStates[i].state != lastRelayState.relayStates[i].state)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Values relayStateChanged = true";
|
||||
relayStateChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Size relayStateChanged = true";
|
||||
relayStateChanged = true;
|
||||
}
|
||||
if ( m_offlineCounter > 1)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "m_offlineCounter=" << m_offlineCounter;
|
||||
relayStateChanged = true;
|
||||
}
|
||||
|
||||
m_relayState.hostname = m_hostname;
|
||||
m_relayState.stateTime = QDateTime::currentMSecsSinceEpoch();
|
||||
m_relayState.offlineTime = 0;
|
||||
m_offlineCounter=0;
|
||||
DEBUG_LOG(m_logger) << "host=" << host.toLower()
|
||||
<< " relayStateChanged=" << relayStateChanged
|
||||
<< " m_overridesSend=" << m_overridesSend
|
||||
<< " m_offlineState=" << m_offlineState;
|
||||
// if ( m_relayState.hostname.toLower() == host.toLower() && relayStateChanged && m_overridesSend)
|
||||
|
||||
if ( m_offlineState)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << "!!!!!!!!!!!!!!!! EGCU States wieder setzen !!!!!!!!!!!!!!!!!!";
|
||||
m_offlineState = false;
|
||||
}
|
||||
|
||||
if ( m_relayState.hostname.toLower() == host.toLower() && relayStateChanged)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "emit sendRelayState(m_relayState) relayStateChanged";
|
||||
emit sendRelayState(m_relayState);
|
||||
}
|
||||
}
|
||||
|
||||
void HandelEffects::handleEgcuReplyArray(const QString &host, const QByteArray &data)
|
||||
{
|
||||
Q_UNUSED (host);
|
||||
TRACE_LOG(m_logger) << "handleEgcuReply Array:" << data;
|
||||
m_relayState.relayStates.clear();
|
||||
//parse the reply JSON and send result to svcBuilding
|
||||
const QJsonObject jsonObject = QJsonDocument::fromJson(data).object();
|
||||
if (!jsonObject.contains(QStringLiteral("State")) )
|
||||
return;
|
||||
|
||||
const QJsonArray stateArray = jsonObject[QStringLiteral("State")].toArray();
|
||||
for (int i = 0; i < stateArray.size(); ++i)
|
||||
{
|
||||
RelayStateInfo rsi;
|
||||
rsi.id = i;
|
||||
rsi.state = stateArray[i].isString() ? (stateArray[i].toString().compare(QLatin1String("on"), Qt::CaseInsensitive)== 0 ): stateArray[i].toBool(false);
|
||||
m_relayState.relayStates.append(rsi);
|
||||
TRACE_LOG(m_logger) << "id=" << rsi.id
|
||||
<< " state=" << rsi.state;
|
||||
}
|
||||
|
||||
m_relayState.hostname = m_hostname;
|
||||
m_relayState.stateTime = QDateTime::currentMSecsSinceEpoch();
|
||||
m_relayState.offlineTime = 0;
|
||||
m_offlineCounter=0;
|
||||
|
||||
// if ( m_relayState.hostname.toLower() == host.toLower() && relayStateChanged && m_overridesSend )
|
||||
// emit sendRelayState(m_relayState);
|
||||
}
|
||||
|
||||
|
||||
void HandelEffects::handleEgcuReply(const QString &host, const QByteArray &data)
|
||||
{
|
||||
//parse the reply JSON and send result to svcBuilding
|
||||
DEBUG_LOG(m_logger) << "HandelEffects::handleEgcuReply host=" << host
|
||||
<< " m_hostname=" << m_hostname
|
||||
<< " m_overridesSend=" << m_overridesSend;
|
||||
|
||||
if (host.toLower() != m_hostname.toLower())
|
||||
return;
|
||||
|
||||
const QJsonObject jsonObject = QJsonDocument::fromJson(data).object();
|
||||
if (!jsonObject.contains(QStringLiteral("State")) )
|
||||
{
|
||||
m_overridesSend = true;
|
||||
TRACE_LOG(m_logger) << "No State return";
|
||||
return;
|
||||
}
|
||||
const QJsonValue jsonValue = jsonObject[QStringLiteral("State")];
|
||||
if (jsonValue.isArray())
|
||||
{
|
||||
TRACE_LOG(m_logger) << "data isArray\n";
|
||||
handleEgcuReplyArray(host, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE_LOG(m_logger) << "data isObject\n";
|
||||
handleEgcuReplyObject(host, data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // BuildingControlUnit
|
||||
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Effects (plural) handler, handles all effects at one EGCU or BSM
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2021-06-02
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "xmlreader.h"
|
||||
|
||||
#include <ControlEffects/controleffects_export.h>
|
||||
#include <BSM/bsm_types.h>
|
||||
#include <logger.h>
|
||||
#include "handle_http_request.h"
|
||||
class QTimer;
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
|
||||
class CONTROLEFFECTS_EXPORT HandelEffects: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HandelEffects(QObject *parent = nullptr, const QString &loggerchannel = QString());
|
||||
~HandelEffects();
|
||||
|
||||
void init(const QString &controlEffectsCfg, const QString &hostname, EffectType et);
|
||||
void startEffects(int damagePercent);
|
||||
void playHitSound(const int hitSoundId);
|
||||
void switchRelay(const SwitchRelayValues &switchRelayValues);
|
||||
QString hostname() const { return m_hostname; }
|
||||
void setOverrides(const QVector<BcuEffectState> &effectStates);
|
||||
QVector<BcuEffectState> getOverrides();
|
||||
|
||||
public slots:
|
||||
void handleEgcuReply(const QString &host, const QByteArray &data);
|
||||
|
||||
private slots:
|
||||
void onEffectReady();
|
||||
void sendHttpRequest(const QUrl &url);
|
||||
void onRelayStateTimerTimeout();
|
||||
|
||||
private:
|
||||
void handleEgcuReplyObject(const QString &host, const QByteArray &data);
|
||||
void handleEgcuReplyArray(const QString &host, const QByteArray &data);
|
||||
|
||||
|
||||
signals:
|
||||
void newHttpRequest(const QUrl &url, HandleHttpQueueMessageStatus status);
|
||||
void triggerAllFlashlights(int numberOfFlashes,
|
||||
int pauseDuration,
|
||||
int choppedConfiguration,
|
||||
int flashDuration);
|
||||
void sendRelayState (const RelayState &relayState);
|
||||
|
||||
private:
|
||||
XmlContents contents() const { return m_xmlReader.contents(); }
|
||||
int m_lastDamage = -1;
|
||||
XmlReader m_xmlReader;
|
||||
EffectType m_effectType; // BSM or Sound/Relay [EGCU]
|
||||
QString m_hostname;
|
||||
EffectOverride m_sounds;
|
||||
QTimer *m_getRelayStateTimer;
|
||||
RelayState m_relayState;
|
||||
int m_offlineCounter = 0;
|
||||
LOGGER_T m_logger;
|
||||
|
||||
QVector<BcuEffectState> m_effectStates;
|
||||
bool m_overridesSend = false;
|
||||
//bool m_reconnected = false; // New Connection to EGCU => restore the target state of the EGCU
|
||||
bool m_offlineState = true;
|
||||
void createEffectHandler(Effect *e, const Range *range);
|
||||
};
|
||||
|
||||
} // BuildingControlUnit
|
||||
@@ -0,0 +1,30 @@
|
||||
#include <QApplication>
|
||||
#include "xmlreader.h"
|
||||
#include "handeleffects.h"
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
HandelEffects *handelEffects = new HandelEffects();
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
//QString filename = "C:/HomeOffice/Buildings/BuildingControlUnit/effect_config.xml";
|
||||
//QString filename = "/shd/CTC/TOOLS/HomeOffice/Malte1/Personen/effect_config.xml";
|
||||
//QString filename = "/shd/CTC/TOOLS/TDS/TDS-source/Lts/Proxies/Buildings/BuildingControlUnit/effect_config.xml";
|
||||
QString filename = "/shd/CTC/TOOLS/HomeOffice/Malte3/Personen1/effect_config.xml";
|
||||
|
||||
|
||||
handelEffects->init(filename);
|
||||
handelEffects->printEffects();
|
||||
qDebug() << "---------------------------------------------";
|
||||
qDebug() << "--- Start Effects: ---";
|
||||
qDebug() << "---------------------------------------------";
|
||||
handelEffects->startEffects(80);
|
||||
//handelEffects->newSegmentDamage(80);
|
||||
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
@@ -0,0 +1,478 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Xml Reader for Effect Configuration
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2021-06-02
|
||||
*/
|
||||
|
||||
#include "xmlreader.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QUrlQuery>
|
||||
#include <QXmlStreamAttributes>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
|
||||
XmlReader::XmlReader(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("XmlReader"))
|
||||
{
|
||||
}
|
||||
|
||||
bool XmlReader::init(const QString &effectConfigFile)
|
||||
{
|
||||
m_contents.effects.clear();
|
||||
|
||||
QFile file(effectConfigFile);
|
||||
DEBUG_LOG(m_logger) << "open effectConfigFile: " << effectConfigFile;
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Couldn't open EffectConfigFile: " << effectConfigFile;
|
||||
return false;
|
||||
}
|
||||
|
||||
QXmlStreamReader xml(file.readAll());
|
||||
while (!xml.atEnd() && !xml.hasError())
|
||||
{
|
||||
QXmlStreamReader::TokenType token = xml.readNext();
|
||||
if (token == QXmlStreamReader::StartDocument)
|
||||
continue;
|
||||
else if (token == QXmlStreamReader::StartElement)
|
||||
{
|
||||
if (xml.name() == QStringLiteral("effects"))
|
||||
continue;
|
||||
else if (xml.name() == QStringLiteral("backgroundSoundVolume"))
|
||||
m_contents.bgSoundVolume = xml.readElementText().toInt();
|
||||
else if (xml.name() == QStringLiteral("hitSoundVolume"))
|
||||
m_contents.hitSoundVolume = xml.readElementText().toInt();
|
||||
else if (xml.name() == QStringLiteral("password"))
|
||||
m_contents.password = xml.readElementText();
|
||||
else if (xml.name() == QStringLiteral("port"))
|
||||
m_contents.port = xml.readElementText().toInt();
|
||||
else if (xml.name() == QStringLiteral("username"))
|
||||
m_contents.username = xml.readElementText();
|
||||
else if (xml.name() == QStringLiteral("updateRelayState"))
|
||||
m_contents.updateRelayState = xml.readElementText().toInt();
|
||||
|
||||
if (xml.name() == QStringLiteral("effect"))
|
||||
{
|
||||
Effect *e = this->parseEffect(xml);
|
||||
if (e)
|
||||
m_contents.effects.append(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xml.hasError())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Effect Config File had XML Errors:\n" << xml.errorString();
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Effect Config File Contents: " << m_contents.toString();
|
||||
createHttpRequests();
|
||||
return true;
|
||||
}
|
||||
|
||||
Effect *XmlReader::parseEffect(QXmlStreamReader &xml)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "- parseEffect Start";
|
||||
|
||||
if (xml.tokenType() != QXmlStreamReader::StartElement ||
|
||||
xml.name() != QStringLiteral("effect"))
|
||||
return {};
|
||||
|
||||
Effect *e = new Effect();
|
||||
QXmlStreamAttributes attributes = xml.attributes();
|
||||
|
||||
if (attributes.hasAttribute(QStringLiteral("type")))
|
||||
{
|
||||
QString typeString = attributes.value(QStringLiteral("type")).toString();
|
||||
if (typeString == QStringLiteral("relayAction"))
|
||||
e->effectType = ET_Relay;
|
||||
else if (typeString == QStringLiteral("backgroundSoundAction"))
|
||||
e->effectType = ET_BackgroundSound;
|
||||
else if (typeString == QStringLiteral("bsmFlashAction"))
|
||||
e->effectType = ET_BsmFlash;
|
||||
}
|
||||
xml.readNext();
|
||||
|
||||
while (!(xml.tokenType() == QXmlStreamReader::EndElement &&
|
||||
xml.name() == QStringLiteral("effect")))
|
||||
{
|
||||
if (xml.tokenType() == QXmlStreamReader::StartElement)
|
||||
{
|
||||
if (xml.name() == QStringLiteral("id"))
|
||||
{
|
||||
QXmlStreamAttributes attributesName = xml.attributes();
|
||||
if (attributesName.hasAttribute(QStringLiteral("name")))
|
||||
{
|
||||
e->name = attributesName.value(QStringLiteral("name")).toString();
|
||||
}
|
||||
e->id = xml.readElementText().toInt();
|
||||
}
|
||||
|
||||
if (xml.name() == QStringLiteral("category"))
|
||||
{
|
||||
e->category = static_cast<Category>(xml.readElementText().toInt());
|
||||
}
|
||||
|
||||
if (xml.name() == QStringLiteral("override"))
|
||||
{
|
||||
e->override = static_cast<EffectOverride>(xml.readElementText().toInt());
|
||||
}
|
||||
|
||||
if (xml.name() == QStringLiteral("range"))
|
||||
e->ranges.append(parseRange(xml));
|
||||
}
|
||||
xml.readNext();
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "- parseEffect: Name: " << e->id
|
||||
<< ", Type: " << e->effectType
|
||||
<< ", Category: " << e->category
|
||||
<< ", Name: " << e->name
|
||||
<< ", override: " << e->override;
|
||||
DEBUG_LOG(m_logger) << "- parseEffect End. It has " << e->ranges.size() << " ranges";
|
||||
return e;
|
||||
}
|
||||
|
||||
Range *XmlReader::parseRange(QXmlStreamReader &xml)
|
||||
{
|
||||
if (xml.tokenType() != QXmlStreamReader::StartElement ||
|
||||
xml.name() != QStringLiteral("range"))
|
||||
return {};
|
||||
|
||||
DEBUG_LOG(m_logger) << "-- parseRange Start";
|
||||
Range *r = new Range();
|
||||
|
||||
QXmlStreamAttributes attributes = xml.attributes();
|
||||
|
||||
if (attributes.hasAttribute(QStringLiteral("min")))
|
||||
r->min = attributes.value(QStringLiteral("min")).toInt();
|
||||
if (attributes.hasAttribute(QStringLiteral("max")))
|
||||
r->max = attributes.value(QStringLiteral("max")).toInt();
|
||||
if (attributes.hasAttribute(QStringLiteral("restartOnChange")))
|
||||
r->restartOnChange = attributes.value(QLatin1String("restartOnChange")).toString().toLower() == QLatin1String("true");
|
||||
|
||||
xml.readNext();
|
||||
/*
|
||||
* We're going to loop over the things because the order might change.
|
||||
* We'll continue the loop until we hit an EndElement named person.
|
||||
*/
|
||||
while (!(xml.tokenType() == QXmlStreamReader::EndElement &&
|
||||
xml.name() == QLatin1String("range")))
|
||||
{
|
||||
Action *a = parseAction(xml);
|
||||
if (a && a->aclass != AC_Unset)
|
||||
r->actions << a;
|
||||
|
||||
xml.readNext();
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "-- parseRange: [" << r->min << "-" << r->max << "]"
|
||||
<< ", restartOnChange: " <<r->restartOnChange
|
||||
<< ", ActionCount: " << r->actions.count();
|
||||
DEBUG_LOG(m_logger) << "-- parseRange End";
|
||||
return r;
|
||||
}
|
||||
|
||||
Action *XmlReader::parseAction(QXmlStreamReader &xml)
|
||||
{
|
||||
if (xml.tokenType() != QXmlStreamReader::StartElement)
|
||||
return {};
|
||||
|
||||
if (xml.name() == QStringLiteral("action"))
|
||||
return parseStandardAction(xml);;
|
||||
|
||||
if (xml.name() == QStringLiteral("pause"))
|
||||
return parsePauseAction(xml);
|
||||
|
||||
if (xml.name() == QStringLiteral("repeat"))
|
||||
return parseRepeatAction(xml);
|
||||
|
||||
if (xml.name() == QStringLiteral("bsm"))
|
||||
return parseBsmAction(xml);
|
||||
|
||||
WARNING_LOG(m_logger) << "--- parseUnknownAction with name '" << xml.name().string() << "'cannot be handled.";
|
||||
return {};
|
||||
}
|
||||
|
||||
PauseAction *XmlReader::parsePauseAction(QXmlStreamReader &xml)
|
||||
{
|
||||
if (xml.tokenType() != QXmlStreamReader::StartElement ||
|
||||
xml.name() != QLatin1String("pause"))
|
||||
return {};
|
||||
|
||||
DEBUG_LOG(m_logger) << "--- parsePauseAction Start";
|
||||
QXmlStreamAttributes attributes = xml.attributes();
|
||||
PauseAction *p = new PauseAction();
|
||||
p->atype = static_cast<ActionType>(attributes.value(QStringLiteral("type")).toInt());
|
||||
if (attributes.hasAttribute(QStringLiteral("comment")))
|
||||
p->comment = attributes.value(QStringLiteral("comment")).toString();
|
||||
p->pause = xml.readElementText().toInt();
|
||||
DEBUG_LOG(m_logger) << "--- parsePauseAction: "
|
||||
<< " Pause: " << p->pause
|
||||
<< ", Comment: " << p->comment;
|
||||
|
||||
DEBUG_LOG(m_logger) << "--- parsePauseAction End";
|
||||
return p;
|
||||
}
|
||||
|
||||
RepeatAction *XmlReader::parseRepeatAction(QXmlStreamReader &xml)
|
||||
{
|
||||
if (xml.tokenType() != QXmlStreamReader::StartElement ||
|
||||
xml.name() != QStringLiteral("repeat"))
|
||||
return {};
|
||||
DEBUG_LOG(m_logger) << "--- parseRepeatAction Start";
|
||||
RepeatAction *ra = new RepeatAction();
|
||||
QXmlStreamAttributes attributes = xml.attributes();
|
||||
|
||||
if (attributes.hasAttribute(QStringLiteral("count")))
|
||||
ra->count = attributes.value(QStringLiteral("count")).toInt();
|
||||
if (attributes.hasAttribute(QStringLiteral("comment")))
|
||||
ra->comment = attributes.value(QStringLiteral("comment")).toString();
|
||||
|
||||
if (ra->count == 0)
|
||||
ra->count = -1;
|
||||
|
||||
xml.readNext();
|
||||
|
||||
while (!(xml.tokenType() == QXmlStreamReader::EndElement &&
|
||||
xml.name() == QStringLiteral("repeat")))
|
||||
{
|
||||
Action *a = parseAction(xml);
|
||||
if (a && a->aclass != AC_Unset)
|
||||
ra->actions << a;
|
||||
xml.readNext();
|
||||
}
|
||||
|
||||
QString repetitions = QString::number(ra->count);
|
||||
if (ra->count < 0)
|
||||
repetitions = QLatin1String("Infinite");
|
||||
DEBUG_LOG(m_logger) << "--- parseRepeatAction: Repetitions: " << repetitions << ", Comment: " << ra->comment;
|
||||
DEBUG_LOG(m_logger) << "--- parseRepeatAction End";
|
||||
return ra;
|
||||
}
|
||||
|
||||
Action *XmlReader::parseStandardAction(QXmlStreamReader &xml)
|
||||
{
|
||||
|
||||
if (xml.tokenType() != QXmlStreamReader::StartElement ||
|
||||
xml.name() != QStringLiteral("action"))
|
||||
return {};
|
||||
|
||||
DEBUG_LOG(m_logger) << "--- parseStandardAction Start";
|
||||
|
||||
QXmlStreamAttributes attributes = xml.attributes();
|
||||
|
||||
if (!attributes.hasAttribute(QStringLiteral("type")))
|
||||
return {};
|
||||
|
||||
Action *a = new Action();
|
||||
// set explicitely, as Action itself is "unset"
|
||||
a->aclass = AC_Standard;
|
||||
a->atype = static_cast<ActionType>(attributes.value(QStringLiteral("type")).toInt());
|
||||
if (attributes.hasAttribute(QStringLiteral("comment")))
|
||||
a->comment = attributes.value(QStringLiteral("comment")).toString();
|
||||
DEBUG_LOG(m_logger) << "--- parseStandardAction: Type: " << a->atype
|
||||
<< ", Comment: " << a->comment;
|
||||
DEBUG_LOG(m_logger) << "--- parseStandardAction End";
|
||||
return a;
|
||||
}
|
||||
|
||||
BsmAction *XmlReader::parseBsmAction(QXmlStreamReader &xml)
|
||||
{
|
||||
QXmlStreamAttributes attributes = xml.attributes();
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "--- parseBsmAction Start";
|
||||
BsmAction *a = new BsmAction();
|
||||
a->atype = static_cast<ActionType>(attributes.value(QStringLiteral("type")).toInt());
|
||||
if (attributes.hasAttribute(QStringLiteral("comment")))
|
||||
a->comment = attributes.value(QStringLiteral("comment")).toString();
|
||||
|
||||
xml.readNext();
|
||||
while (!(xml.tokenType() == QXmlStreamReader::EndElement &&
|
||||
xml.name() == QStringLiteral("bsm")))
|
||||
{
|
||||
// What about count?
|
||||
if (xml.name() == QStringLiteral("pause"))
|
||||
a->pause = xml.readElementText().toInt();
|
||||
if (xml.name() == QStringLiteral("choplength"))
|
||||
a->choplength = xml.readElementText().toInt();
|
||||
if (xml.name() == QStringLiteral("pulses"))
|
||||
a->pulses = xml.readElementText().toInt();
|
||||
if (xml.name() == QStringLiteral("pulseduration"))
|
||||
a->pulseduration = xml.readElementText().toInt();
|
||||
xml.readNext();
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "--- parseBsmAction: Type: " << a->atype
|
||||
<< ", Pause: " << a->pause
|
||||
<< ", Choplength: " << a->choplength
|
||||
<< ", Count: " << a->count
|
||||
<< ", Pulses: " << a->pulses
|
||||
<< ", Pulseduration: " << a->pulseduration
|
||||
<< ", Comment: " << a->comment;
|
||||
DEBUG_LOG(m_logger) << "--- parseBsmAction End";
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void XmlReader::createHttpRequests()
|
||||
{
|
||||
for (const Effect *e : m_contents.constEffects())
|
||||
{
|
||||
for (const Range *r : e->constRanges())
|
||||
{
|
||||
generateUrls(e, r->actions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QUrl XmlReader::createPreparedUrl(const XmlContents &contents, const QString &hostname)
|
||||
{
|
||||
QUrl url;
|
||||
url.setScheme(QStringLiteral("http"));
|
||||
url.setUserName(contents.username);
|
||||
url.setPassword(contents.password);
|
||||
if (!hostname.isEmpty())
|
||||
url.setHost(hostname);
|
||||
url.setPort(contents.port);
|
||||
return url;
|
||||
}
|
||||
|
||||
void XmlReader::generateUrl(const Effect *e, Action *a)
|
||||
{
|
||||
switch (a->aclass)
|
||||
{
|
||||
case AC_Standard:
|
||||
{
|
||||
QUrl url = createPreparedUrl(m_contents);
|
||||
QUrlQuery query;
|
||||
|
||||
switch (e->effectType)
|
||||
{
|
||||
case ET_Relay:
|
||||
{
|
||||
url.setPath(QStringLiteral("/relay.php"));
|
||||
query.addQueryItem(QStringLiteral("state"), QString::number(a->atype));
|
||||
query.addQueryItem(QStringLiteral("number"), QString::number(e->id));
|
||||
break;
|
||||
}
|
||||
case ET_BackgroundSound:
|
||||
{
|
||||
url.setPath(QStringLiteral("/bgsound.php"));
|
||||
query.addQueryItem(QStringLiteral("category"), categoryName(e->category));
|
||||
query.addQueryItem(QStringLiteral("sound"), QString::number(e->id));
|
||||
query.addQueryItem(QStringLiteral("vol"), QString::number(m_contents.bgSoundVolume));
|
||||
switch (a->atype)
|
||||
{
|
||||
case AT_Off:
|
||||
query.addQueryItem(QStringLiteral("control"), QStringLiteral("2"));
|
||||
break;
|
||||
case AT_On:
|
||||
query.addQueryItem(QStringLiteral("control"), QStringLiteral("1"));
|
||||
break;
|
||||
case AT_Infinite:
|
||||
query.addQueryItem(QStringLiteral("control"), QStringLiteral("3"));
|
||||
break;
|
||||
case AT_Flash:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
url.setQuery(query);
|
||||
a->url = url;
|
||||
DEBUG_LOG(m_logger) << "Effect " << e->name << ", Action '" << a->comment << "' now has URL: " << url.toString();
|
||||
break;
|
||||
}
|
||||
case AC_Repeat:
|
||||
{
|
||||
const RepeatAction *ra = static_cast<const RepeatAction *>(a);
|
||||
generateUrls(e, ra->actions);
|
||||
break;
|
||||
}
|
||||
case AC_Unset:
|
||||
case AC_Pause:
|
||||
case AC_Bsm:
|
||||
default:
|
||||
DEBUG_LOG(m_logger) << "Effect " << e->name << ", Action '" << a->comment << "' of Type " << a->aclass << " needs no URL";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void XmlReader::generateUrls(const Effect *e, const QVector<Action *> &actions)
|
||||
{
|
||||
for (Action *a : actions)
|
||||
generateUrl(e,a);
|
||||
}
|
||||
|
||||
|
||||
//QVector<Action *> Effect::getActionsByRange(int damagePercent) const
|
||||
//{
|
||||
// for (const Range *r : ranges)
|
||||
// {
|
||||
// if (r->fits(damagePercent))
|
||||
// return r->actions;
|
||||
// }
|
||||
// return {};
|
||||
//}
|
||||
|
||||
Range* Effect::getRangeByDamagePercent(int damagePercent) const
|
||||
{
|
||||
for (Range *r : ranges)
|
||||
{
|
||||
if (r->fits(damagePercent))
|
||||
return r;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QString XmlReader::categoryName(Category c)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case CT_BGS_Bahnhof:
|
||||
return QStringLiteral("bahnhof");
|
||||
case CT_BGS_Personen:
|
||||
return QStringLiteral("personen");
|
||||
case CT_BGS_Sonstige:
|
||||
return QStringLiteral("sonstige");
|
||||
case CT_BGS_Stadt:
|
||||
return QStringLiteral("stadt");
|
||||
case CT_BGS_Testsounds:
|
||||
return QStringLiteral("testsounds");
|
||||
case CT_BGS_Aircrafts:
|
||||
return QStringLiteral("Aircrafts");
|
||||
case CT_BGS_Battlefields:
|
||||
return QStringLiteral("Battlefields");
|
||||
case CT_BGS_Boats:
|
||||
return QStringLiteral("Boats");
|
||||
case CT_BGS_Explosions:
|
||||
return QStringLiteral("Explosions");
|
||||
case CT_BGS_Helicopter:
|
||||
return QStringLiteral("Helicopter");
|
||||
case CT_BGS_Motors_and_urban_traffic:
|
||||
return QStringLiteral("Motors_and_urban_traffic");
|
||||
case CT_BGS_InsideBuildings:
|
||||
return QStringLiteral("Inside_buildings");
|
||||
case CT_BGS_Vehicles:
|
||||
return QStringLiteral("Vehicles");
|
||||
case CT_Default:
|
||||
default:
|
||||
return QStringLiteral("Default");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // BuildingControlUnit
|
||||
@@ -0,0 +1,207 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Xml Reader for Effect Configuration
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2021-06-02
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include <ControlEffects/controleffects_export.h>
|
||||
|
||||
//#include <logger.h>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
#include <QXmlStreamReader>
|
||||
#include <QVector>
|
||||
#include <QUrl>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
|
||||
class HandelEffect;
|
||||
|
||||
enum EffectType
|
||||
{
|
||||
// Keep in sync with EffectType from bcu_types.h
|
||||
ET_Unset = 0,
|
||||
ET_Relay = 1, // EGCU
|
||||
ET_BackgroundSound = 2, // EGCU
|
||||
ET_BsmFlash = 3, // BSM
|
||||
};
|
||||
|
||||
enum EffectOverride
|
||||
{
|
||||
EO_Auto = -1,
|
||||
EO_Off = 0,
|
||||
EO_On = 1,
|
||||
};
|
||||
|
||||
enum ActionType
|
||||
{
|
||||
AT_Off = 0,
|
||||
AT_On = 1,
|
||||
AT_Infinite = 2,
|
||||
AT_Flash = 3
|
||||
};
|
||||
|
||||
enum ActionClass
|
||||
{
|
||||
AC_Unset,
|
||||
AC_Standard,
|
||||
AC_Repeat,
|
||||
AC_Pause,
|
||||
AC_Bsm
|
||||
};
|
||||
|
||||
enum Category
|
||||
{
|
||||
CT_Default = 0,
|
||||
CT_BGS_Bahnhof = 1,
|
||||
CT_BGS_Personen = 2,
|
||||
CT_BGS_Sonstige = 3,
|
||||
CT_BGS_Stadt = 4,
|
||||
CT_BGS_Testsounds = 5,
|
||||
CT_BGS_Aircrafts = 6,
|
||||
CT_BGS_Battlefields = 7,
|
||||
CT_BGS_Boats = 8,
|
||||
CT_BGS_Explosions = 9,
|
||||
CT_BGS_Helicopter = 10,
|
||||
CT_BGS_Motors_and_urban_traffic = 11,
|
||||
CT_BGS_InsideBuildings = 12,
|
||||
CT_BGS_Vehicles = 13
|
||||
// CT_RL_Testkategorie = 8 geht auch (RL=Relay): Dann kann man beide Namen je nach EffectType verwenden!
|
||||
};
|
||||
|
||||
class Action
|
||||
{
|
||||
public:
|
||||
Action(ActionClass ac = AC_Unset)
|
||||
: aclass(ac)
|
||||
{}
|
||||
|
||||
ActionClass aclass = AC_Unset;
|
||||
ActionType atype = AT_Off;
|
||||
QUrl url;
|
||||
QString comment;
|
||||
};
|
||||
|
||||
class RepeatAction : public Action
|
||||
{
|
||||
public:
|
||||
RepeatAction()
|
||||
: Action(AC_Repeat)
|
||||
{}
|
||||
|
||||
// -1 => Infinite. So we can skip on (count == 0) in HandelEffect.
|
||||
int count = -1;
|
||||
QVector<Action *> actions;
|
||||
};
|
||||
|
||||
class PauseAction : public Action
|
||||
{
|
||||
public:
|
||||
PauseAction()
|
||||
: Action(AC_Pause)
|
||||
{}
|
||||
|
||||
int pause = 0;
|
||||
};
|
||||
|
||||
class BsmAction : public Action
|
||||
{
|
||||
public:
|
||||
bool isNull() const { return (count == 0 && pause == 0 && pulses == 0); }// Should be enough...
|
||||
int count = 0;
|
||||
int pause = 0;
|
||||
int choplength = 0;
|
||||
int pulses = 0;
|
||||
int pulseduration = 0;
|
||||
BsmAction() : Action(AC_Bsm) {}
|
||||
};
|
||||
|
||||
class Range
|
||||
{
|
||||
public:
|
||||
inline bool fits(int value) const { return (min <= value && value <= max); }
|
||||
|
||||
int min = 0;
|
||||
int max = 100;
|
||||
bool restartOnChange = false;
|
||||
QVector<Action *> actions;
|
||||
};
|
||||
|
||||
class Effect
|
||||
{
|
||||
public:
|
||||
// QVector<Action *> getActionsByRange(int damagePercent) const;
|
||||
Range* getRangeByDamagePercent(int damagePercent) const;
|
||||
|
||||
EffectType effectType = ET_Unset;
|
||||
Category category = CT_Default;
|
||||
int id = 0;
|
||||
QString name;
|
||||
QVector<Range *> ranges;
|
||||
HandelEffect *effectHandler = nullptr;
|
||||
EffectOverride override = EO_Auto;
|
||||
|
||||
const QVector<Range *> constRanges() const { return ranges; }
|
||||
};
|
||||
|
||||
struct XmlContents
|
||||
{
|
||||
QVector<Effect *> effects;
|
||||
int hitSoundVolume = 50;
|
||||
|
||||
int bgSoundVolume = 50;
|
||||
QString username;
|
||||
QString password;
|
||||
int port = 80;
|
||||
int updateRelayState = 1000;
|
||||
|
||||
const QVector<Effect *> constEffects() const { return effects; }
|
||||
|
||||
QString toString() const
|
||||
{
|
||||
QString str(QStringLiteral("User: %1, Password: %2, Port: %3, BGSound Vol: %4, HitSound Vol: %5, No of Effects: %6"));
|
||||
return str.arg(username, password).arg(port).arg(bgSoundVolume).arg(hitSoundVolume).arg(effects.count());
|
||||
}
|
||||
};
|
||||
|
||||
class XmlReader : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit XmlReader(QObject *parent = nullptr);
|
||||
~XmlReader() = default;
|
||||
|
||||
static QUrl createPreparedUrl(const XmlContents &contents, const QString &hostname = QString());
|
||||
|
||||
bool init(const QString &effectConfigFile);
|
||||
XmlContents contents() const { return m_contents; }
|
||||
|
||||
private:
|
||||
void createHttpRequests();
|
||||
static QString categoryName(Category c);
|
||||
|
||||
Effect *parseEffect(QXmlStreamReader &xml);
|
||||
Range *parseRange(QXmlStreamReader &xml);
|
||||
Action *parseAction(QXmlStreamReader &xml);
|
||||
PauseAction *parsePauseAction(QXmlStreamReader &xml);
|
||||
RepeatAction *parseRepeatAction(QXmlStreamReader &xml);
|
||||
BsmAction* parseBsmAction(QXmlStreamReader &xml);
|
||||
Action *parseStandardAction(QXmlStreamReader &xml); // Can be BsmAction or Action alone
|
||||
|
||||
void generateUrls(const Effect *e, const QVector<Action *> &actions);
|
||||
void generateUrl(const Effect *e, Action *a);
|
||||
|
||||
XmlContents m_contents;
|
||||
//BuildingControlUnit::LOGGER_T m_logger;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
} // BuildingControlUnit
|
||||
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
SET(json_SRCS
|
||||
json_api.cpp
|
||||
json_api.h
|
||||
web_socket_handler.cpp
|
||||
web_socket_handler.h
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV BuildingControlJson SHARED ${json_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlJson
|
||||
PRIVATE
|
||||
Qt5::WebSockets
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
BuildingControlCommon
|
||||
BuildingControlBsm
|
||||
BuildingControlVwm
|
||||
)
|
||||
+284
@@ -0,0 +1,284 @@
|
||||
/**
|
||||
* Websocket C++ API for building control unit
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-30
|
||||
*/
|
||||
|
||||
#include "json_api.h"
|
||||
#include "web_socket_handler.h"
|
||||
#include "web_socket_telegrams.h"
|
||||
#include <QWebSocket>
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace Json
|
||||
{
|
||||
Api::Api(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_webSocketHandler(new WebSocketHandler(this))
|
||||
, m_logger(getLogger("Json.Api"))
|
||||
{
|
||||
connect(m_webSocketHandler, &WebSocketHandler::telegramReceived,
|
||||
this, &Api::onTelegramReceived);
|
||||
connect(m_webSocketHandler, &WebSocketHandler::webSocketConnected,
|
||||
this, &Api::webSocketConnected);
|
||||
}
|
||||
|
||||
bool Api::init(quint16 listenPort)
|
||||
{
|
||||
return m_webSocketHandler->init(listenPort);
|
||||
}
|
||||
|
||||
void Api::onHitResult(const HitResult &hitResult, const QMap<int, ContaminationState> &contaminationStates, bool playSound)
|
||||
{
|
||||
Q_UNUSED(playSound);
|
||||
sendHitResult(hitResult, contaminationStates, nullptr);
|
||||
}
|
||||
|
||||
void Api::sendHitResult(const HitResult &hitResult, const QMap <int, ContaminationState> &contaminationStates, QWebSocket *ws)
|
||||
{
|
||||
Telegrams::HitResult tele;
|
||||
tele.timestamp = hitResult.effectTimeMSec;
|
||||
tele.hitResult.sensorId = hitResult.sensorId;
|
||||
tele.hitResult.originatorId = hitResult.originatorId;
|
||||
tele.hitResult.originatorType = hitResult.originatorType;
|
||||
tele.hitResult.chargeTypeId = hitResult.chargeTypeId;
|
||||
tele.hitResult.damagePercentOld = hitResult.damagePercentOld;
|
||||
tele.hitResult.damagePercentNew = hitResult.damagePercentNew;
|
||||
tele.hitResult.effectSoundId = hitResult.effectSoundId;
|
||||
tele.hitResult.damageState = hitResult.damageState;
|
||||
tele.hitResult.rooms.reserve(hitResult.rooms.size());
|
||||
for (const HitRoom &hr : hitResult.rooms)
|
||||
{
|
||||
Telegrams::HitResult::HitRoomInfo hri;
|
||||
hri.roomId = hr.roomId;
|
||||
hri.damagePercent = hr.damagePercent;
|
||||
hri.remainingEffectPercent = hr.remainingEffectPercent;
|
||||
hri.fortifyFactor = hr.fortifyFactor;
|
||||
if (hr.directHit)
|
||||
tele.hitResult.hitOnRoomId = hr.roomId;
|
||||
tele.hitResult.rooms += hri;
|
||||
}
|
||||
for (const auto &cs : contaminationStates)
|
||||
{
|
||||
Telegrams::HitResult::ContaminationStateInfo csi;
|
||||
csi.aesId = cs.aesId;
|
||||
csi.rooms = cs.rooms;
|
||||
tele.hitResult.contaminations += csi;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << ", tele = " << tele.toJson();
|
||||
|
||||
m_webSocketHandler->sendTelegram(&tele, ws);
|
||||
}
|
||||
|
||||
void Api::onBsmState(const QVector<BSM::BsmState> &bsmStates)
|
||||
{
|
||||
sendBsmState(bsmStates, nullptr);
|
||||
}
|
||||
|
||||
void Api::onRelayState(const RelayState &relayState)
|
||||
{
|
||||
sendRelayState(relayState.hostname, relayState.stateTime, relayState.offlineTime, relayState.relayStates, nullptr);
|
||||
}
|
||||
|
||||
void Api::sendBsmState(const QVector<BSM::BsmState> &bsmStates, QWebSocket *ws)
|
||||
{
|
||||
Telegrams::BsmState tele;
|
||||
tele.timestamp = QDateTime::currentMSecsSinceEpoch();
|
||||
tele.bsmStates.reserve(bsmStates.size());
|
||||
Telegrams::BsmState::BsmStateInfo bsi;
|
||||
for (const BSM::BsmState &state : bsmStates)
|
||||
{
|
||||
bsi.connected = state.bConnected;
|
||||
bsi.hostname = state.hostname;
|
||||
bsi.id = state.id;
|
||||
bsi.port = state.port;
|
||||
bsi.versionInfo = state.versionInfo;
|
||||
tele.bsmStates += bsi;
|
||||
}
|
||||
m_webSocketHandler->sendTelegram(&tele, ws);
|
||||
}
|
||||
|
||||
void Api::sendRelayState(const QString &segment,
|
||||
const qint64 stateTime,
|
||||
const qint64 offlineTime,
|
||||
const QVector<RelayStateInfo> &relayStates,
|
||||
QWebSocket *ws)
|
||||
{
|
||||
Telegrams::RelayState tele;
|
||||
tele.segment = segment;
|
||||
tele.stateTime = stateTime;
|
||||
tele.offlineTime = offlineTime;
|
||||
Telegrams::RelayState::RelayStateInfo rsi;
|
||||
for (const RelayStateInfo &state : relayStates)
|
||||
{
|
||||
rsi.id = state.id;
|
||||
rsi.state = state.state;
|
||||
tele.relayStates += rsi;
|
||||
}
|
||||
m_webSocketHandler->sendTelegram(&tele, ws);
|
||||
}
|
||||
|
||||
void Api::sendEffectOverrides(const QString &segment,
|
||||
const qint64 stateTime,
|
||||
const qint64 offlineTime,
|
||||
const QVector<BcuEffectState> &effectOverrides,
|
||||
QWebSocket *ws)
|
||||
{
|
||||
Telegrams::EffectOverride tele;
|
||||
tele.segment = segment;
|
||||
tele.stateTime = stateTime;
|
||||
tele.offlineTime = offlineTime;
|
||||
Telegrams::EffectOverride::OverrideInfo rsi;
|
||||
for (const BcuEffectState &state : effectOverrides)
|
||||
{
|
||||
rsi.id = state.id;
|
||||
rsi.effectOverride = state.effectOverride;
|
||||
tele.overrides += rsi;
|
||||
}
|
||||
m_webSocketHandler->sendTelegram(&tele, ws);
|
||||
}
|
||||
|
||||
|
||||
void Api::onTelegramReceived(const std::shared_ptr<Telegrams::BaseTelegram> &tele)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "tele->telegramId(): " << tele->telegramId();
|
||||
|
||||
if (tele->telegramId() == Telegrams::SetDamageState::telegramId())
|
||||
{
|
||||
Telegrams::SetDamageState *sds = static_cast<Telegrams::SetDamageState *>(tele.get());
|
||||
emit damageStateRequest(sds->originatorId, sds->damageState, sds->roomIds);
|
||||
return;
|
||||
}
|
||||
|
||||
if (tele->telegramId() == Telegrams::ResetContaminationState::telegramId())
|
||||
{
|
||||
emit resetContaminationRequest();
|
||||
return;
|
||||
}
|
||||
|
||||
if (tele->telegramId() == Telegrams::SetContaminationState::telegramId())
|
||||
{
|
||||
Telegrams::SetContaminationState *scs = static_cast<Telegrams::SetContaminationState *> (tele.get());
|
||||
emit setContaminationStateRequest(scs->contaminationStates);
|
||||
return;
|
||||
}
|
||||
|
||||
if (tele->telegramId() == Telegrams::SetEffectStates::telegramId())
|
||||
{
|
||||
Telegrams::SetEffectStates *sff = static_cast<Telegrams::SetEffectStates *>(tele.get());
|
||||
QVector<BcuEffectState> val;
|
||||
val.reserve(sff->effectStates.size());
|
||||
for(const auto &fi : qAsConst(sff->effectStates))
|
||||
{
|
||||
BcuEffectState ff;
|
||||
ff.id = fi.id;
|
||||
ff.type = fi.type;
|
||||
ff.effectOverride = fi.effectOverride;
|
||||
val += ff;
|
||||
}
|
||||
emit setEffectStatesRequest(sff->segment, val);
|
||||
return;
|
||||
}
|
||||
if (tele->telegramId() == Telegrams::SwitchRelay::telegramId())
|
||||
{
|
||||
Telegrams::SwitchRelay *sff = static_cast<Telegrams::SwitchRelay *>(tele.get());
|
||||
|
||||
emit switchRelayRequest(sff->segment, sff->switchRelayValues);
|
||||
return;
|
||||
}
|
||||
|
||||
if (tele->telegramId() == Telegrams::SetFortifyFactor::telegramId())
|
||||
{
|
||||
Telegrams::SetFortifyFactor *sff = static_cast<Telegrams::SetFortifyFactor *>(tele.get());
|
||||
QVector<FortifyInfo> val;
|
||||
val.reserve(sff->fortifyFactors.size());
|
||||
for(const auto &fi : qAsConst(sff->fortifyFactors))
|
||||
{
|
||||
FortifyInfo ff;
|
||||
ff.roomId = fi.roomId;
|
||||
ff.fortifyFactor = fi.fortifyFactor;
|
||||
val += ff;
|
||||
}
|
||||
emit setFortifyFactorRequest(sff->originatorId, val);
|
||||
return;
|
||||
}
|
||||
if (tele->telegramId() == Telegrams::RelayState::telegramId())
|
||||
{
|
||||
Telegrams::RelayState *sff = static_cast<Telegrams::RelayState *>(tele.get());
|
||||
QVector<RelayStateInfo> val;
|
||||
val.reserve(sff->relayStates.size());
|
||||
for(const auto &fi : qAsConst(sff->relayStates))
|
||||
{
|
||||
RelayStateInfo ff;
|
||||
ff.id = fi.id;
|
||||
ff.state = fi.state;
|
||||
val += ff;
|
||||
}
|
||||
emit relayStatesRequest(sff->segment, val);
|
||||
return;
|
||||
}
|
||||
|
||||
if (tele->telegramId() == Telegrams::BsmTriggerFlashlight::telegramId())
|
||||
{
|
||||
Telegrams::BsmTriggerFlashlight *btf = static_cast<Telegrams::BsmTriggerFlashlight *>(tele.get());
|
||||
emit bsmTriggerFlashlightRequest(btf->sensorId, btf->hostname, btf->numberOfFlashes, btf->pauseBetweenFlashesSec);
|
||||
return;
|
||||
}
|
||||
if (tele->telegramId() == Telegrams::CentralEffectSimulationHit::telegramId())
|
||||
{
|
||||
Telegrams::CentralEffectSimulationHit *cesHit = static_cast<Telegrams::CentralEffectSimulationHit*>(tele.get());
|
||||
emit centralEffectSimulationHit(cesHit->effectTimeMSec, cesHit->chargeTypeId,
|
||||
cesHit->destructiveFactor, cesHit->penetrationFactor,
|
||||
cesHit->aesId,
|
||||
LtsUtils::QPoint3D(cesHit->relPosition.x, cesHit->relPosition.y, cesHit->relPosition.z),
|
||||
cesHit->properties);
|
||||
return;
|
||||
}
|
||||
if (tele->telegramId() == Telegrams::CentralEffectSimulationHit3D::telegramId())
|
||||
{
|
||||
Telegrams::CentralEffectSimulationHit3D *cesHit = static_cast<Telegrams::CentralEffectSimulationHit3D*>(tele.get());
|
||||
emit centralEffectSimulationHit3D(cesHit->effectTimeMSec, cesHit->chargeTypeId,
|
||||
cesHit->destructiveFactor, cesHit->penetrationFactor,
|
||||
cesHit->aesId,
|
||||
LtsUtils::QPoint3D(cesHit->impactPosition.x, cesHit->impactPosition.y, cesHit->impactPosition.z),
|
||||
LtsUtils::QPoint3D(cesHit->detonationLocation.x, cesHit->detonationLocation.y, cesHit->detonationLocation.z),
|
||||
cesHit->detonationDistance,
|
||||
cesHit->properties);
|
||||
return;
|
||||
}
|
||||
if (tele->telegramId() == Telegrams::DebugSimulateBSMHit::telegramId())
|
||||
{
|
||||
Telegrams::DebugSimulateBSMHit *bsmHit = static_cast<Telegrams::DebugSimulateBSMHit*>(tele.get());
|
||||
qint64 effectTimeMSec = bsmHit->effectTimeMSec ? bsmHit->effectTimeMSec : QDateTime::currentMSecsSinceEpoch();
|
||||
emit simulateBSMHit(effectTimeMSec, bsmHit->sensorId, bsmHit->originatorId, bsmHit->chargeTypeId, bsmHit->deposition1, bsmHit->deposition2);
|
||||
return;
|
||||
}
|
||||
if (tele->telegramId() == Telegrams::GetBsmConfiguration::telegramId())
|
||||
{
|
||||
Telegrams::GetBsmConfiguration *tel = static_cast<Telegrams::GetBsmConfiguration*>(tele.get());
|
||||
emit getBsmConfiguration(tel->sensorId);
|
||||
return;
|
||||
}
|
||||
if (tele->telegramId() == Telegrams::GetBsmBitTimeout::telegramId())
|
||||
{
|
||||
Telegrams::GetBsmBitTimeout *tel = static_cast<Telegrams::GetBsmBitTimeout*>(tele.get());
|
||||
emit getBsmBitTimeout(tel->sensorId);
|
||||
return;
|
||||
}
|
||||
if (tele->telegramId() == Telegrams::GetBsmTechnicalStatus::telegramId())
|
||||
{
|
||||
Telegrams::GetBsmTechnicalStatus *tel = static_cast<Telegrams::GetBsmTechnicalStatus*>(tele.get());
|
||||
emit getBsmTechnicalStatus(tel->sensorId);
|
||||
return;
|
||||
}
|
||||
WARNING_LOG(m_logger) << "Received unhandled telegram " << tele->telegramId();
|
||||
}
|
||||
|
||||
|
||||
} // namespace Json
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
* Websocket C++ API for building control unit
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-30
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <Json/buildingcontroljson_export.h>
|
||||
#include <VWM/vwm_types.h>
|
||||
#include <BSM/bsm_types.h>
|
||||
#include <logger.h>
|
||||
#include <memory>
|
||||
#include <bcu_types.h>
|
||||
|
||||
class QWebSocket;
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace Json
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BaseTelegram;
|
||||
}
|
||||
class WebSocketHandler;
|
||||
class BUILDINGCONTROLJSON_EXPORT Api : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Api(QObject *parent = nullptr);
|
||||
|
||||
bool init(quint16 listenPort);
|
||||
|
||||
void sendHitResult(const HitResult &hitResult, const QMap<int, ContaminationState> &contaminationStates, QWebSocket *ws);
|
||||
void sendBsmState(const QVector<BSM::BsmState> &bsmStates, QWebSocket *ws);
|
||||
void sendRelayState(const QString &segment,
|
||||
const qint64 stateTime,
|
||||
const qint64 offlineTime,
|
||||
const QVector<RelayStateInfo> &relayStates,
|
||||
QWebSocket *ws);
|
||||
void sendEffectOverrides(const QString &segment,
|
||||
const qint64 stateTime,
|
||||
const qint64 offlineTime,
|
||||
const QVector<BcuEffectState> &effectOverrides,
|
||||
QWebSocket *ws);
|
||||
public Q_SLOTS:
|
||||
void onHitResult(const HitResult &hitResult, const QMap<int, ContaminationState> &contaminationStates, bool playSound);
|
||||
void onBsmState(const QVector<BSM::BsmState> &bsmStates);
|
||||
void onRelayState(const RelayState &relayState);
|
||||
Q_SIGNALS:
|
||||
void damageStateRequest(int originatorId, DamageState damageState, const QVector<int> &roomIds);
|
||||
void setContaminationStateRequest(const std::vector<BuildingControlUnit::ContaminationState> &contaminationStates);
|
||||
void resetContaminationRequest();
|
||||
void setEffectStatesRequest( const QString &hostname, const QVector<BcuEffectState> &effectStates);
|
||||
void switchRelayRequest( const QString &hostname, const SwitchRelayValues &switchRelayValues);
|
||||
void setFortifyFactorRequest(int originatorId, const QVector<FortifyInfo> &foritfyInfos);
|
||||
void relayStatesRequest(const QString &hostname, const QVector<RelayStateInfo> &RelayStateInfos);
|
||||
void bsmTriggerFlashlightRequest(int sensorId, const QString &hostname, int numberOfFlashes, int pauseBetweenFlashesSec);
|
||||
// tasInd
|
||||
void centralEffectSimulationHit(const qint64 effectTimeMSec, const int chargeTypeId,
|
||||
const int destructiveFactor, const int penetrationFactor,
|
||||
const int aesId, const LtsUtils::QPoint3D &relImpact,
|
||||
const QString &properties);
|
||||
void centralEffectSimulationHit3D(const qint64 effectTimeMSec, const int chargeTypeId,
|
||||
const int destructiveFactor, const int penetrationFactor,
|
||||
const int aesId, const LtsUtils::QPoint3D &relImpact,
|
||||
const LtsUtils::QPoint3D &relDetonationLocation,
|
||||
const double detonationDistance,
|
||||
const QString &properties);
|
||||
// debug - simulate BSM hit
|
||||
void simulateBSMHit(qint64 timeMSec, int sensorId, int originatorId,
|
||||
int chargeTypeId, int deposition1, int deposition2);
|
||||
// request status for a bsm
|
||||
void getBsmConfiguration(int sensorId);
|
||||
void getBsmBitTimeout(int sensorId);
|
||||
void getBsmTechnicalStatus(int sensorId);
|
||||
void webSocketConnected(QWebSocket *ws);
|
||||
private Q_SLOTS:
|
||||
void onTelegramReceived(const std::shared_ptr<Telegrams::BaseTelegram> &tele);
|
||||
private:
|
||||
WebSocketHandler *m_webSocketHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace Json
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* Websocket interface for building control unit
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-30
|
||||
*/
|
||||
|
||||
#include "web_socket_handler.h"
|
||||
#include "web_socket_telegrams.h"
|
||||
#include <QWebSocket>
|
||||
#include <iostream>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace Json
|
||||
{
|
||||
WebSocketHandler::WebSocketHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("BCU"), QWebSocketServer::NonSecureMode, this))
|
||||
, m_logger(getLogger("Json.WebSocketHandler"))
|
||||
{}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
for (QWebSocket *s : qAsConst(m_webSockets))
|
||||
{
|
||||
s->disconnect(this);
|
||||
s->close();
|
||||
}
|
||||
qDeleteAll(m_webSockets);
|
||||
}
|
||||
|
||||
bool WebSocketHandler::init(quint16 listenPort)
|
||||
{
|
||||
if (!m_webSocketServer->listen(QHostAddress::Any, listenPort))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not listen on port " << listenPort << " - aborting";
|
||||
return false;
|
||||
}
|
||||
// inform calling process via stdout about the port/url
|
||||
std::cout << "web socket listen port: " << m_webSocketServer->serverPort() << std::endl;
|
||||
std::cout << "web socket url: " << m_webSocketServer->serverUrl().toString() << std::endl;
|
||||
connect(m_webSocketServer, &QWebSocketServer::newConnection,
|
||||
this, &WebSocketHandler::onNewConnection);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WebSocketHandler::sendTelegram(const Telegrams::BaseTelegram *tele, QWebSocket *wsDirect)
|
||||
{
|
||||
if (!isConnected() || !tele)
|
||||
return false;
|
||||
|
||||
const QString jsonStr = QString::fromUtf8(tele->toJson());
|
||||
DEBUG_LOG(m_logger) << "jsonStr" << jsonStr;
|
||||
|
||||
bool bOk = false;
|
||||
for (QWebSocket *ws : qAsConst(m_webSockets))
|
||||
{
|
||||
if (wsDirect != nullptr && wsDirect != ws)
|
||||
continue;
|
||||
if (ws->sendTextMessage(jsonStr))
|
||||
bOk = true;
|
||||
}
|
||||
|
||||
return bOk;
|
||||
}
|
||||
|
||||
|
||||
void WebSocketHandler::onNewConnection()
|
||||
{
|
||||
QWebSocket *ws = m_webSocketServer->nextPendingConnection();
|
||||
if (!ws)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << "New websocket connection from " << ws->peerAddress().toString() << ":" << ws->peerPort();
|
||||
|
||||
connect(ws, &QWebSocket::textMessageReceived,
|
||||
this, &WebSocketHandler::onTextMessageReceived);
|
||||
connect(ws, &QWebSocket::disconnected,
|
||||
this, &WebSocketHandler::onWebSocketDisconnected);
|
||||
|
||||
m_webSockets += ws;
|
||||
|
||||
emit webSocketConnected(ws);
|
||||
}
|
||||
|
||||
void WebSocketHandler::onTextMessageReceived(const QString &msg)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "new text message: " << msg;
|
||||
auto tele = std::shared_ptr<Telegrams::BaseTelegram>(Telegrams::BaseTelegram::telegramFromJson(msg.toUtf8()));
|
||||
if (!tele)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Error parsing incoming json data: '" << msg << "'";
|
||||
return;
|
||||
}
|
||||
emit telegramReceived(tele);
|
||||
}
|
||||
|
||||
void WebSocketHandler::onWebSocketDisconnected()
|
||||
{
|
||||
QWebSocket *ws = qobject_cast<QWebSocket *>(sender());
|
||||
if (!ws)
|
||||
return;
|
||||
m_webSockets.remove(ws);
|
||||
ws->deleteLater();
|
||||
}
|
||||
|
||||
} // namespace Json
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* Websocket interface for building control unit
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-30
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QQueue>
|
||||
#include <QWebSocketServer>
|
||||
#include <memory>
|
||||
#include <logger.h>
|
||||
|
||||
namespace BuildingControlUnit
|
||||
{
|
||||
namespace Json
|
||||
{
|
||||
namespace Telegrams
|
||||
{
|
||||
class BaseTelegram;
|
||||
}
|
||||
|
||||
class WebSocketHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WebSocketHandler(QObject *parent = nullptr);
|
||||
~WebSocketHandler();
|
||||
|
||||
bool init(quint16 listenPort);
|
||||
|
||||
bool isConnected() const
|
||||
{
|
||||
return !m_webSockets.isEmpty();
|
||||
}
|
||||
bool sendTelegram(const Telegrams::BaseTelegram *tele, QWebSocket *wsDirect);
|
||||
|
||||
Q_SIGNALS:
|
||||
void telegramReceived(const std::shared_ptr<Telegrams::BaseTelegram> &tele);
|
||||
void webSocketConnected(QWebSocket *ws);
|
||||
private Q_SLOTS:
|
||||
void onNewConnection();
|
||||
void onWebSocketDisconnected();
|
||||
void onTextMessageReceived(const QString &msg);
|
||||
private:
|
||||
QWebSocketServer *m_webSocketServer;
|
||||
QSet<QWebSocket *> m_webSockets;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace Json
|
||||
} // namespace BuildingControlUnit
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
#BLDGS="1103"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep WARN /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BLDGS="A2 A3a A3b A3c A4a A4b A4c A4d A5 A6a A6b A6c A7 B1 B2 B3 B4 B5 B6 B7 B8 B9a B9b B9c B9d B9e B9f B9g B9h B9i B9j B9k B9l B9m B9n B9o B9p B9q B9r B10a B10b B10c B10d B10e B10f B10g B10h B10i B10j B10k B10l B10m B10n B11a B11b B11c B11d"
|
||||
|
||||
#BLDGS="A2"
|
||||
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
#/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshesAHTC/opt/BuildingModels/StaticMeshes//bldg_BN_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshesAHTC/opt/BuildingModels/StaticMeshes//bldg_BN_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
#BLDGS="1113 " # 1113 1124 1136 1142
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+66
@@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
#BLDGS="1131 1147 1153" # 1131 1147 1153
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
#BLDGS="1131 1147 1153" # 1131 1147 1153
|
||||
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+72
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+84
@@ -0,0 +1,84 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+95
@@ -0,0 +1,95 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5322.55687.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+101
@@ -0,0 +1,101 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5373.55687.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+107
@@ -0,0 +1,107 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-26_rev5418.55750.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "------------------------------------";
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
Executable
+120
@@ -0,0 +1,120 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+125
@@ -0,0 +1,125 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
# zip bldgs_2021-12-03_rev5693.55881.zip import_baX_2021-12-03.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+130
@@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+133
@@ -0,0 +1,133 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+139
@@ -0,0 +1,139 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# 1102 -> 4 Aussentreppen
|
||||
# 1107 -> Aussentreppen
|
||||
# 3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach'
|
||||
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
|
||||
#bldg_1234: Raum 106, 115, 206, 215 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stuife ich es als akzeptabel ein.
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+152
@@ -0,0 +1,152 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
|
||||
#BLDGS="4127"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+161
@@ -0,0 +1,161 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
# cat import_baX_2022-01-05.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-05_rev5791.55881.zip import_baX_2021-12-17.csv 1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153BLDGS="1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153* 3154* 3155* 3156* 3157* 3158* 3159* 3160* 3161*
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
|
||||
#BLDGS="3138"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg_1242: 2103, 2203, 2302 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3160: 2105, 2204 -> Aussentreppe
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+167
@@ -0,0 +1,167 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
# cat import_baX_2022-01-05.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-05_rev5791.55881.zip import_baX_2022-01-05.csv 1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153BLDGS="1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153* 3154* 3155* 3156* 3157* 3158* 3159* 3160* 3161*
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
# 12-01-2022
|
||||
# cat import_baX_2022-01-12.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-12_rev5791.55881.zip import_baX_2022-01-12.csv 0910* 2100* 2101* 2205* 3162* 3163* 3164* 3165* 3166* 3167* 3168* 3169* 3170* 3171* 3172* 3173* 3174* 3175* 3176* 3177* 3178* 3179* 3180* 3181* 3182* 3183* 3184* 3185* 3186* 3187* 3188* 3189* 3190* 3254* 4115* 4147* 4155* 4194*
|
||||
BLDGS="0910 2100 2101 2205 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3254 4115 4147 4155 4194"
|
||||
|
||||
|
||||
#BLDGS="0910"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg_1242: 2103, 2203, 2302 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3160: 2105, 2204 -> Aussentreppe
|
||||
#bldg_3164: Aussentreppe OUT OF FOOTPRINT. Center von 2204 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+174
@@ -0,0 +1,174 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
# cat import_baX_2022-01-05.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-05_rev5791.55881.zip import_baX_2022-01-05.csv 1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153BLDGS="1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153* 3154* 3155* 3156* 3157* 3158* 3159* 3160* 3161*
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
# 12-01-2022
|
||||
# cat import_baX_2022-01-12.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-12_rev5791.55881.zip import_baX_2022-01-12.csv 0910* 2100* 2101* 2205* 3162* 3163* 3164* 3165* 3166* 3167* 3168* 3169* 3170* 3171* 3172* 3173* 3174* 3175* 3176* 3177* 3178* 3179* 3180* 3181* 3182* 3183* 3184* 3185* 3186* 3187* 3188* 3189* 3190* 3254* 4115* 4147* 4155* 4194*
|
||||
BLDGS="0910 2100 2101 2205 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3254 4115 4147 4155 4194"
|
||||
|
||||
# 14-01-2022
|
||||
# cat import_baX_2022-01-14.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-14_rev5791.55881.zip import_baX_2022-01-14.csv 2106* 2107* 2108* 2109* 2110* 2112* 2116* 2117* 2118* 2121* 2122* 3191* 3192* 3193* 3194* 3195* 3196* 3197* 3198* 3199* 3200* 3201* 3202* 3203* 3204* 3205* 3206* 3207* 3208* 3209* 3210* 3211* 3212* 3213* 3214* 3215* 3216* 3217* 3218* 3221* 3223* 3225* 3286* 3301* 4103* 4118* 4119* 4120* 4121* 4122* 4123* 4124* 4130*
|
||||
BLDGS="2106 2107 2108 2109 2110 2112 2116 2117 2118 2121 2122 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3221 3223 3225 3286 3301 4103 4118 4119 4120 4121 4122 4123 4124 4130"
|
||||
|
||||
|
||||
###BLDGS="4127"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg_1242: 2103, 2203, 2302 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3160: 2105, 2204 -> Aussentreppe
|
||||
#bldg_3164: Aussentreppe OUT OF FOOTPRINT. Center von 2204 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_3207: 2101 OUT OF FOOTPRINT Aussentreppe
|
||||
#bldg_3213: 2102, 2202 OUT OF FOOTPRINT Aussentreppe
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
Executable
+178
@@ -0,0 +1,178 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id: BuildingControlTestVwmXml_Nachbarbeitung2022-01-14.sh 57200 2022-05-24 10:39:44Z karwat $
|
||||
# $HeadURL: svn://192.168.133.21/TDS/branches/product/features/3dws_devel/Lts/Proxies/Buildings/BuildingControlUnit/VWM/BuildingControlTestVwmXml_Nachbarbeitung2022-01-14.sh $
|
||||
# $Author: karwat $
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# 29-10-2021: ----
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
# 03-11-2021: ----
|
||||
# zip bldgs_2021-11-03_rev5028 import_ba1_2021-11-03.csv bldg_1127* bldg_1129* bldg_1131* bldg_1133* bldg_1135* bldg_1137* bldg_1139* bldg_1141* bldg_1143* bldg_1144* bldg_1145* bldg_1146* bldg_1147* bldg_1153* bldg_1158* bldg_1167*
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
# 05-11-2021: ----
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
# 10-11-2021
|
||||
# zip bldgs_2021-11-10_rev5135XXXX.zip import_ba1_2021-11-10.csv bldg_1174* bldg_1175* bldg_1176* bldg_1177* bldg_1178* bldg_1179* bldg_1180* bldg_1181* bldg_1182* bldg_1183* bldg_1185* bldg_1188* bldg_1191* bldg_1193* bldg_1194* bldg_1195* bldg_1196* bldg_1201* bldg_1202* bldg_1203* bldg_1204* bldg_1210* bldg_1211*
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
# zip bldgs_2021-11-12_rev5157.zip import_ba1_2021-11-12.csv bldg_1213* bldg_1215* bldg_1216* bldg_1217* bldg_1218* bldg_1219* bldg_1220* bldg_1221* bldg_1222* bldg_1223* bldg_1225* bldg_1226* bldg_1227*
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
# zip bldgs_2021-11-17_rev5217.55642.zip import_ba1_2021-11-17.csv bldg_1224* bldg_1228* bldg_1229* bldg_1230* bldg_1231* bldg_1232* bldg_1235* bldg_1237* bldg_1239* bldg_1241* bldg_1243*
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
# zip bldgs_2021-11-19_rev5219.XXX.zip import_ba1_2021-11-19.csv bldg_1197* bldg_1207* bldg_1234* bldg_1238* bldg_1240* bldg_1244* bldg_1245* bldg_1246* bldg_1248* bldg_1249* bldg_1257* bldg_1258* bldg_1259*
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
# zip bldgs_2021-11-24_rev5297.XXX.zip import_baX_2021-11-24.csv bldg_1165* bldg_1208* bldg_1209* bldg_1212* bldg_1236* bldg_1253* bldg_1260* bldg_1261* bldg_1262* bldg_1265* bldg_3103*
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
# zip bldgs_2021-11-16_revXXXX.zip import_baX_2021-11-26.csv bldg_1253* bldg_1254* bldg_1255* bldg_1269* bldg_1270* bldg_1271* bldg_1273* bldg_1274* bldg_1276* bldg_1277* bldg_1278* bldg_1279* bldg_1280* bldg_1283* bldg_3104* bldg_3105* bldg_3106* bldg_3107*"
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
# zip bldgs_2021-12-10_rev5421.55750.zip import_baX_2021-12-01.csv bldg_1256* bldg_1268* bldg_1275* bldg_1281* bldg_1282* bldg_3108* bldg_3109* bldg_3110* bldg_3111* bldg_3112* bldg_3113* bldg_3114* bldg_3115* bldg_3116* bldg_3117* bldg_3118* bldg_3119* bldg_3121* bldg_3122*
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-03_rev5424.55750.zip import_baX.csv bldg_1251* bldg_1264* bldg_3220* bldg_3222* bldg_3224* bldg_3226* bldg_3228* bldg_3229* bldg_3266*
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
# cat import_baX_2021-12-08.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-08_rev56xx.55750.zip import_baX.csv
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
# cat import_baX_2021-12-10.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
# 15-12-2021
|
||||
# cat import_baX_2021-12-15.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
|
||||
#zip bldgs_2021-12-15_rev5693.55881.zip import_baX_2021-12-15.csv bldg_3120* bldg_3123* bldg_3124* bldg_3129* bldg_3132* bldg_3136* bldg_3246* bldg_3248* bldg_3249* bldg_3256* bldg_3257* bldg_3258* bldg_3259* bldg_3260* bldg_3261* bldg_3263* bldg_3268* bldg_3278* bldg_3281* bldg_3282* bldg_3283* bldg_3284* bldg_3285* bldg_3287* bldg_3288* bldg_3289* bldg_3290* bldg_3291* bldg_3292* bldg_3293* bldg_3294* bldg_3295* bldg_4108* bldg_4113* bldg_4133* bldg_4141* bldg_4145* bldg_4146* bldg_4150* bldg_4151* bldg_4152* bldg_4153* bldg_4154* bldg_4156* bldg_4157* bldg_4158* bldg_4159* bldg_4160* bldg_4161* bldg_4162* bldg_4164* bldg_4165* bldg_4166* bldg_4167* bldg_4168* bldg_4169* bldg_4170* bldg_4171* bldg_4172* bldg_4173* bldg_4174* bldg_4175* bldg_4176* bldg_4177* bldg_4178* bldg_4179* bldg_4180* bldg_4183* bldg_4184* bldg_4185* bldg_4186* bldg_4187* bldg_4188* bldg_4189* bldg_4190* bldg_4191* bldg_4192* bldg_4193*
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
|
||||
# 17-12-2021
|
||||
# cat import_baX_2021-12-17.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2021-12-17_rev5791.55881.zip import_baX_2021-12-17.csv bldg_1205* bldg_1250* bldg_1272* bldg_3125* bldg_3126* bldg_3127* bldg_3128* bldg_3133* bldg_3234* bldg_3141* bldg_3141* bldg_3234* bldg_3235* bldg_3236* bldg_3237* bldg_3238* bldg_3239* bldg_3240* bldg_3244* bldg_3245* bldg_3247* bldg_3250* bldg_3251* bldg_3252* bldg_3253* bldg_3255* bldg_3265* bldg_3271* bldg_3274* bldg_3277* bldg_3296* bldg_3297* bldg_4104* bldg_4105* bldg_4109* bldg_4110* bldg_4114* bldg_4135* bldg_4136* bldg_4142* bldg_4163* bldg_4181* bldg_4182* bldg_4194* bldg_4196*
|
||||
BLDGS="1205 1250 1272 3125 3126 3127 3128 3133 3134 3141_26 3141_27 3234 3235 3236 3237 3238 3239 3240 3244 3245 3247 3250 3251 3252 3253 3255 3265 3271 3274 3277 3296 3297 4104 4105 4109 4110 4114 4135 4136 4142 4163 4181 4182 4194 4196"
|
||||
|
||||
# 05-01-2022
|
||||
# cat import_baX_2022-01-05.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-05_rev5791.55881.zip import_baX_2022-01-05.csv 1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153BLDGS="1148* 1150* 1151* 1152* 1154* 1155* 1156* 1157* 1169* 1171* 1214* 1242* 1247* 1263* 1284* 3137* 3138* 3139* 3140* 3142* 3143* 3144* 3148* 3149* 3150* 3151* 3152* 3153* 3154* 3155* 3156* 3157* 3158* 3159* 3160* 3161*
|
||||
BLDGS="1148 1150 1151 1152 1154 1155 1156 1157 1169 1171 1214 1242 1247 1263 1284 3137 3138 3139 3140 3142 3143 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161"
|
||||
|
||||
# 12-01-2022
|
||||
# cat import_baX_2022-01-12.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-12_rev5791.55881.zip import_baX_2022-01-12.csv 0910* 2100* 2101* 2205* 3162* 3163* 3164* 3165* 3166* 3167* 3168* 3169* 3170* 3171* 3172* 3173* 3174* 3175* 3176* 3177* 3178* 3179* 3180* 3181* 3182* 3183* 3184* 3185* 3186* 3187* 3188* 3189* 3190* 3254* 4115* 4147* 4155* 4194*
|
||||
BLDGS="0910 2100 2101 2205 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3254 4115 4147 4155 4194"
|
||||
|
||||
# 14-01-2022
|
||||
# cat import_baX_2022-01-14.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
# zip bldgs_2022-01-14_rev5791.55881.zip import_baX_2022-01-14.csv 2106* 2107* 2108* 2109* 2110* 2112* 2116* 2117* 2118* 2121* 2122* 3191* 3192* 3193* 3194* 3195* 3196* 3197* 3198* 3199* 3200* 3201* 3202* 3203* 3204* 3205* 3206* 3207* 3208* 3209* 3210* 3211* 3212* 3213* 3214* 3215* 3216* 3217* 3218* 3221* 3223* 3225* 3286* 3301* 4103* 4118* 4119* 4120* 4121* 4122* 4123* 4124* 4130*
|
||||
BLDGS="2106 2107 2108 2109 2110 2112 2116 2117 2118 2121 2122 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3221 3223 3225 3286 3301 4103 4118 4119 4120 4121 4122 4123 4124 4130"
|
||||
|
||||
|
||||
###BLDGS="4127"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
#BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287"
|
||||
#BLDGS="1101 1102"
|
||||
|
||||
BLDGS="1104"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} bldg_${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build-3dws/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/bldg_${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep..";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
# bldg_1102 -> 4 Aussentreppen
|
||||
# bldg_1107 -> Aussentreppen
|
||||
# bldg_3280 -> Aussentreppen
|
||||
# U_Bahn -> 6 Fehler 2102 2114 2131 2202 2206 2210 (Räume ohne 'Dach')
|
||||
|
||||
#bldg_1208 Raum 109 ist über Eck gebaut -> daher keinen Treffer
|
||||
#bdlg_1221 ist über Eck gebaut. Center von 301 erzielt daher keinen Treffer
|
||||
#bldg_1232 ist über Eck gebaut. Center von 110, 210, 301 erzielen daher keinen Treffer
|
||||
#bldg_1234: Raum 106, 115, 206, 215, 304 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_1239: 2108, 2207 -> Aussentreppe
|
||||
#bldg_1240: 2104, 2202 -> Aussentreppe
|
||||
#bldg_1242: 2103, 2203, 2302 -> Aussentreppe
|
||||
#bldg 1244: Raum 108, 202 ist Aussentreppe
|
||||
#bldg 1254: RefMode/BSM 11008 ist an einem Geländer angebracht. Trifft aber keinen Raum (auch nicht 301) Da es ein Geländer ist, stufe ich es als akzeptabel ein.
|
||||
|
||||
#bldg_3132: Raum 2114, 2214, 2314, 2401 sind über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3133: Krankenhaus: 2309 ist über Eck gebaut -> erzielen daher keinen Treffer
|
||||
#bldg_3160: 2105, 2204 -> Aussentreppe
|
||||
#bldg_3164: Aussentreppe OUT OF FOOTPRINT. Center von 2204 erzielt daher keinen Treffer
|
||||
|
||||
#bldg_3264: Raum 2102 ist ein Innenhof -> according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177 -> Aussentreppe according outterWalls (#=55) are vertical?
|
||||
|
||||
#bldg_3207: 2101 OUT OF FOOTPRINT Aussentreppe
|
||||
#bldg_3213: 2102, 2202 OUT OF FOOTPRINT Aussentreppe
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
SET(vwm_SRCS
|
||||
vwm_api.cpp
|
||||
vwm_api.h
|
||||
vwm_building.cpp
|
||||
vwm_building.h
|
||||
vwm_building_room_geometry.cpp
|
||||
vwm_building_room_geometry.h
|
||||
vwm_deposition.cpp
|
||||
vwm_deposition.h
|
||||
vwm_math.cpp
|
||||
vwm_math.h
|
||||
vwm_state_store.cpp
|
||||
vwm_state_store.h
|
||||
vwm_types.h
|
||||
vwm_xml_reader.cpp
|
||||
vwm_xml_reader.h
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV BuildingControlVwm SHARED ${vwm_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlVwm
|
||||
PRIVATE
|
||||
ngltools
|
||||
Qt5::Xml
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
LtsUtilsCoreHeaderOnly
|
||||
BuildingControlCommon
|
||||
)
|
||||
################################
|
||||
### Test
|
||||
################################
|
||||
NGL_ADD_EXECUTABLE(AAR SV BuildingControlTestVwm test_read_xml.cpp test_read_xml.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlTestVwm
|
||||
NGLLogger
|
||||
ngltools
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Xml
|
||||
Qt5::Core
|
||||
BuildingControlCommon
|
||||
BuildingControlVwm
|
||||
nglcoreapplication
|
||||
LtsCoordTrans
|
||||
)
|
||||
NGL_ADD_EXECUTABLE(AAR SV BuildingControlTestVwmXml test_vwm_xml.cpp)
|
||||
NGL_TARGET_LINK_LIBRARIES(BuildingControlTestVwmXml
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Xml
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
BuildingControlVwm
|
||||
BuildingControlCommon
|
||||
nglcoreapplication
|
||||
)
|
||||
|
||||
IF(BUILD_TESTING AND TARGET BuildingControlVwm)
|
||||
SET(test_SRCS
|
||||
vwm_math_unit_test.cpp
|
||||
vwm_math_unit_test.h
|
||||
)
|
||||
ADD_EXECUTABLE(bld_vwm_math_unit_test ${test_SRCS})
|
||||
TARGET_LINK_LIBRARIES(bld_vwm_math_unit_test
|
||||
Qt5::Gui
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
BuildingControlVwm
|
||||
BuildingControlCommon
|
||||
nglcoreapplication
|
||||
)
|
||||
ADD_TEST(NAME bld_vwm_math_unit_test COMMAND $<TARGET_FILE:bld_vwm_math_unit_test>)
|
||||
ENDIF()
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1101"
|
||||
|
||||
COORDS=""
|
||||
|
||||
#COORDS="${COORDS} HeAz_${BLDG}Dach_11;371;0.202554;0.916096"
|
||||
#COORDS="${COORDS} Annz_${BLDG}Dach_12;382;0.202554;0.916096"
|
||||
#COORDS="${COORDS} Annz_${BLDG}Dach_13;382;0.202554;0.916096"
|
||||
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202554;0.916096"
|
||||
|
||||
# SekundaerWirkung
|
||||
COORDS="${COORDS} HeAz_${BLDG}Dach_SekWirk;371;0.20255028;0.91609673"
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
#libreoffice $FILE &
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1101"
|
||||
|
||||
COORDS=""
|
||||
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202554;0.916096"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.202554;0.916096"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.202554;0.916096"
|
||||
# Verteilt über das Dach
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202550;0.916097"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.202551;0.916097"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.202552;0.916097"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_14;371;0.202553;0.916096"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_15;371;0.202554;0.916096"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_16;371;0.202549;0.9160965"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_17;371;0.202550;0.9160964"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_18;371;0.202551;0.9160962"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_19;371;0.202552;0.9160960"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_20;371;0.202553;0.9160959"
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1108"
|
||||
|
||||
COORDS=""
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_14;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_15;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_16;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_17;371;0.202567;0.91609"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_18;371;0.202567;0.91609"
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1115"
|
||||
|
||||
COORDS=""
|
||||
|
||||
# Verteilt über das Dach
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.2025585;0.9160916"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.2025580;0.9160911"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.2025589;0.9160907"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_14;371;0.2025585;0.9160904"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_15;371;0.2025582;0.9160907"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_16;371;0.2025588;0.9160913"
|
||||
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
#sleep 5
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="1116"
|
||||
|
||||
COORDS=""
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;0.202561;0.916094"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;0.202561;0.916094"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;0.202561;0.916094"
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="3101"
|
||||
|
||||
COORDS=""
|
||||
|
||||
# Verteilt über das Dach
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_11;371;32_U_PD_77232_18568"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_12;371;32_U_PD_77232_18562"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_13;371;32_U_PD_77232_18556" # Outside??? -> 2113
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_14;371;32_U_PD_77232_18550"
|
||||
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_15;371;32_U_PD_77226_18559"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}Dach_16;371;32_U_PD_77240_18559"
|
||||
|
||||
# UnitTest :
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Dach_XX;371;32_U_PD_77230_18558" # U_PD_77230_18558 -> 2608
|
||||
# ->
|
||||
# 2021-11-04 10:56:54.006 INFO BCU::VWM::Math
|
||||
# |#| XXXXX Searching nearest room for bsm position (7.82166,6.2496,10000), bsmViewDirection (0,0,1), hit direction (-0,-0,-1), #rooms = 62 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:453)
|
||||
# |#| XXXXX nearest distance = 9983.21 on outer wall in room 2608room[2608] wall[1] wallElement[0] (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:533)
|
||||
## ^^^^^
|
||||
# |#| XXXXX nearest distance = 9983.21 on outer wall in room 2701room[2701] wall[12] wallElement[0] (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:533)
|
||||
# |#| XXXXX HitPosition: HitPosition::State::OuterWall, roomId = 2701, outerWallIndex = 12, exclusionZoneIndex = -1 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:540)
|
||||
# |#| XXXXX Searching hit position for position (7.82166,6.2496,10000), direction (-0,-0,-1), #rooms = 62 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:364)
|
||||
# |#| XXXXX HitPosition: HitPosition::State::OuterWall, roomId = 2701, outerWallIndex = 12, exclusionZoneIndex = -1 (ies/Buildings/BuildingControlUnit/VWM/vwm_math.cpp:411)
|
||||
|
||||
# : UnitTest
|
||||
|
||||
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
MGRS=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
MGRS2=`echo $MGRS | sed -e 's/_//g'`
|
||||
echo "XXX $MGRS2 "
|
||||
|
||||
LATLON=`/shd/CTC/TOOLS/TDS/TDS-build/bin/mgrs2lonlat $MGRS2`
|
||||
echo " '$LATLON' "
|
||||
X=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $1}'`
|
||||
Y=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $2}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y ($MGRS)"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
#libreoffice $FILE &
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="BN_Kanaele"
|
||||
|
||||
COORDS=""
|
||||
|
||||
# Verteilt
|
||||
COORDS="${COORDS} HeAZ_${BLDG}GULLY109_01;371;32_U_PD_76914_18571"
|
||||
|
||||
# -> 101
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordOst_11;371;32_U_PD_76945_18588"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordOst_12;371;32_U_PD_76945_18588"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordOst_13;371;32_U_PD_76945_18588"
|
||||
|
||||
# -> 110
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordWest_21;371;32_U_PD_76891_18588"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordWest_22;371;32_U_PD_76891_18588"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}NordWest_23;371;32_U_PD_76891_18588"
|
||||
|
||||
# -> 114
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Sued_31;371;32_U_PD_76880_18508"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Sued_32;371;32_U_PD_76880_18508"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Sued_33;371;32_U_PD_76880_18508"
|
||||
|
||||
# -> 104
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_41;371;32_U_PD_77000_18515"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_42;371;32_U_PD_77000_18515"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_43;371;32_U_PD_77000_18515"
|
||||
|
||||
# -> NEBEN / 112
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_43;371;32_U_PD_76825_18550"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_43;371;32_U_PD_76825_18550"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}Ost_43;371;32_U_PD_76825_18550"
|
||||
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
MGRS=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
MGRS2=`echo $MGRS | sed -e 's/_//g'`
|
||||
echo "XXX $MGRS2 "
|
||||
|
||||
LATLON=`/shd/CTC/TOOLS/TDS/TDS-build/bin/mgrs2lonlat $MGRS2`
|
||||
echo " '$LATLON' "
|
||||
X=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $1}'`
|
||||
Y=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $2}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y ($MGRS)"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="U_Bahn"
|
||||
|
||||
COORDS=""
|
||||
# Hit EingangsGebäudeNorden : NEBEN - östlich (Raum 2230 - oberhalb Gleis)
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgN_11;371;0.202619;0.916077"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgN_12;371;0.202619;0.916077"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgN_13;371;0.202619;0.916077"
|
||||
|
||||
# Hit EingangsGebäudeMitte : rel. Mittig (Raum 2213 - oberhalb Gleis)
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgM_21;371;0.202603;0.916049"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgM_22;371;0.202603;0.916049"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgM_23;371;0.202603;0.916049"
|
||||
|
||||
# Hit EingangsGebäudeSüd : Direkt auf Einstieg (Raum - Dach 2401)
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;0.202592;0.91603"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;0.202592;0.91603"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;0.202592;0.91603"
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,83 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
|
||||
BLDG="U_Bahn"
|
||||
|
||||
COORDS=""
|
||||
# Hit EingangsGebäudeNorden : (Raum 2230 - oberhalb Gleis)
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgN_11;371;32_U_PD_77157_18444"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgN_12;371;32_U_PD_77150_18444"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgN_13;371;32_U_PD_77154_18451"
|
||||
|
||||
|
||||
# Hit EingangsGebäudeMitte :
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgM_21;371;32_U_PD_77102_18261"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgM_22;371;32_U_PD_77098_18260"
|
||||
#COORDS="${COORDS} HeAZ_${BLDG}EgM_23;371;32_U_PD_77100_18267"
|
||||
|
||||
# Hit EingangsGebäudeSüd :
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_31;371;32_U_PD_77065_18137"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_32;371;32_U_PD_77060_18136"
|
||||
COORDS="${COORDS} HeAZ_${BLDG}EgS_33;371;32_U_PD_77062_18144"
|
||||
|
||||
for COORD in ${COORDS}
|
||||
do
|
||||
|
||||
NAME=`echo $COORD | awk -F ";" '{print $1}'`
|
||||
AMMO=`echo $COORD | awk -F ";" '{print $2}'`
|
||||
X=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
Y=`echo $COORD | awk -F ";" '{print $4}'`
|
||||
MGRS=`echo $COORD | awk -F ";" '{print $3}'`
|
||||
MGRS2=`echo $MGRS | sed -e 's/_//g'`
|
||||
|
||||
LATLON=`/shd/CTC/TOOLS/TDS/TDS-build/bin/mgrs2lonlat $MGRS2`
|
||||
echo " '$LATLON' "
|
||||
X=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $1}'`
|
||||
Y=`echo $LATLON | cut -d "(" -f2 | awk -F " " '{print $2}'`
|
||||
|
||||
|
||||
echo "Trigger AWES with: Name='$NAME' ; AMMO=$AMMO ; X=$X - Y=$Y ($MGRS)"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build/bin//aes_test_explosion_single -d 139 -e42 name $NAME ammoId ${AMMO} x $X y $Y
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "'$NAME' okay";
|
||||
else
|
||||
echo " failure on -> '$NAME' ";
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
|
||||
done
|
||||
|
||||
FILE=`ls -tr /tmp/ShotResult_bldg_${BLDG}* | tail -n 1`
|
||||
echo " libreoffice $FILE"
|
||||
|
||||
libreoffice $FILE &
|
||||
@@ -0,0 +1,34 @@
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
|
||||
https://devhub.defence-elec.de/jira/browse/GUEZE-688 U-Bahn: AWES ohne Wirkung
|
||||
|
||||
https://devhub.defence-elec.de/jira/browse/GUEZE-688?focusedCommentId=119903&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-119903
|
||||
|
||||
Stand 06/2021:
|
||||
==============
|
||||
Also, bei BT56 ist vor geraumer Zeit aufgefallen, das AWES auf das Dach seine Wirkung zwar entfaltet hat, die Wirkung aber im EG seinen Ursprung nahm.
|
||||
In dem Zuge hat Christian Ehrlicher (so Philip Dassow) den Algorithmus angepasst. Es wird dann nach der nearest wall gesucht...
|
||||
Damit wurde aber nicht nur AWES auf das Gebäude beeinflusst, sondern auch AWES neben das Gebäude. Der Source Code suggeriert, das dieses nicht unbedingt gewollte war... ("Detected hit was outside of the building - ignored" @ vwm_api.cpp)
|
||||
|
||||
Um die Wirkung von AWES neben das Gebäude zu berechnen (z.B. U-Bahn-Tunnel), wird der AWES-EinschlagOrt (z-Wert von "0") in der Koorinatensystem des Gebäudes verschoben. (BuildingProcess::sendCesHitOnBuilding). Die impactPosition bekommt dadurch einen z-Wert von ca. -90m, da Schnöggersburg bei 90m Höhe liegt.
|
||||
Jetzt wird also die nearest Wall zu der (rel.) impactPosition gesucht. Dabei sind die Keller-Etage näher, als die Einstiegsgebäude - unglücklich.
|
||||
Um bei der der Suche (Api::onHitCes) eine sinnvolle Wall (und damit room) zu finden, wird der z-Wert auf "1" gesetzt ("posImpactOnGround"; bei "0" würde dennoch eine unterirdische Wand gefunden, daher "1"). Somit wird dann eine passende Wall/room gefunden und der "direction"-Vector in die Hit-Structure eingetragen.
|
||||
(Dabei wird noch die 3-dimensionale BoundingBox (bottomLeft, topRight) der Wand ermittelt, um Rundungsprobleme zu eleminieren.)
|
||||
|
||||
Somit wird für den Tunnel oberirdisch gesucht und gefunden - zumindest bei Einschläge neben die Einstiegsgebäude. bei Einschläge zw. den Einstiegsgebäuden (z.B. bei Raum 122) sollte der eine lange virtuelle Raum (derzeit "208") oberhalb von 116-129) gefunden werden. Die nearest-wall-Suche basiert allerdings "nur" auf den Stützpunkten der wall. Und die Stützpunkte von Raum 122 sind näher dran, als die von 208.
|
||||
-> der virtuelle Raum oberhalb der begehbaren Räume 116-129 sollte analog zu diesen aufgeteilt werden. Für 104-112 gilt das gleiche.
|
||||
|
||||
Wie können Räume wie 122 unterhalb der Erdoberfläche stärker von AWES geschützt werden?
|
||||
Dabei könnte man den (in Api::sendHitToVwm) den z-Wert des direction-Vectors nutzen. Bei U-Bahn-Tunnel führt dies z.B. zu ca- "-5" Meter.
|
||||
Bei der Kanalisation funktioniert das nicht. Der Referenzpunkt des U-Bahn-Tunnel ist an der quasi an der Erdoblerfläche. D.h. unterirdische Räume (1nn, 2nn) haben neg. z-Werte, während 3nn positive hat.
|
||||
|
||||
Bei der Kanalisation ist der Referenzpunkt unten, es gibt keine neg. z-Werte!
|
||||
|
||||
Auch aufgrund der große Ausdehnung ist der Ansatz über den z-Wert der direction fragwürdig.
|
||||
|
||||
Und was ist mit dem Tunnel in Salchau?
|
||||
|
||||
Dieser Tunnel hat gar keine Wände! Daher bleibt die nearest-wall-Suche erfolglos. Der Tunnel erfährt keine Zerstörung. Auch mit mit einem Einschlag in den Brunnen keine Zerstörung erzielen...
|
||||
BIN
Binary file not shown.
Executable
+22
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2012, Vladimir Agafonkin
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are
|
||||
permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
of conditions and the following disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
Simplify.js is a high-performance JavaScript 2D/3D polyline simplification library by Vladimir Agafonkin, extracted from [Leaflet](http://leafletjs.com).
|
||||
|
||||
Docs and demo: http://mourner.github.io/simplify-js/
|
||||
|
||||
#### Ports
|
||||
|
||||
* Python: [omarestrella / simplify.py](https://github.com/omarestrella/simplify.py) (by Omar Estrella)
|
||||
* PHP: [AKeN / simplify-php](https://github.com/AKeN/simplify-php) (by Rotari Gheorghe)
|
||||
* Java: [ekeneijeoma / simplify-java](https://github.com/ekeneijeoma/simplify-java) (by Ekene Ijeoma)
|
||||
* Java: [hgoebl / simplify-java](https://github.com/hgoebl/simplify-java) (by Heinrich Göbl)
|
||||
* Processing: [ekeneijeoma / simplify-processing](https://github.com/ekeneijeoma/simplify-processing) (by Ekene Ijeoma)
|
||||
* AS3: [fnicollet / simplify-as3](https://github.com/fnicollet/simplify-as3) (by Fabien Nicollet)
|
||||
* Rust: [calvinmetcalf / simplify-rs](https://github.com/calvinmetcalf/simplify-rs) (by Calvin Metcalf)
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "simplify-js",
|
||||
"description": "A high-performance JavaScript 2D/3D polyline simplification library",
|
||||
"homepage": "http://mourner.github.com/simplify-js/",
|
||||
"author": "Vladimir Agafonkin",
|
||||
"keywords": [
|
||||
"math",
|
||||
"geometry",
|
||||
"polyline",
|
||||
"simplification"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mourner/simplify-js.git"
|
||||
},
|
||||
"main": "simplify.js",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
Executable
+153
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
(c) 2013, Vladimir Agafonkin
|
||||
Simplify.js, a high-performance JS polyline simplification library
|
||||
mourner.github.io/simplify-js
|
||||
*/
|
||||
|
||||
(function () { "use strict";
|
||||
|
||||
// to suit your point format, run search/replace for '.x', '.y' and '.z';
|
||||
// (configurability would draw significant performance overhead)
|
||||
|
||||
// square distance between 2 points
|
||||
function getSquareDistance(p1, p2) {
|
||||
|
||||
var dx = p1.x - p2.x,
|
||||
dy = p1.y - p2.y,
|
||||
dz = p1.z - p2.z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
|
||||
// square distance from a point to a segment
|
||||
function getSquareSegmentDistance(p, p1, p2) {
|
||||
|
||||
var x = p1.x,
|
||||
y = p1.y,
|
||||
z = p1.z,
|
||||
|
||||
dx = p2.x - x,
|
||||
dy = p2.y - y,
|
||||
dz = p2.z - z;
|
||||
|
||||
if (dx !== 0 || dy !== 0 || dz !== 0) {
|
||||
|
||||
var t = ((p.x - x) * dx + (p.y - y) * dy + (p.z - z) * dz) /
|
||||
(dx * dx + dy * dy + dz * dz);
|
||||
|
||||
if (t > 1) {
|
||||
x = p2.x;
|
||||
y = p2.y;
|
||||
z = p2.z;
|
||||
|
||||
} else if (t > 0) {
|
||||
x += dx * t;
|
||||
y += dy * t;
|
||||
z += dz * t;
|
||||
}
|
||||
}
|
||||
|
||||
dx = p.x - x;
|
||||
dy = p.y - y;
|
||||
dz = p.z - z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
// the rest of the code doesn't care for the point format
|
||||
|
||||
// basic distance-based simplification
|
||||
function simplifyRadialDistance(points, sqTolerance) {
|
||||
|
||||
var prevPoint = points[0],
|
||||
newPoints = [prevPoint],
|
||||
point;
|
||||
|
||||
for (var i = 1, len = points.length; i < len; i++) {
|
||||
point = points[i];
|
||||
|
||||
if (getSquareDistance(point, prevPoint) > sqTolerance) {
|
||||
newPoints.push(point);
|
||||
prevPoint = point;
|
||||
}
|
||||
}
|
||||
|
||||
if (prevPoint !== point) {
|
||||
newPoints.push(point);
|
||||
}
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// simplification using optimized Douglas-Peucker algorithm with recursion elimination
|
||||
function simplifyDouglasPeucker(points, sqTolerance) {
|
||||
|
||||
var len = points.length,
|
||||
MarkerArray = typeof Uint8Array !== 'undefined' ? Uint8Array : Array,
|
||||
markers = new MarkerArray(len),
|
||||
|
||||
first = 0,
|
||||
last = len - 1,
|
||||
|
||||
stack = [],
|
||||
newPoints = [],
|
||||
|
||||
i, maxSqDist, sqDist, index;
|
||||
|
||||
markers[first] = markers[last] = 1;
|
||||
|
||||
while (last) {
|
||||
|
||||
maxSqDist = 0;
|
||||
|
||||
for (i = first + 1; i < last; i++) {
|
||||
sqDist = getSquareSegmentDistance(points[i], points[first], points[last]);
|
||||
|
||||
if (sqDist > maxSqDist) {
|
||||
index = i;
|
||||
maxSqDist = sqDist;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxSqDist > sqTolerance) {
|
||||
markers[index] = 1;
|
||||
stack.push(first, index, index, last);
|
||||
}
|
||||
|
||||
last = stack.pop();
|
||||
first = stack.pop();
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (markers[i]) {
|
||||
newPoints.push(points[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// both algorithms combined for awesome performance
|
||||
function simplify(points, tolerance, highestQuality) {
|
||||
|
||||
var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;
|
||||
|
||||
points = highestQuality ? points : simplifyRadialDistance(points, sqTolerance);
|
||||
points = simplifyDouglasPeucker(points, sqTolerance);
|
||||
|
||||
return points;
|
||||
}
|
||||
|
||||
// export as a Node module, an AMD module or a global browser variable
|
||||
if (typeof module !== 'undefined') {
|
||||
module.exports = simplify;
|
||||
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(function() {
|
||||
return simplify;
|
||||
});
|
||||
|
||||
} else {
|
||||
window.simplify = simplify;
|
||||
}
|
||||
|
||||
})();
|
||||
Executable
+239
@@ -0,0 +1,239 @@
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
// $Author$
|
||||
// Created by Norbert Thoden, 2021-11
|
||||
|
||||
//const fs = require('fs');
|
||||
//const aa = require('./simplify.js')();
|
||||
|
||||
|
||||
var util = require('util');
|
||||
|
||||
var pnts = [{x:100.11,y:100.15, z:1.23}, {x:500.11,y:100.14, z:1.23},{x:500.11,y:200.14, z:1.23},{x:100.1,y:200.15, z:1.23}]
|
||||
|
||||
var pointsArray = [];
|
||||
pointsArray.push(pnts);
|
||||
|
||||
|
||||
|
||||
//static const QVector<LtsUtils::QPoint3D> polyBldg1116_206_9({
|
||||
// {24.038, 11.995, 6.431},
|
||||
// {23.858, 11.995, 6.431}, // dependent / will be removed
|
||||
// {21.226, 11.995, 6.431},
|
||||
// {21.226, 11.995, 6.449}
|
||||
pointsArray.push([{x:24.038, y: 11.995, z: 6.431}, {x: 23.858, y: 11.995, z: 6.431}, {x: 21.226, y: 11.995, z: 6.431}, {x: 21.226, y: 11.995, z: 6.449}] );
|
||||
|
||||
|
||||
//static const QVector<LtsUtils::QPoint3D> polyBldg3101_306_149({
|
||||
// {10.905, 16.003, 5.480},
|
||||
// {12.277, 16.003, 5.480}, // dependent / will be removed
|
||||
// {17.839, 16.004, 5.480},
|
||||
// {17.839, 16.004, 8.040},
|
||||
// {10.905, 16.003, 8.040}
|
||||
pointsArray.push([{x: 10.905, y: 16.003, z: 5.480}, {x: 12.277, y: 16.003, z: 5.480}, {x: 17.839, y: 16.004, z: 5.480}, {x: 17.839, y: 16.004, z: 8.040}, {x: 10.905, y: 16.003, z: 8.040} ]);
|
||||
|
||||
|
||||
// static const QVector<LtsUtils::QPoint3D> polyBldg1108_103_X({
|
||||
// {-0.000, 15.979, 2.278}, // idx=0
|
||||
// {-0.000, 15.979, 0.975}, // idx=1 // problem 1: linear dependent
|
||||
// {-0.000, 15.979, 0.000}, // idx=2
|
||||
// { 0.180, 15.979, 0.000}, // idx=3
|
||||
// { 0.180, 15.979, 2.490}, // idx=4
|
||||
// {-0.000, 15.979, 2.490}, // idx=5
|
||||
// {-0.000, 15.979, 0.000} // idx=6 identical to idx=2 - problem???
|
||||
// });
|
||||
|
||||
pointsArray.push([{x: -0.000, y: 15.979,z: 2.278}, {x: -0.000, y: 15.979,z: 0.975}, {x: -0.000, y: 15.979,z: 0.000}, {x: 0.180, y: 15.979,z: 0.000}, {x: 0.180, y: 15.979,z: 2.490}, {x: -0.000, y: 15.979,z: 2.490}, {x: -0.000, y: 15.979,z: 0.000}]);
|
||||
|
||||
|
||||
|
||||
// static const QVector<LtsUtils::QPoint3D> polyBldg3101_608_387_Org({
|
||||
// {10.726, 8.619, 16.787}, // idx=0
|
||||
// {10.726, 8.716, 16.786}, // idx=1
|
||||
// { 7.291, 8.716, 16.786}, // idx=2
|
||||
// { 7.291, 8.619, 16.787}, // idx=3 // problem 1: linear dependent, wenn z gleich wäre...
|
||||
// { 7.291, 4.281, 16.717}, // idx=4
|
||||
// {10.726, 4.281, 16.717} // idx=5
|
||||
// });
|
||||
|
||||
pointsArray.push([{x: 10.726,y: 8.619,z: 16.787}, {x: 10.726,y: 8.716,z: 16.786}, {x: 7.291,y: 8.716,z: 16.786}, {x: 7.291,y: 8.619,z: 16.787}, {x: 7.291,y: 4.281,z: 16.717}, {x: 10.726,y: 4.281,z: 16.717}] );
|
||||
|
||||
// static const QVector<LtsUtils::QPoint3D> polyBldg1131_201_3({ // sollte eigentlich waagerechte Wand darstellen
|
||||
// {0.000, 5.987, 2.689}, // idx=0
|
||||
// {0.000, 5.791, 2.695}, // idx=1 // idx=1 "stört"
|
||||
// {0.000, 0.170, 2.859}, // idx=2
|
||||
// {3.098, 0.170, 2.859}, // idx=3
|
||||
// {3.098, 5.791, 2.695}, // idx=4
|
||||
// {2.928, 5.987, 2.689} // idx=5
|
||||
// });
|
||||
|
||||
pointsArray.push([{x: 0.000,y: 5.987,z: 2.689}, {x: 0.000,y: 5.791,z: 2.695}, {x: 0.000,y: 0.170,z: 2.859}, {x: 3.098,y: 0.170,z: 2.859}, {x: 3.098,y: 5.791,z: 2.695}, {x: 2.928,y: 5.987,z: 2.689}]);
|
||||
|
||||
|
||||
// 0910:
|
||||
pointsArray.push([{x:22.337, y:0.064, z:5.232}, {x:14.362, y:0.064, z:5.232}, {x:14.362, y:-12.764, z:6.797}, {x:22.337, y:-12.764, z:6.797}]);
|
||||
|
||||
// 1275
|
||||
pointsArray.push([{x:-0.105, y:1.606, z:2.240}, {x:-0.105, y:2.494, z:2.240}, {x:-0.105, y:2.494, z:2.311}, {x:-0.105, y:1.606, z:2.311}]);
|
||||
|
||||
|
||||
var myArgs = process.argv.slice(2);
|
||||
|
||||
console.log('myArgs: ', myArgs);
|
||||
|
||||
|
||||
const tolerance = myArgs[0];
|
||||
const highQuality = myArgs[1];
|
||||
console.log('tolerance: ', tolerance + " - highQuality: " + highQuality);
|
||||
|
||||
|
||||
pointsArray.forEach(points => {
|
||||
console.log("-------------------------------------------");
|
||||
console.log("input: size=" + points.length + " \n data=" + util.inspect(points, {showHidden: false, depth: 2}));
|
||||
var result = simplify(points, tolerance, highQuality);
|
||||
console.log(" result: size=" + result.length + " \n data=" + util.inspect(result, {showHidden: false, depth: 2}));
|
||||
});
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************************/
|
||||
|
||||
|
||||
|
||||
// square distance between 2 points
|
||||
function getSquareDistance(p1, p2) {
|
||||
|
||||
var dx = p1.x - p2.x,
|
||||
dy = p1.y - p2.y,
|
||||
dz = p1.z - p2.z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
|
||||
// square distance from a point to a segment
|
||||
function getSquareSegmentDistance(p, p1, p2) {
|
||||
|
||||
var x = p1.x,
|
||||
y = p1.y,
|
||||
z = p1.z,
|
||||
|
||||
dx = p2.x - x,
|
||||
dy = p2.y - y,
|
||||
dz = p2.z - z;
|
||||
|
||||
if (dx !== 0 || dy !== 0 || dz !== 0) {
|
||||
|
||||
var t = ((p.x - x) * dx + (p.y - y) * dy + (p.z - z) * dz) /
|
||||
(dx * dx + dy * dy + dz * dz);
|
||||
|
||||
if (t > 1) {
|
||||
x = p2.x;
|
||||
y = p2.y;
|
||||
z = p2.z;
|
||||
|
||||
} else if (t > 0) {
|
||||
x += dx * t;
|
||||
y += dy * t;
|
||||
z += dz * t;
|
||||
}
|
||||
}
|
||||
|
||||
dx = p.x - x;
|
||||
dy = p.y - y;
|
||||
dz = p.z - z;
|
||||
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
// the rest of the code doesn't care for the point format
|
||||
|
||||
// basic distance-based simplification
|
||||
function simplifyRadialDistance(points, sqTolerance) {
|
||||
console.log("use simplifyRadialDis");
|
||||
|
||||
var prevPoint = points[0],
|
||||
newPoints = [prevPoint],
|
||||
point;
|
||||
|
||||
for (var i = 1, len = points.length; i < len; i++) {
|
||||
point = points[i];
|
||||
|
||||
if (getSquareDistance(point, prevPoint) > sqTolerance) {
|
||||
newPoints.push(point);
|
||||
prevPoint = point;
|
||||
}
|
||||
}
|
||||
|
||||
if (prevPoint !== point) {
|
||||
newPoints.push(point);
|
||||
}
|
||||
|
||||
console.log("simplifyRadialDis -> lenght= " + newPoints.length);
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// simplification using optimized Douglas-Peucker algorithm with recursion elimination
|
||||
function simplifyDouglasPeucker(points, sqTolerance) {
|
||||
|
||||
var len = points.length,
|
||||
MarkerArray = typeof Uint8Array !== 'undefined' ? Uint8Array : Array,
|
||||
markers = new MarkerArray(len),
|
||||
|
||||
first = 0,
|
||||
last = len - 1,
|
||||
|
||||
stack = [],
|
||||
newPoints = [],
|
||||
|
||||
i, maxSqDist, sqDist, index;
|
||||
|
||||
markers[first] = markers[last] = 1;
|
||||
|
||||
while (last) {
|
||||
|
||||
maxSqDist = 0;
|
||||
|
||||
for (i = first + 1; i < last; i++) {
|
||||
sqDist = getSquareSegmentDistance(points[i], points[first], points[last]);
|
||||
|
||||
if (sqDist > maxSqDist) {
|
||||
index = i;
|
||||
maxSqDist = sqDist;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxSqDist > sqTolerance) {
|
||||
markers[index] = 1;
|
||||
stack.push(first, index, index, last);
|
||||
}
|
||||
|
||||
last = stack.pop();
|
||||
first = stack.pop();
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (markers[i]) {
|
||||
newPoints.push(points[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return newPoints;
|
||||
}
|
||||
|
||||
// both algorithms combined for awesome performance
|
||||
function simplify(points, tolerance, highestQuality) {
|
||||
|
||||
var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;
|
||||
|
||||
points = highestQuality ? points : simplifyRadialDistance(points, sqTolerance);
|
||||
points = simplifyDouglasPeucker(points, sqTolerance);
|
||||
|
||||
return points;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************************/
|
||||
|
||||
|
||||
|
||||
Executable
+91
@@ -0,0 +1,91 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
rm -v /shd/CTC/LOG/ctc_bcu_1.log*
|
||||
|
||||
|
||||
|
||||
# Since 05-03-2024:
|
||||
BLDGS="A1 A2 A3 A4"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
BLDG_STR="";
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
BLDG_STR="${BLDG_STR} ${BLDG}*"
|
||||
done
|
||||
echo " copy and paste template: zip bldgs_2021-XX-XX_rev5000.XXXXX.zip import_baX.csv $BLDG_STR"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
#echo " work on item: '$BLDG'"
|
||||
/shd/CTC/TOOLS/TDS/TDS-build-3dws/bin/BuildingControlTestVwmXml /opt/BuildingModels/StaticMeshes/${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/${BLDG}.flt.VWM_Building.xml
|
||||
|
||||
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo "------------------------------------";
|
||||
echo " failure on -> '$BLDG' ";
|
||||
echo " kate /opt/BuildingModels/StaticMeshes/${BLDG}.flt.xml /opt/BuildingModels/StaticMeshes/${BLDG}.flt.VWM_Building.xml &"
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
echo "grep for '$BLDG':";
|
||||
grep -E "WARN|ERROR|FATAL" /shd/CTC/LOG/ctc_bcu_1.log* | grep $BLDG
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
|
||||
# kate /shd/CTC/TOOLS/TDS/TDS-build/bin/log4cxx_bcu.props &
|
||||
# kate /shd/CTC/LOG/ctc_bcu_1.log &
|
||||
|
||||
# False positive:
|
||||
### A1
|
||||
###
|
||||
# Building 'A1' -> Hit on center point for room 2107 will not hit building - maybe according outterWalls (#=10) are vertical? - position: (-18.3005,8.6,7.55), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:441)
|
||||
# ---> Ursache: 4 Innentreppen in 2107 2116 2202 2206
|
||||
|
||||
|
||||
### A2
|
||||
###
|
||||
# Wall with fewer than 3 points - modelling error!
|
||||
# ---> Ursache: roomId: 2202, wallIdx = 2, wElementIdx = 0
|
||||
# ---> Ursache: roomId: 2203, wallIdx = 4, wElementIdx = 0
|
||||
# ---> Das sind die 10 schmalen Seitenwände der Pfeiler
|
||||
|
||||
# Building 'A2' -> Hit on center point for room 2104 will not hit building - maybe according outterWalls (#=6) are vertical? - position: (-7.1,8.502,7.55), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:441)
|
||||
#Building 'A2' -> Hit on center point for room 2203 will not hit building - maybe according outterWalls (#=6) are vertical? - position: (-7.1,8.552,7.55), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (Buildings/BuildingControlUnit/VWM/test_vwm_xml.cpp:441)
|
||||
# ---> Ursache: Innentreppe in 2104 2203
|
||||
|
||||
|
||||
### A3
|
||||
###
|
||||
# Building 'A3' -> Hit on center point for room 2103 will not hit building - maybe according outterWalls (#=7) are vertical? - position: (20.1505,14.45,7.55), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (ntrolUnit/VWM/test_vwm_xml.cpp:441)
|
||||
# ---> Ursache: Innentreppe in 2103
|
||||
|
||||
|
||||
|
||||
### A4
|
||||
###
|
||||
# Building 'A4' -> Hit on center point for room 2103 will not hit building - maybe according outterWalls (#=7) are vertical? - position: (18.1505,16.451,7.552), bsm direction: (0,0,1), (hitPos=state = HitPosition::State::NoHit, roomId = 0, outerWallIdx = -1, exclusionZoneIdx = -1, distance = 100000) (ntrolUnit/VWM/test_vwm_xml.cpp:441)
|
||||
# ---> Ursache: Innentreppe in 2102, 2108, 2203, 2205
|
||||
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
BLDGS="1111 1112 1113 1118 1119 1120 1121 1122 1123 1124 1125 1128 1130 1132 1134 1136 1138 1140 1142 1163"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
BLDGS="1127 1129 1131 1133 1135 1137 1139 1141 1143 1144 1145 1146 1147 1153 1158 1167"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
BLDGS="1155 1159 1160 1161 1162 1164 1166 1168 1170 1172 1173"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
Executable
+71
@@ -0,0 +1,71 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Executable
+75
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
|
||||
# 30 Bldgs:
|
||||
#BLDGS = "1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2105 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
# Since 02-07-2021: ----
|
||||
BLDGS="1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1114 1115 1116 1117 1285 1286 1287 2119 3100 3101 3102 3279 3280 3298 3299 3300 4102 4197 4198 BN_Kanaele U_Bahn"
|
||||
|
||||
# Alle (Stand 07/2021)
|
||||
BLDGS="0910 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 2100 2101 2105 2106 2107 2108 2109 2110 2112 2114 2115 2116 2117 2118 2119 2120 2121 2122 2205 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141_26 3141_27 3142 3143 3144 3145_47 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 BN_Kanaele salchau_571 salchau_574 salchau_575 salchau_576 salchau_577 salchau_tunnel U_Bahn"
|
||||
|
||||
# 10-11-2021
|
||||
BLDGS="1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1185 1188 1191 1193 1194 1195 1196 1201 1202 1203 1204 1210 1211"
|
||||
|
||||
# 12-11-2021
|
||||
BLDGS="1213 1215 1216 1217 1218 1219 1220 1221 1222 1223 1225 1226 1227"
|
||||
|
||||
# 17-11-2021
|
||||
BLDGS="1224 1228 1229 1230 1231 1232 1235 1237 1239 1241 1243"
|
||||
|
||||
# 19-11-2021
|
||||
# 2 Nachzuegler: 1197 1207
|
||||
BLDGS="1197 1207 1234 1238 1240 1244 1245 1246 1248 1249 1257 1258 1259"
|
||||
|
||||
# 24-11-2021
|
||||
BLDGS="1165 1208 1209 1212 1236 1253 1260 1261 1262 1265 3103"
|
||||
|
||||
# 26-11-2101
|
||||
BLDGS="1253 1254 1255 1269 1270 1271 1273 1274 1276 1277 1278 1279 1280 1283 3104 3105 3106 3107"
|
||||
|
||||
# 01-12-2021
|
||||
BLDGS="1256 1268 1275 1281 1282 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3121 3122"
|
||||
|
||||
# 03-12-2021
|
||||
# cat import_baX_2021-12-03.csv | grep -v "^#" | cut -d . -f1 | cut -d "_" -f2 | sed -z 's/\n/ /g'
|
||||
BLDGS="1251 1264 3220 3222 3224 3226 3228 3229 3266"
|
||||
|
||||
# 08-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3130 3131 3135 3230 3231 3232 3233 3241 3243 3260 3264 4106 4107 4111 4112 4117 4126 4127 4128 4129 4131 4132 4134 4140 4143 4145"
|
||||
|
||||
# 10-12-2021
|
||||
BLDGS="3259 3262 3267 3269 3270 3272 3273 3275 3276 4116 4139 4144 4148 4149"
|
||||
|
||||
# 15-12-2021
|
||||
BLDGS="3120 3123 3124 3129 3132 3136 3246 3248 3249 3256 3257 3258 3259 3260 3261 3263 3268 3278 3281 3282 3283 3284 3285 3287 3288 3289 3290 3291 3292 3293 3294 3295 4108 4113 4133 4141 4145 4146 4150 4151 4152 4153 4154 4156 4157 4158 4159 4160 4161 4162 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193"
|
||||
|
||||
|
||||
numOk=0;
|
||||
numFailure=0;
|
||||
|
||||
for BLDG in ${BLDGS}
|
||||
do
|
||||
|
||||
echo "Bldg: '$BLDG':";
|
||||
|
||||
MyFile=`find /opt/BuildingModels/StaticMeshes -iname "bldg_${BLDG}.flt.VWM_Building.xml"`
|
||||
grep -E "OuterWallProtectiveFactor|ExclusionZoneProtectiveFactor" $MyFile | sort -u | grep -vE "usionZoneProtectiveFactor>0<|usionZoneProtectiveFactor>20|WallProtectiveFactor>200"
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
echo "'$BLDG' okay";
|
||||
((numOk=numOk+1))
|
||||
else
|
||||
echo " failure on -> '$BLDG' ";
|
||||
((numFailure=numFailure+1))
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo " numOk = $numOk ";
|
||||
echo " numFailure = $numFailure ";
|
||||
Loaded 100 of 16245 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user