private static void GetCommand(XmlNode node, GXDLMSXmlSettings s, int tag)
{
s.command = (Command)tag;
switch (tag)
{
case (byte)Command.Snrm:
case (byte)Command.Aarq:
case (byte)Command.GetRequest:
case (byte)Command.SetRequest:
case (byte)Command.ReadRequest:
case (byte)Command.WriteRequest:
case (byte)Command.MethodRequest:
case (byte)Command.ReleaseRequest:
case (int)Command.AccessRequest:
case (int)Command.InitiateRequest:
case (int)Command.ConfirmedServiceError:
s.settings.IsServer = false;
break;
case (byte)Command.Ua:
case (byte)Command.Aare:
case (byte)Command.GetResponse:
case (byte)Command.SetResponse:
case (byte)Command.ReadResponse:
case (byte)Command.WriteResponse:
case (byte)Command.MethodResponse:
case (byte)Command.ReleaseResponse:
case (int)Command.DataNotification:
case (int)Command.AccessResponse:
case (int)Command.InitiateResponse:
break;
default:
throw new ArgumentException("Invalid Command: " + node.Name);
}
}