26 lines
1,017 B
C#
Executable file
26 lines
1,017 B
C#
Executable file
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using FanucProgramManager.Cnc.Models;
|
|
|
|
namespace FanucProgramManager.Cnc
|
|
{
|
|
public interface ICncMachine : IDisposable
|
|
{
|
|
string Name { get; }
|
|
ConnectionState State { get; }
|
|
|
|
event EventHandler<ConnectionState> StateChanged;
|
|
|
|
Task<CncResult<bool>> ConnectAsync(CancellationToken ct = default);
|
|
Task DisconnectAsync();
|
|
|
|
Task<CncResult<MachineSnapshot>> ReadAsync(CancellationToken ct = default);
|
|
|
|
Task<CncResult<string>> ReadActiveProgramAsync(CancellationToken ct = default);
|
|
Task<CncResult<string>> ReadProgramAsync(string path, CancellationToken ct = default);
|
|
Task<CncResult<bool>> WriteProgramAsync(string path, CncProgram program, CancellationToken ct = default);
|
|
Task<CncResult<bool>> SelectMainProgramAsync(string path, CancellationToken ct = default);
|
|
Task<CncResult<bool>> DeleteProgramAsync(string path, CancellationToken ct = default);
|
|
}
|
|
}
|