using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.PMR.Diagnostics; using Tango.PMR.Printing; using Tango.Transport; using System.Reactive; using Tango.PMR; using System.Reactive.Linq; using Tango.PMR.Debugging; using Tango.PMR.Hardware; using Tango.BL.Entities; using Google.Protobuf; using Tango.PMR.Connection; using Tango.PMR.Stubs; using Tango.Integration.Storage; using System.IO; using Tango.Integration.Upgrade; using Tango.PMR.IO; using Tango.PMR.FirmwareUpgrade; using Tango.Integration.JobRuns; using Tango.Integration.Emergency; using Tango.PMR.MachineStatus; namespace Tango.Integration.Operation { /// /// Represents a Tango machine operator. /// /// public interface IMachineOperator : ITransporter { /// /// Gets or sets the job handling mode. /// JobHandlerModes JobHandlingMode { get; set; } /// /// Gets or sets the job upload strategy. /// JobUploadStrategy JobUploadStrategy { get; set; } /// /// Gets or sets the job number of units duplication method. /// JobUnitsMethods JobUnitsMethod { get; set; } /// /// Gets the current machine status. /// MachineStatuses Status { get; } /// /// Gets or sets a value indicating whether to enable liquid quantity validation before starting the job. /// The validation is done using the reported . /// bool EnableJobLiquidQuantityValidation { get; set; } /// /// Gets the machine embedded device status. /// MachineStatus MachineStatus { get; } /// /// Gets or sets the firmware upgrade mode. /// FirmwareUpgradeModes FirmwareUpgradeMode { get; set; } /// /// Gets the running job. /// Job RunningJob { get; } /// /// Gets the running job status. /// RunningJobStatus RunningJobStatus { get; } /// /// Gets or sets the gradients generation configuration. /// IGradientGenerationConfiguration GradientGenerationConfiguration { get; set; } /// /// Gets or sets the emergency notification provider. /// IEmergencyNotificationProvider EmergencyNotificationProvider { get; set; } /// /// Gets a value indicating whether this instance is printing. /// bool IsPrinting { get; } /// /// Gets a value indicating whether this instance can print. /// bool CanPrint { get; } /// /// Occurs when the machine has changed. /// event EventHandler StatusChanged; /// /// Reports about the job printing preparation progress. /// event EventHandler PreparingJobProgress; /// /// Occurs when a printing process has started. /// event EventHandler PrintingStarted; /// /// Occurs when a printing process has failed. /// event EventHandler PrintingFailed; /// /// Occurs when a printing process has been aborted. /// event EventHandler PrintingAborted; /// /// Occurs when a printing process has completed. /// event EventHandler PrintingCompleted; /// /// Occurs when a printing process has ended. /// event EventHandler PrintingEnded; /// /// Occurs when the machine operator has detected that a job is in progress after connecting to the machine. /// event EventHandler ResumingJob; /// /// Occurs when a request has been sent. /// event EventHandler RequestSent; /// /// Occurs when a request response has been received. /// event EventHandler ResponseReceived; /// /// Occurs when a response has been sent. /// event EventHandler ResponseSent; /// /// Occurs when a request has failed. /// event EventHandler RequestFailed; /// /// Occurs when there is new diagnostics data available. /// event EventHandler DiagnosticsDataAvailable; /// /// Occurs when an events notification has been received from the embedded device. /// event EventHandler EventsNotification; /// /// Occurs when a new debug log is available. /// event EventHandler DebugLogAvailable; /// /// Occurs when machine embedded device status has changed. /// event EventHandler MachineStatusChanged; /// /// Occurs when a new cartridge validation request has been received. /// event EventHandler CartridgeValidationRequestReceived; /// /// Gets or sets a value indicating whether direct the embedded device to send diagnostics messages. /// bool EnableDiagnostics { get; set; } /// /// Gets or sets a value indicating whether direct the embedded device to send events notification messages. /// bool EnableEventsNotification { get; set; } /// /// Gets or sets a value indicating whether to allow incoming debugging messages. /// bool EnableEmbeddedDebugging { get; set; } /// /// Gets or sets a value indicating whether to check whether a job is in progress after connection was successful. /// bool EnableJobResume { get; set; } /// /// Gets or sets a value indicating whether to direct the embedded device to update about status changes. /// bool EnableMachineStatusUpdates { get; set; } /// /// Gets the last process parameters table sent to the embedded device. /// ProcessParametersTable CurrentProcessParameters { get; } /// /// Gets the last hardware configuration sent to the embedded device. /// HardwareConfiguration CurrentHardwareConfiguration { get; } /// /// Gets or sets the embedded device information. /// DeviceInformation DeviceInformation { get; } /// /// Gets or sets the machine events state provider used to get notifications about current machine events and errors. /// IMachineEventsStateProvider MachineEventsStateProvider { get; set; } /// /// Gets or sets the job runs logger. /// IJobRunsLogger JobRunsLogger { get; set; } /// /// Prints the specified job. /// The process parameters table will be calculated using color conversion gamut region. /// This method cannot accept brush stops with 'Volume' as color space. /// /// The job. /// Task Print(Job job); /// /// Executes a print stub for emulating a full job. /// The process parameters table will be calculated using color conversion gamut region. /// This method cannot accept brush stops with 'Volume' as color space. /// /// The job. /// Task PrintStub(Job job); /// /// Prints the specified job using the specified job parameters. /// /// The job. /// Process parameters table /// Task Print(Job job, ProcessParametersTable processParameters); /// /// Uploads the specified process parameters to the embedded device. /// /// The process parameters. /// Task UploadProcessParameters(ProcessParametersTable processParameters); /// /// Uploads the specified hardware configuration to the embedded device. /// /// Machine version. /// Machine configuration. /// Task UploadHardwareConfiguration(HardwareVersion hardwareVersion, Configuration configuration); /// /// Starts jogging the specified motor. /// /// The request. /// Task StartMotorJogging(MotorJoggingRequest request); /// /// Stops jogging the specified motor. /// /// The request. /// Task StopMotorJogging(MotorAbortJoggingRequest request); /// /// Starts homing the specified motor. /// /// The request. /// IObservable StartMotorHoming(MotorHomingRequest request); /// /// Stops homing the specified motor. /// /// The request. /// Task StopMotorHoming(MotorAbortHomingRequest request); /// /// Starts jogging the specified dispenser. /// /// The request. /// Task StartDispenserJogging(DispenserJoggingRequest request); /// /// Stops jogging the specified dispenser. /// /// The request. /// Task StopDispenserJogging(DispenserAbortJoggingRequest request); /// /// Starts homing the specified dispenser. /// /// The request. /// IObservable StartDispenserHoming(DispenserHomingRequest request); /// /// Stops homing the specified dispenser. /// /// The request. /// Task StopDispenserHoming(DispenserAbortHomingRequest request); /// /// Turn on/off the specified digital output pin. /// /// The request. /// Task SetDigitalOut(SetDigitalOutRequest request); /// /// Starts jogging the thread motion system. /// /// The request. /// Task StartThreadJogging(ThreadJoggingRequest request); /// /// Stops jogging the thread motion system. /// /// The request. /// Task StopThreadJogging(ThreadAbortJoggingRequest request); /// /// Sets the specified component value. /// /// The request. /// Task SetComponentValue(SetComponentValueRequest request); /// /// Sets the state of the specified heater type. /// /// The heater. /// Set point temperature. /// Task SetHeaterState(HeaterType heater, double setPoint); /// /// Sets the state of the specified blower. /// /// The blower. /// Blower on/off. /// The voltage in millivolts. /// Task SetBlowerState(PMR.Hardware.HardwareBlowerType blower, bool isActive, double voltage); /// /// Sets the state of the specified valve type. /// /// The valve. /// Valve state. /// Task SetValveState(ValveType valve, ValveStateCode state); /// /// Resolves the specified event type. /// /// Type of the event. /// Task ResolveEvent(PMR.Diagnostics.EventType eventType); /// /// Resets the embedded device. /// /// Task Reset(); /// /// Resets the device through the DFU channel. /// /// Task ResetDFU(); /// /// Upgrades the firmware. /// /// The TFP stream (Tango Firmware Package File). /// Task UpgradeFirmware(Stream tfpStream); /// /// Directs the embedded device to validate the last uploaded firmware package. /// /// Task ValidateFirmwareVersion(String path); /// /// Directs the embedded device to validate the last uploaded firmware package. /// /// Task ActivateFirmwareVersion(String path); /// /// Gets the firmware update package info. /// /// The TFP (Tango Firmware Package File) stream. /// Task GetFirmwarePackageInfo(Stream tfpStream); /// /// Creates a storage manager for managing the machine file system. /// /// StorageManager CreateStorageManager(); } }