void ElementVisitor::Visit_OS( const ESMoL::OS & os ) { // STRONG ASSUMPTION -- we have already visited the parent and created a semantics entry for it. Udm::Object obj = os.parent(); Semantics::Node sNode = IndexKeeper::Inst()->Lookup< Semantics::Node >( obj.uniqueId() ); //get os specific values std::string str; try { str = os.TickResolution(); sNode.tickresolutionsecs() = TimeStr2secs( str ); } catch ( ConversionErr &err ) { std::cout << _contextTracker.GetContext() << " Node resolution :" << err._what << std::endl; } try { str = os.ContextSwitchTime(); sNode.ctxtswitchsecs() = TimeStr2secs(str); } catch ( ConversionErr &err ) { std::cout << _contextTracker.GetContext() << " Node context switch time :" << err._what << std::endl; } try { str = os.ISROverheadTime(); sNode.isrohdsecs() = TimeStr2secs(str); } catch ( ConversionErr &err ) { std::cout << _contextTracker.GetContext() << " ISR overhead time :" << err._what << std::endl; } try { str = os.SendOverheadTime(); sNode.sndohdsecs() = TimeStr2secs(str); } catch ( ConversionErr &err ) { std::cout << _contextTracker.GetContext() << " Node send overhead :" << err._what << std::endl; } try { str = os.RecvOverheadTime(); sNode.rcvohdsecs() = TimeStr2secs(str); } catch ( ConversionErr &err ) { std::cout << _contextTracker.GetContext() << " Node receive overhead :" << err._what << std::endl; } sNode.maxtasknum() = os.MaxTaskNumber(); sNode.schedalgorithm() = os.SchedulingAlgorithm(); }
std::string Formatter::MakeObjectHyperlink(const std::string & text, const Udm::Object& object) { ostringstream ostr; ostr <<"<a href=\"mga:" << UdmGme::UdmId2GmeId(object.uniqueId()) << "\">" << text << "</a>"; return ostr.str(); }
std::string appendObjLink(const Udm::Object &obj) { if (!obj) return "null"; return ("<A HREF=\"mga:"+ UdmGme::UdmId2GmeId(obj.uniqueId()) + "\">" + UdmUtil::ExtractName(obj) + "</A>"); }