1 // 2 // Copyright (c) 2010-2023 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 using System; 8 using Antmicro.Renode.Peripherals; 9 using Antmicro.Renode.Plugins.CoSimulationPlugin.Connection.Protocols; 10 11 namespace Antmicro.Renode.Plugins.CoSimulationPlugin.Connection 12 { 13 public interface ICoSimulationConnection : IDisposable 14 { Connect()15 void Connect(); TrySendMessage(ProtocolMessage message)16 bool TrySendMessage(ProtocolMessage message); TryRespond(ProtocolMessage message)17 bool TryRespond(ProtocolMessage message); TryReceiveMessage(out ProtocolMessage message)18 bool TryReceiveMessage(out ProtocolMessage message); HandleMessage()19 void HandleMessage(); Abort()20 void Abort(); 21 22 bool IsConnected { get; } 23 string SimulationFilePath { set; } 24 string Context { get; set; } 25 } 26 } 27