diff options
Diffstat (limited to 'example')
| -rw-r--r-- | example/fix_tag_example/example.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/example/fix_tag_example/example.cpp b/example/fix_tag_example/example.cpp index ac4f479..ba788de 100644 --- a/example/fix_tag_example/example.cpp +++ b/example/fix_tag_example/example.cpp @@ -3,7 +3,7 @@ constexpr char default_fix[] = { '8', '=', 'F', 'I', 'X', '.', '4', '.', '2', 0x01, - '9', '=', '6', '3', 0x01, // BodyLength = 63 + '9', '=', '8', '7', 0x01, // BodyLength = 87 '3', '5', '=', 'A', 0x01, '4', '9', '=', 'S', 'E', 'R', 'V', 'E', 'R', 0x01, '5', '6', '=', 'C', 'L', 'I', 'E', 'N', 'T', 0x01, @@ -11,9 +11,23 @@ constexpr char default_fix[] = { '5', '2', '=', '2', '0', '0', '9', '0', '1', '0', '7', '-', '1', '8', ':', '1', '5', ':', '1', '6', 0x01, '9', '8', '=', '0', 0x01, '1', '0', '8', '=', '3', '0', 0x01, - '1', '0', '=', '1', '4', '3', 0x01, 0x00 // CheckSum = 143 + '1', '0', '=', '6', '0', 0x01, 0x00 // CheckSum = 143 }; +constexpr char default_fix_unchecked[] = { + '8', '=', 'F', 'I', 'X', '.', '4', '.', '2', 0x01, + '9', '=', '8', '0', 0x01, // BodyLength = 80 + '3', '5', '=', 'A', 0x01, + '4', '9', '=', 'S', 'E', 'R', 'V', 'E', 'R', 0x01, + '5', '6', '=', 'C', 'L', 'I', 'E', 'N', 'T', 0x01, + '3', '4', '=', '1', '7', '7', 0x01, + '5', '2', '=', '2', '0', '0', '9', '0', '1', '0', '7', '-', '1', '8', ':', '1', '5', ':', '1', '6', 0x01, + '9', '8', '=', '0', 0x01, + '1', '0', '8', '=', '3', '0', 0x01, + 0x00 +}; + + int main(int argc, char** argv) { ocl::fix::visitor basic_visitor; @@ -27,7 +41,9 @@ int main(int argc, char** argv) ocl::io::print(":key=49\n"); ocl::io::print(":value=", fix["49"], "\n"); - ocl::io::print("checksum=", ocl::fix::try_index_checksum(fix), "\n"); + ocl::io::print(":checksum=", ocl::fix::try_index_checksum(fix), "\n"); + ocl::io::print(":checksum=", ocl::fix::operators::fix::checksum(default_fix_unchecked, + sizeof(default_fix_unchecked)) + 1, "\n"); return 0; } |
