| 61 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 62 | |
| 63 | bool 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 |
nothing calls this directly
no test coverage detected