Files
DP44/DataPRO/SLICECommands/.svn/pristine/2f/2fe4278b7c05cdb7e6540e308f20f8e82993f8f7.svn-base
2026-04-17 14:55:32 -04:00

46 lines
1.5 KiB
Plaintext

using System;
using System.Collections.Generic;
using DTS.Common.Enums.DASFactory;
using DTS.Common.ICommunication;
namespace DTS.DASLib.Command.SLICE.MulticastCommands
{
public class MulticastGetDhcp : MulticastCommandBase
{
protected override Commands Command => Commands.GetDhcp;
private byte _dhcp;
public bool Dhcp => Convert.ToBoolean(_dhcp);
public MulticastGetDhcp(DTS.Common.Interface.DASFactory.ICommunication sock)
: base(sock)
{
}
public MulticastGetDhcp(DTS.Common.Interface.DASFactory.ICommunication sock, int timeoutMillisec)
: base(sock, timeoutMillisec)
{
}
protected override CommandReceiveAction WholePackage()
{
if (response.Status != DFConstantsAndEnums.CommandStatus.StatusNoError)
return CommandReceiveAction.StopReceiving;
base.WholePackage();
response.GetParameter(FIRST_PARAMETER_OFFSET, out _dhcp);
return CommandReceiveAction.StopReceiving;
}
public override void CommandToString(ref List<List<string>> lines)
{
base.CommandToString(ref lines);
lines.Add(new List<string> { $"MAC: {ResponseClientMac} " });
}
public override void ResponseToString(ref List<List<string>> lines)
{
base.ResponseToString(ref lines);
lines.Add(new List<string> { $"MAC: {ResponseClientMac} Dhcp: {_dhcp}" });
}
}
}