Reinserts original comments

This commit is contained in:
torsten committed 2026-10-14 12:56:16 +00:00
1 parent 1dd1e86355
commit b662e4daf9
112 files changed
+7113 -5131

No files matched your search

@@ -1,5 +1,10 @@
/**
* Thin wrapper around json telegram data
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Ehrlicher, SLSE, 2016-04-22
*/
#include "CoPrtCnvCentralTelegram.hpp"
#include <QtCore/QJsonDocument>
@@ -79,4 +84,4 @@ void CoPrtCnvCentralTelegram::ensureByteArray()
}
}
} // namespace N_CoPrtCnv
@@ -1,5 +1,10 @@
/**
* Thin wrapper around json telegram data
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Ehrlicher, SLSE, 2016-04-22
*/
#pragma once
@@ -10,8 +15,11 @@
namespace N_CoPrtCnv
{
/**
* The central-telegram, an subclass of XDR_Wrapper_it used for creation of
* telegrams with telegramId. It also contains the deletion of dynamic allocated
* space within central-telegrams.
*/
class COPRTCNV_EXPORT CoPrtCnvCentralTelegram final
{
public:
@@ -42,8 +50,8 @@ namespace N_CoPrtCnv
void setData(const QByteArray &data);
QByteArray data();
QJsonObject json();
QJsonObject jsonData();
QJsonObject json(); // complete json
QJsonObject jsonData(); // json()["data"]
TrainingAreaBase::TetraIcd::TelegramId telegramId();
void setCounter(qint32 counter);
qint32 counter();
@@ -1,16 +1,16 @@
// **************************************************************************
//
// @RDE_HEADER@
//
// **************************************************************************
//
// $HeadURL$
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
//
// Helper to dump the data in hex
// **************************************************************************
#include "CoPrtCnvHexDumpHelper.hpp"
#include "CoPrtCnvRadioTelegram.hpp"
@@ -24,9 +24,9 @@ static std::string dumpSammeldeaktivierung(const N_CoPrtCnv::CoPrtCnvRadioTelegr
const int SIZE_POS = sammelTelegram->getTelID() == GEF_WF_SAMMELDEAKTIVIERUNG_DUS_MINEN ? 2 : 1;
std::stringstream sstream;
unsigned int cnt = sammelTelegram->getPayloadDataUInt32(ANZAHL_POS, SIZE_POS);
unsigned int cnt = sammelTelegram->getPayloadDataUInt32(ANZAHL_POS, SIZE_POS); // anzahl
for (unsigned int i = 0; i < cnt; ++i) {
uint16_t telId = sammelTelegram->getPayloadDataUInt32(ANZAHL_POS + SIZE_POS + 2 * i, 2);
uint16_t telId = sammelTelegram->getPayloadDataUInt32(ANZAHL_POS + SIZE_POS + 2 * i, 2); // add kennung
sstream << telId << " ";
}
return sstream.str();
@@ -1,16 +1,16 @@
// **************************************************************************
//
// @RDE_HEADER@
//
// **************************************************************************
//
// $HeadURL$
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
//
// Helper to dump the data in hex
// **************************************************************************
#pragma once
#include <QtCore/QString>
@@ -1,15 +1,15 @@
// **************************************************************************
//
// (C) Copyright 2009 Swiss SIMTEC AG
//
// **************************************************************************
//
// $HeadURL$
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
//
// **************************************************************************
#pragma once
@@ -17,26 +17,38 @@
namespace N_CoPrtCnv
{
/**
* The header used for injection-data
*
* @author alois.wismer
* @version 1.0
* @created 06-Aug-2010 10:27:55
*/
struct CoPrtCnvInjectionHeader
{
/**
* The m_Id1 and m_Id2 are used to detect rubish data.
*/
uint32_t m_Id1;
/**
* The m_Id1 and m_Id2 are used to detect rubish data.
*/
uint32_t m_Id2;
/**
* 0 => unknown
* 1 => central-telegram
* 2 => radio-telegram
* all others: unknown
*/
enum Destination
{
eUnknown = 0,
eCentral = 1,
eRadio = 2
} m_Kind;
/**
* The size of following data
*/
uint16_t m_Size;
CoPrtCnvInjectionHeader()
@@ -1,15 +1,15 @@
// **************************************************************************
//
// (C) Copyright 2009 Swiss SIMTEC AG
//
// **************************************************************************
//
// $HeadURL$
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
//
// **************************************************************************
#pragma once
@@ -17,12 +17,18 @@
namespace N_CoPrtCnv
{
/**
* @author alois.wismer
* @version 1.0
* @created 12-Mrz-2010 16:07:19
*/
struct CoPrtCnvLogHeader
{
/**
* @author alois.wismer
* @version 1.0
* @created 12-Mrz-2010 16:04:42
*/
enum E_CoPrtCnvProtocol
{
e_DestProtocolCentral = 0,
@@ -34,19 +40,24 @@ namespace N_CoPrtCnv
e_DestReceive = 0x40000000,
e_DestSend = 0xC0000000
};
/**
* length of data, including length of this header
*/
short m_Length = 0;
short m_Version = 0;
int m_Priority = 0;
/**
* We do not use E_CoPrtCnvProtocol here, because we want a size of 4 bytes
*/
int m_Protocol = 0;
/**
* needed for correct alignment when compiling on 64-bit systems
*/
int m_Reserved = 0;
/**
* Upper 4 bytes => seconds
* Lower 4 byte => microseconds
*/
uint64_t m_Time = 0;
};
}
File diff suppressed because it is too large. Load diff
@@ -1,15 +1,15 @@
// **************************************************************************
//
// (C) Copyright 2009 Swiss SIMTEC AG
//
// **************************************************************************
//
// $HeadURL$
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
//
// **************************************************************************
#pragma once
@@ -28,27 +28,42 @@ class CoPrtCnvRadioTelegram;
class CoPrtCnvCentralTelegram;
/**
* This class is responsible to convert radio-telegrams into central-telegrams and
* vice versa.
* @author alois.wismer
* @version 1.0
* @created 19-Mrz-2010 13:32:40
*/
namespace CoPrtCnvTelegramConverter
{
/**
* Converts central-telegrams to radio-telegrams.
* Returns NULL if conversion was failed.
*
* @param a_telegram
*/
COPRTCNV_EXPORT CoPrtCnvRadioTelegram *convertToRadio(CoPrtCnvCentralTelegram *a_telegram);
COPRTCNV_EXPORT CoPrtCnvRadioTelegram *convertToRadio(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *a_telegram);
/**
* converts a radiotelegram into a central.
* returns nullptr if conversion failed
*
* @param a_radioTelegram
*/
COPRTCNV_EXPORT CoPrtCnvCentralTelegram *convertToCentral(const CoPrtCnvRadioTelegram *a_radioTelegram);
COPRTCNV_EXPORT TrainingAreaBase::TetraIcd::TrainingAreaTelegram *convertToTabTele(const CoPrtCnvRadioTelegram *a_radioTelegram);
/**
* Set the text codec to use for string send to/received from tetra
*/
COPRTCNV_EXPORT void setTetraTextCodec(const char *codecName);
/**
* Set to trueif single fire (WIRKFELD_EINZELGESCHOSS) has two bytes for diameter, otherwise only one byte is used
*/
COPRTCNV_EXPORT void setUse2BytesForSingleFireDiameter(bool bUse);
COPRTCNV_EXPORT void setUsePvSan(bool bUse);
@@ -1,5 +1,10 @@
/**
* Telegram IDs used in ICD52
* $Id$
* $HeadURL$
* $Author$
* Created by hjl, SLSE, 2016-11-14
*/
#pragma once