private static bool GetFrame(XmlNode node, GXDLMSXmlSettings s, int tag)
{
bool found = true;
switch (tag)
{
case (int)TranslatorTags.Wrapper:
s.settings.InterfaceType = InterfaceType.WRAPPER;
break;
case (int)TranslatorTags.Hdlc:
s.settings.InterfaceType = InterfaceType.HDLC;
break;
case (int)TranslatorTags.TargetAddress:
s.settings.ServerAddress = int.Parse(GetValue(node, s), System.Globalization.NumberStyles.AllowHexSpecifier);
break;
case (int)TranslatorTags.SourceAddress:
s.settings.ClientAddress = int.Parse(GetValue(node, s), System.Globalization.NumberStyles.AllowHexSpecifier);
break;
default:
//It's OK if frame is not found.
found = false;
break;
}
return found;
}