Files
DP44/DataPRO/SLICECommands/.svn/pristine/ec/ec7bc0fb67fce8a98bfee136e09cfff81af95de4.svn-base
2026-04-17 14:55:32 -04:00

42 lines
1.2 KiB
Plaintext

using System;
using System.Collections.Generic;
using DTS.Common.ICommunication;
namespace DTS.DASLib.Command.SLICE.MulticastCommands
{
public class MulticastSetDhcp : MulticastCommandBase
{
const int COMMAND_PAYLOAD_SIZE = DOUBLE_MAC_ADDR_SIZE + 1;
protected override Commands Command => Commands.SetDhcp;
private byte _dhcp;
public bool Dhcp
{
set
{
_dhcp = Convert.ToByte(value);
command.SetParameter(FIRST_PARAMETER_OFFSET, _dhcp);
}
}
public MulticastSetDhcp(DTS.Common.Interface.DASFactory.ICommunication sock)
: base(sock)
{
command.Parameter = new byte[COMMAND_PAYLOAD_SIZE];
}
public MulticastSetDhcp(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} DHCP: {_dhcp} " });
}
}
}