MCPcopy Create free account
hub / github.com/JSBSim-Team/jsbsim / Load

Method Load

src/input_output/FGUDPInputSocket.cpp:63–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62
63bool FGUDPInputSocket::Load(Element* el)
64{
65 if (!FGInputSocket::Load(el))
66 return false;
67
68 rate = atoi(el->GetAttributeValue("rate").c_str());
69 SetRate(0.5 + 1.0/(FDMExec->GetDeltaT()*rate));
70
71 Element *property_element = el->FindElement("property");
72
73 while (property_element) {
74 string property_str = property_element->GetDataLine();
75 SGPropertyNode* node = PropertyManager->GetNode(property_str);
76 if (!node) {
77 FGXMLLogging log(property_element, LogLevel::ERROR);
78 log << LogFormat::RED << LogFormat::BOLD << "\n No property by the name "
79 << property_str << " can be found.\n" << LogFormat::RESET;
80 } else {
81 InputProperties.push_back(node);
82 }
83 property_element = el->FindNextElement("property");
84 }
85
86 return true;
87}
88
89//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90

Callers

nothing calls this directly

Calls 8

SetRateFunction · 0.85
c_strMethod · 0.80
GetAttributeValueMethod · 0.80
FindElementMethod · 0.80
GetDataLineMethod · 0.80
GetNodeMethod · 0.80
FindNextElementMethod · 0.80
LoadFunction · 0.50

Tested by

no test coverage detected