Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
fd40d9ca
Commit
fd40d9ca
authored
Aug 06, 2022
by
Volker Krause
Browse files
Deduplicate UIC 918.3 header magic numbers and signature size logic
parent
3ab40c75
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/uic9183/uic9183header.cpp
View file @
fd40d9ca
...
...
@@ -55,18 +55,18 @@ bool Uic9183Header::isValid() const
int
Uic9183Header
::
signatureSize
()
const
{
switch
(
version
())
{
case
1
:
return
50
;
case
2
:
return
64
;
case
1
:
return
SignatureSizeV1
;
case
2
:
return
SignatureSizeV2
;
};
return
0
;
}
int
Uic9183Header
::
compressedMessageSize
()
const
{
return
Uic9183Utils
::
readAsciiEncodedNumber
(
m_data
,
14
+
signatureSize
(),
4
);
return
Uic9183Utils
::
readAsciiEncodedNumber
(
m_data
,
PrefixSize
+
signatureSize
(),
4
);
}
int
Uic9183Header
::
compressedMessageOffset
()
const
{
return
PrefixSize
+
(
version
()
==
1
?
SignatureSizeV1
:
SignatureSizeV2
)
+
SuffixSize
;
return
PrefixSize
+
signatureSize
(
)
+
SuffixSize
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment