Projekt

Allgemein

Profil

Feature #552

Von Maximilian Seesslen vor 5 Monaten aktualisiert

For Loop detection an heartbeat should be generated periodically.
It is send to all TCP connectors, not physical CAN interfaces.

If the server receives an heartbeat with the same uuid like itself, an loop is detectd.
Also information about physical CAN interface should be send.
<pre>
uint32_t magic; // CHUB
uint8_t Type; // Heartbeat;
uint8_t major;
uint8_t minor;
uint8_t patch;
uint32_t totalLength;
uint8_t uuid[16];
</pre>

<pre>
uint8_t physical[16]; // ASCIIZ e.g. can0+vcan0 so an graphical client can print something like "connected to can0@ryzen"\0 can0\0
uint8_t application[16]; // ASCIIZ e.g. cordyceps\0
uint8_t hostname16]; // ASCIIZ e.g. ryzen\0
</pre>

QHostInfo::localHostName();
QFileInfo(QCoreApplication::applicationFilePath()).fileName();
QFileInfo( argv[0] ).fileName();

Zurück