Class PlotterProxy
Class to manage plotting
public sealed class PlotterProxy : ServiceProxy, IServiceProxy
- Inheritance
-
PlotterProxy
- Implements
- Inherited Members
- Extension Methods
Remarks
ctor
Constructors
PlotterProxy(WebSocketRpcClient, string)
Class to manage plotting
public PlotterProxy(WebSocketRpcClient rpcClient, string originService)
Parameters
rpcClient
WebSocketRpcClientIRpcClient instance to use for rpc communication
originService
string
Remarks
ctor
Methods
GetKeysForPlotting(IEnumerable<uint>?, CancellationToken)
Returns the list of plotting keys.
public Task<IDictionary<uint, PlottingKeys>> GetKeysForPlotting(IEnumerable<uint>? fingerprints = null, CancellationToken cancellationToken = default)
Parameters
fingerprints
IEnumerable<uint>cancellationToken
CancellationTokenA token to allow the call to be cancelled
Returns
- Task<IDictionary<uint, PlottingKeys>>
A dictionary of fingerprints and PlottingKeys
GetPlotters(CancellationToken)
Get info about installed and installable plotters
public Task<IDictionary<string, PlotterInfo>> GetPlotters(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenA token to allow the call to be cancelled
Returns
- Task<IDictionary<string, PlotterInfo>>
Dictionary of supported plotters
RegisterPlotter(CancellationToken)
Registers this instance as a plotter and retrieves the plot queue
public Task<IEnumerable<QueuedPlotInfo>> RegisterPlotter(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenA token to allow the call to be cancelled
Returns
- Task<IEnumerable<QueuedPlotInfo>>
The list of QueuedPlotInfos
StartPlotting(PlotterConfig, CancellationToken)
Starts plotting. Returns after plot is added to the plotting queue. Does not wait for plot to finish
public Task<IEnumerable<string>> StartPlotting(PlotterConfig config, CancellationToken cancellationToken = default)
Parameters
config
PlotterConfigThe config of the plot. Maps 1:1 to the chia plot create command line
cancellationToken
CancellationTokenA token to allow the call to be cancelled
Returns
- Task<IEnumerable<string>>
An awaitable Task
StopPlotting(string, CancellationToken)
Stops the plot with the given id
public Task StopPlotting(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the plot to stop. Can be found by inspecting the plot queue returned from RegisterPlotter(CancellationToken)
cancellationToken
CancellationTokenA token to allow the call to be cancelled