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

Method RedrawCnBlock

lib/mdflib/mdfviewer/src/childframe.cpp:557–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557void ChildFrame::RedrawCnBlock(const detail::Cn4Block &cn,
558 const wxTreeItemId &root) {
559 std::ostringstream sub_string;
560 const std::string cn_name = cn.Name();
561 const std::string cn_unit = cn.Unit();
562
563 sub_string << cn_name;
564 if (!cn_unit.empty()) {
565 sub_string << " [" << cn_unit << "]";
566 }
567
568 std::ostringstream cn_string;
569 cn_string << cn.BlockType() << " (" << sub_string.str() << ")";
570
571
572 for (size_t array = 0;cn.ChannelArray(array) != nullptr ; ++array) {
573 if (const auto* channel_array = cn.ChannelArray(array); channel_array != nullptr) {
574 cn_string << " " << channel_array->DimensionAsString();
575 }
576
577 }
578
579
580 auto cn_root = left_->AppendItem(root, wxString::FromUTF8(cn_string.str()),
581 TREE_CN, TREE_CN, new BlockAddress(cn.FilePosition()));
582 const auto* si = cn.Si();
583 if (si != nullptr) {
584 RedrawSiBlock(*si,cn_root);
585 }
586 const auto* cc = cn.Cc();
587 if (cc != nullptr) {
588 RedrawCcBlock(*cc,cn_root);
589 }
590 RedrawCxList(cn.Cx4(), cn_root);
591 RedrawDataList(cn, cn_root);
592}
593
594void ChildFrame::RedrawCaBlock(const Ca4Block &ca4, const wxTreeItemId &root) {
595 const std::string type = ca4.TypeAsString();

Callers

nothing calls this directly

Calls 9

emptyMethod · 0.80
DimensionAsStringMethod · 0.80
SiMethod · 0.80
NameMethod · 0.45
UnitMethod · 0.45
BlockTypeMethod · 0.45
ChannelArrayMethod · 0.45
FilePositionMethod · 0.45
CcMethod · 0.45

Tested by

no test coverage detected