-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated WHATS_NEW, version numbers and dependencies Added new IPC command to invalidate codes and files Added new OM properties from RRF Implemented support for file redirections of echo command Minor refactoring Bug fix: Under certain cirumstances prints could not be cancelled properly
- Loading branch information
Showing
29 changed files
with
220 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using DuetAPI.Utility; | ||
|
||
namespace DuetAPI.Commands | ||
{ | ||
/// <summary> | ||
/// Invalidate all pending codes and files on a given channel (including buffered codes from DSF in RepRapFirmware) | ||
/// </summary> | ||
[RequiredPermissions(SbcPermissions.CodeInterceptionReadWrite)] | ||
public class InvalidateChannel : Command | ||
{ | ||
/// <summary> | ||
/// Code channel to invalidate | ||
/// </summary> | ||
public CodeChannel Channel { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/DuetControlServer/Commands/Generic/InvalidateChannel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using DuetControlServer.IPC; | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace DuetControlServer.Commands | ||
{ | ||
/// <summary> | ||
/// Implementation of the <see cref="DuetAPI.Commands.InvalidateChannel"/> command | ||
/// </summary> | ||
public sealed class InvalidateChannel : DuetAPI.Commands.InvalidateChannel, IConnectionCommand | ||
{ | ||
/// <summary> | ||
/// Source connection of this command | ||
/// </summary> | ||
public Connection Connection { get; set; } | ||
|
||
/// <summary> | ||
/// Wait for all pending codes of the given channel to finish | ||
/// </summary> | ||
/// <returns>Asynchronous task</returns> | ||
public override async Task Execute() | ||
{ | ||
// Check if the corresponding code channel has been disabled | ||
using (await Model.Provider.AccessReadOnlyAsync()) | ||
{ | ||
if (Model.Provider.Get.Inputs[Channel] == null) | ||
{ | ||
throw new InvalidOperationException("Requested code channel has been disabled"); | ||
} | ||
} | ||
|
||
// Wait for all codes and files to be invalidated | ||
await SPI.Interface.AbortAll(Channel); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.