using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL;
using Tango.BL.Entities;
using Tango.Integration.ExternalBridge;
using Tango.Integration.Operation;
namespace Tango.PPC.Common.Connection
{
/// <summary>
/// Represents the machine connection provider.
/// </summary>
public interface IMachineProvider
{
/// <summary>
/// Occurs when the machine has connected.
/// </summary>
event EventHandler MachineConnected;
/// <summary>
/// Occurs when the machine has disconnected.
/// </summary>
event EventHandler MachineDisconnected;
/// <summary>
/// Gets a value indicating whether the machine is currently connected.
/// </summary>
bool IsConnected { get; }
/// <summary>
/// Gets the database machine entity associated with the current machine.
/// </summary>
Machine Machine { get; }
/// <summary>
/// Gets the machine operator.
/// </summary>
IMachineOperator MachineOperator { get; }
/// <summary>
/// Initializes this machine provider start machine port scanning and connection.
/// </summary>
void Init(Machine machine, ObservablesContext context);
/// <summary>
/// Saves the machine settings.
/// </summary>
/// <returns></returns>
Task SaveMachine();
}
}