Class Mastership
Defines mastership status of a robot controller resource.
Inheritance
Namespace: ABB.Robotics.Controllers
Assembly: ABB.Robotics.Controllers.PC.dll
Syntax
public sealed class Mastership : IMastershipResource, IDisposable
Properties
IsMaster
True if the object is holding mastership, false if not.
Declaration
public bool IsMaster { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsRobotWare7
Declaration
public bool IsRobotWare7 { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ReleaseOnDispose
Gets or sets a flag to indicate if the object shall release its mastership during Dispose or not, this shall ONLY be changed if a operation forces the controller to a restart; otherwise leave this as is.
Declaration
public bool ReleaseOnDispose { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Dispose()
Disposes this object.
Declaration
public void Dispose()
Ensure()
Ensures new mastership.
Declaration
public void Ensure()
Ensure(IMastershipResource)
Ensure method helps for temporarily obtaining mastership for a Controller with MastershipPolicy set to Automatic (typically a VC).
Declaration
public static Mastership Ensure(IMastershipResource resource)
Parameters
Type | Name | Description |
---|---|---|
IMastershipResource | resource | Resource to ensure mastership for. |
Returns
Type | Description |
---|---|
Mastership | An object holding mastership of a specific resource. |
Remarks
The operating mode is automatically set to Automatic for a VC connection if needed. Resources that were already held are not released when the returned token is disposed. If the Controller has MastershipPolicy set to Manual, or if the requested resources are already held, this method does nothing.
Finalize()
Releases the mastership as the object goes through the GC.
Declaration
protected void Finalize()
Release()
Releases any held mastership.
Declaration
public void Release()
Request()
Requests new mastership.
Declaration
public void Request()
Request(IMastershipResource)
Requests mastership of a specified controller resource
Declaration
[Obsolete("Use Request(IMastershipResourceController), which requests mastership for all resources")]
public static Mastership Request(IMastershipResource resource)
Parameters
Type | Name | Description |
---|---|---|
IMastershipResource | resource | Resource to request mastership for. |
Returns
Type | Description |
---|---|
Mastership | An object holding mastership of a specific resource. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Mastership is already held by a client. |
Request(IMastershipResourceController)
Requests mastership of a specified controller
Declaration
public static Mastership Request(IMastershipResourceController resourceCtrl)
Parameters
Type | Name | Description |
---|---|---|
IMastershipResourceController | resourceCtrl | The controller to request mastership for. |
Returns
Type | Description |
---|---|
Mastership | An object holding mastership of the controller. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Mastership is already held by a client. |
Events
MastershipChanged
Please use MastershipChanged or MastershipChanged instead.
Declaration
[Obsolete("Use Controller.Rapid.MastershipChanged or Controller.Configuration.MastershipChanged instead.")]
public event EventHandler<MastershipChangedEventArgs> MastershipChanged
Event Type
Type | Description |
---|---|
System.EventHandler<MastershipChangedEventArgs> |