Updated comments to be more clear
This commit is contained in:
parent
1584cf0404
commit
223a4a2183
@ -1214,7 +1214,6 @@ QStringList Varicode::unpackHeartbeatMessage(const QString &text, quint8 *pType,
|
|||||||
return unpacked;
|
return unpacked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// KN4CRD/XXXX EM73
|
// KN4CRD/XXXX EM73
|
||||||
// XXXX/KN4CRD EM73
|
// XXXX/KN4CRD EM73
|
||||||
// KN4CRD/P
|
// KN4CRD/P
|
||||||
@ -1504,7 +1503,7 @@ QString packHuffMessage(const QString &input, int *n){
|
|||||||
|
|
||||||
// [1][1][70] = 72
|
// [1][1][70] = 72
|
||||||
// The first bit is a flag that indicates this is a data frame, technically encoded as [100]
|
// The first bit is a flag that indicates this is a data frame, technically encoded as [100]
|
||||||
// but, since none of the other frame types start with a 1, we can drop the two zeros and use
|
// but, since none of the other frame types start with a 0, we can drop the two zeros and use
|
||||||
// them for encoding the first two bits of the actuall data sent. boom!
|
// them for encoding the first two bits of the actuall data sent. boom!
|
||||||
// The second bit is a flag that indicates this is not compressed frame (huffman coding)
|
// The second bit is a flag that indicates this is not compressed frame (huffman coding)
|
||||||
QVector<bool> frameBits = {true, false};
|
QVector<bool> frameBits = {true, false};
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
JS8Call = 0, // [000] <- any other frame of the message
|
JS8Call = 0, // [000] <- any other frame of the message
|
||||||
JS8CallFirst = 1, // [001] <- the first frame of a message
|
JS8CallFirst = 1, // [001] <- the first frame of a message
|
||||||
JS8CallLast = 2, // [010] <- the last frame of a message
|
JS8CallLast = 2, // [010] <- the last frame of a message
|
||||||
JS8CallExtended = 4, // [100] <- raw data frame (no frame type header)
|
JS8CallExtended = 4, // [100] <- extended frame (no frame type header)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -30,7 +30,7 @@ public:
|
|||||||
001 = compound
|
001 = compound
|
||||||
010 = compound directed
|
010 = compound directed
|
||||||
011 = directed
|
011 = directed
|
||||||
1XX = data, with X bits dropped
|
1XX = data, with the X lsb bits dropped
|
||||||
*/
|
*/
|
||||||
enum FrameType {
|
enum FrameType {
|
||||||
FrameUnknown = 255, // [11111111] <- only used as a sentinel
|
FrameUnknown = 255, // [11111111] <- only used as a sentinel
|
||||||
@ -38,7 +38,7 @@ public:
|
|||||||
FrameCompound = 1, // [001]
|
FrameCompound = 1, // [001]
|
||||||
FrameCompoundDirected = 2, // [010]
|
FrameCompoundDirected = 2, // [010]
|
||||||
FrameDirected = 3, // [011]
|
FrameDirected = 3, // [011]
|
||||||
FrameData = 4, // [1XX] // but this only encodes the msb bit 1 and drops the two zeros
|
FrameData = 4, // [10X] // but this only encodes the first 2 msb bits and drops the lsb
|
||||||
FrameDataCompressed = 6, // [11X] // but this only encodes the first 2 msb bits and drops the lsb
|
FrameDataCompressed = 6, // [11X] // but this only encodes the first 2 msb bits and drops the lsb
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user