blob: 3410b94f0e7854d933266a0d68ee3b1e7ec19893 [file] [log] [blame]
//
// Copyright (c) 2010-2024 Antmicro
//
// This file is licensed under the MIT License.
// Full license text is available in 'licenses/MIT.txt'.
//
using System.Collections.Generic;
namespace Antmicro.Renode.Network.ExternalControl
{
public enum Command : byte
{
RunFor = 1,
GetTime,
GetMachine,
ADC,
}
public interface ICommand
{
Command Identifier { get; }
byte Version { get; }
IMachineContainer Machines { get; }
Response Invoke(List<byte> data);
}
public abstract class BaseCommand : ICommand
{
public BaseCommand(ExternalControlServer parent)
{
this.parent = parent;
}
public abstract Response Invoke(List<byte> data);
public abstract Command Identifier { get; }
public abstract byte Version { get; }
public IMachineContainer Machines => parent.Machines;
protected readonly ExternalControlServer parent;
}
}