33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
|
|
using System.Collections.Generic;
|
|||
|
|
using DTS.Common.ICommunication;
|
|||
|
|
|
|||
|
|
namespace DTS.DASLib.Command.SLICE.MulticastCommands
|
|||
|
|
{
|
|||
|
|
public class MulticastSetGatewayAddress : MulticastCommandBase
|
|||
|
|
{
|
|||
|
|
const int COMMAND_PAYLOAD_SIZE = DOUBLE_MAC_ADDR_SIZE + IP_ADDR_SIZE;
|
|||
|
|
|
|||
|
|
protected override Commands Command => Commands.SetGatewayAddress;
|
|||
|
|
|
|||
|
|
private string _gateway;
|
|||
|
|
public string Gateway { set { _gateway = value; command.SetParameter(FIRST_PARAMETER_OFFSET, _gateway); } }
|
|||
|
|
|
|||
|
|
public MulticastSetGatewayAddress(DTS.Common.Interface.DASFactory.ICommunication sock)
|
|||
|
|
: base(sock)
|
|||
|
|
{
|
|||
|
|
command.Parameter = new byte[COMMAND_PAYLOAD_SIZE];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public MulticastSetGatewayAddress(DTS.Common.Interface.DASFactory.ICommunication sock, int timeoutMillisec)
|
|||
|
|
: base(sock, timeoutMillisec)
|
|||
|
|
{
|
|||
|
|
command.Parameter = new byte[COMMAND_PAYLOAD_SIZE];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public override void CommandToString(ref List<List<string>> lines)
|
|||
|
|
{
|
|||
|
|
base.CommandToString(ref lines);
|
|||
|
|
lines.Add(new List<string> { $"MAC: {CommandClientMac} Gateway: {_gateway}" });
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|