+void
+FGGeneric::reinit()
+{
+ SGPath path( globals->get_fg_root() );
+ path.append("Protocol");
+ path.append(file_name.c_str());
+
+ SG_LOG(SG_GENERAL, SG_INFO, "Reading communication protocol from "
+ << path.str());
+
+ SGPropertyNode root;
+ try {
+ readProperties(path.str(), &root);
+ } catch (const sg_exception &) {
+ SG_LOG(SG_GENERAL, SG_ALERT,
+ "Unable to load the protocol configuration file");
+ return;
+ }
+
+ if (direction == "out") {
+ SGPropertyNode *output = root.getNode("generic/output");
+ if (output) {
+ _out_message.clear();
+ read_config(output, _out_message);
+ }
+ } else if (direction == "in") {
+ SGPropertyNode *input = root.getNode("generic/input");
+ if (input) {
+ _in_message.clear();
+ read_config(input, _in_message);
+ }
+ }
+}
+
+