MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / GetBlockProperty

Method GetBlockProperty

lib/mdflib/mdflib/src/idblock.cpp:27–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void IdBlock::GetBlockProperty(BlockPropertyList &dest) const {
28 MdfBlock::GetBlockProperty(dest);
29 dest.emplace_back("Information", "", "", BlockItemType::HeaderItem);
30 dest.emplace_back("File ID", FileId());
31 dest.emplace_back("Version", VersionString());
32 dest.emplace_back("Program", ProgramId());
33 if (version_ < 400) {
34 dest.emplace_back(
35 "Byte Order", byte_order_ == 0 ? "Little Endian" : "Big Endian",
36 byte_order_ == 0 ? "Intel byte order" : "Motorola byte order");
37 dest.emplace_back("Version Number", std::to_string(version_));
38#ifdef WIN32
39 CPINFOEXA cp_info{};
40 GetCPInfoExA(code_page_number_, CP_ACP, &cp_info);
41 dest.emplace_back("Code Page", std::to_string(code_page_number_),
42 cp_info.CodePageName);
43#else
44 dest.emplace_back("Code Page", std::to_string(code_page_number_));
45#endif
46 }
47 dest.emplace_back("Version Number", std::to_string(version_));
48 if (standard_flags_ & 0x01) {
49 dest.emplace_back("Update CG count","True");
50 }
51 if (standard_flags_ & 0x02) {
52 dest.emplace_back("Update SR Count","True");
53 }
54 if (standard_flags_ & 0x04) {
55 dest.emplace_back("Update length of last DT Block", "True");
56 }
57 if (standard_flags_ & 0x08) {
58 dest.emplace_back("Update length of last RD Block", "True");
59 }
60 if (standard_flags_ & 0x10) {
61 dest.emplace_back("Update length of last DL Block", "True");
62 }
63 if (standard_flags_ & 0x20) {
64 dest.emplace_back("Update length of data VLSD Block", "True");
65 }
66 if (standard_flags_ & 0x40) {
67 dest.emplace_back("Update length of offset VLSD Block", "True");
68 }
69 if (custom_flags_ != 0) {
70 dest.emplace_back("Custom Flags", std::to_string(custom_flags_));
71 }
72
73}
74
75uint64_t IdBlock::Read(std::streambuf& buffer) {
76 block_type_ = "ID";

Callers 1

RedrawListViewMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected