Class LockRequest
Queued lock/unlock request
Inheritance
System.Object
LockRequest
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DuetControlServer.SPI.Channel
Assembly: DuetControlServer.dll
Syntax
public class LockRequest
Constructors
LockRequest(Boolean)
Creates a new queued lock/unlock request instance
Declaration
public LockRequest(bool isLockRequest)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | 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 |
---|---|
System.Boolean |
IsLockRequested
Indicates if the lock request has been sent to the firmware
Declaration
public bool IsLockRequested { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
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 |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
Methods
Resolve(Boolean)
Resolve the pending task with the given result
Declaration
public void Resolve(bool lockAcquired)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | lockAcquired | Whether the lock could be acquired |