Class LockRequest
Queued lock/unlock request
Inherited Members
Namespace: DuetControlServer.SPI.Channel
Assembly: DuetControlServer.dll
Syntax
public class LockRequest
Constructors
LockRequest(bool)
Creates a new queued lock/unlock request instance
Declaration
public LockRequest(bool isLockRequest)
Parameters
Type | Name | Description |
---|---|---|
bool | isLockRequest | Whether the resource shall be locked |
Properties
IsLockRequest
Indicates if this is a lock or unlock request
Declaration
public bool IsLockRequest { get; }
Property Value
Type | Description |
---|---|
bool |
IsLockRequested
Indicates if the lock request has been sent to the firmware
Declaration
public bool IsLockRequested { get; set; }
Property Value
Type | Description |
---|---|
bool |
Task
Awaitable task returning true if the lock could be acquired. It returns false if the controller is reset or an emergency stop occurs
Declaration
public Task<bool> Task { get; }
Property Value
Type | Description |
---|---|
Task<bool> |
Methods
Resolve(bool)
Resolve the pending task with the given result
Declaration
public void Resolve(bool lockAcquired)
Parameters
Type | Name | Description |
---|---|---|
bool | lockAcquired | Whether the lock could be acquired |