TaskMaintenanceTriggerEnum Enumeration: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:


<onlyinclude>Specifies which event in the maintenance group(s) triggers the task.</onlyinclude>
<onlyinclude>Specifies which event in the maintenance group(s) triggers the task.</onlyinclude>
Note: In the <code>Maintenance Triggers</code> property of the <code>[[CScheduledTask Class|cScheduledTask class]]</code>, you can set two or more triggers by taking the sum of the values of the events or by using a logical "OR." For example, to trigger the task when a corrective (value=2) or preventive (value=4) maintenance starts, you would set the value of the property to 6.


==Members==
==Members==
{| {{APITableEnum}}
{| {{APITableEnum}}
|-
|-
| style="width: 160px;"|BlockFails||style="width: 70px;"|1||The task is performed when a block in the maintenance group fails.
| style="width: 160px;"|NoTriggers||style="width: 70px;"|0||No task is performed.
|-
|BlockFails||1||The task is performed when a block in the maintenance group fails.
|-
|-
|CorrectiveMaintenance||2||The task is performed when a block in the maintenance group starts corrective maintenance.
|CorrectiveMaintenance||2||The task is performed when a block in the maintenance group starts corrective maintenance.
Line 21: Line 21:




'''Notes:'''
The <code>Maintenance Triggers</code> property of the <code>[[CScheduledTask Class|cScheduledTask class]]</code> allows you to get or set more than one trigger by taking the sum of the values of the events. For example, a property value of 6 indicates that the task is triggered when a corrective maintenance (value=2) or preventive maintenance (value=4) starts.
Alternatively, you can set a combination of triggers by using the logical <code>Or</code> operator. For example, the following VB.NET code sets two triggers:
  {{APIPrefix|Dim}} t {{APIPrefix|As New}} cScheduledTask 
  {{APIComment|'Set the property}}
  t.MaintenanceTriggers = TaskMaintenanceTriggerEnum.BlockFails {{APIPrefix|Or}} TaskMaintenanceTriggerEnum.BlockRestored





Revision as of 16:02, 14 January 2016

APIWiki.png


Member of: SynthesisAPI


Specifies which event in the maintenance group(s) triggers the task.

Members

Name Value Description
NoTriggers 0 No task is performed.
BlockFails 1 The task is performed when a block in the maintenance group fails.
CorrectiveMaintenance 2 The task is performed when a block in the maintenance group starts corrective maintenance.
PreventiveMaintenance 4 The task is performed when a block in the maintenance group starts preventive maintenance.
Inspection 8 The task is performed when a block in the maintenance group starts inspection.
BlockRestored 16 The task is performed when a block in the maintenance group is restored to operation.


Notes:

The Maintenance Triggers property of the cScheduledTask class allows you to get or set more than one trigger by taking the sum of the values of the events. For example, a property value of 6 indicates that the task is triggered when a corrective maintenance (value=2) or preventive maintenance (value=4) starts.

Alternatively, you can set a combination of triggers by using the logical Or operator. For example, the following VB.NET code sets two triggers:

  Dim t As New cScheduledTask  
  'Set the property  
  t.MaintenanceTriggers = TaskMaintenanceTriggerEnum.BlockFails Or TaskMaintenanceTriggerEnum.BlockRestored



See Also