MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / appendAddress

Function appendAddress

tests/ax25_frame_formatter_test.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void appendAddress(QByteArray& out, const QString& callsign, int ssid, bool last)
24{
25 const QString base = callsign.left(6).toUpper();
26 for (int i = 0; i < 6; ++i) {
27 const char ch = (i < base.size()) ? base.at(i).toLatin1() : ' ';
28 out.append(static_cast<char>(static_cast<quint8>(ch) << 1));
29 }
30 quint8 ssidByte = 0x60u | static_cast<quint8>((ssid & 0x0f) << 1);
31 if (last)
32 ssidByte |= 0x01u;
33 out.append(static_cast<char>(ssidByte));
34}
35
36quint16 fcs(const QByteArray& bytes)
37{

Callers 1

makeUiFrameFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected