Table of Contents

Class AlarmTemplateHelper

Namespace
Skyline.DataMiner.Net.AlarmTemplateHelper
Assembly
SLNetTypes.dll

Allows manipulation of alarm templates: This helper can be used to extract parameter rows from an AlarmTemplate and add them to or update them on other AlarmTemplates.

public class AlarmTemplateHelper
Inheritance
AlarmTemplateHelper
Extension Methods

Examples

AlarmTemplateHelper helper = new AlarmTemplateHelper(engine.SendSLNetMessages);

var id = new AlarmTemplateID("AlarmTemplate", "Protocol", "1.0.0.0");
var rowId = new AlarmTemplateRowID(1, "condition", "filter");
var rowList = new List<AlarmTemplateRowID> { rowId };
var row = helper.GetAlarmTemplateRowsFromServer(id, rowList);

helper.DeleteAlarmTemplateRowsOnServer(_id, row);

Remarks

  • A row will be returned as an AlarmTemplateRow object containing the AlarmTemplateRowID, all parameter values (in a GetAlarmTemplateResponseMessage) and the full condition.
  • When a row is deleted, the condition will only be deleted if it is not used by any other parameter.
  • When an existing row is merged, the parameter values will be updated, and the parameter will have the same index in the list.
  • When a new row is merged, it will be added at the bottom of the list.
  • Only parameter rows that are set to "Included" can be extracted and merged.

Constructors

AlarmTemplateHelper(Func<DMSMessage[], DMSMessage[]>)

Initializes a new instance of the AlarmTemplateHelper class.

Methods

DeleteAlarmTemplateRow(AlarmTemplateEventMessage, AlarmTemplateRow)

Deletes the specified alarm template rows from the specified alarm template.

DeleteAlarmTemplateRows(AlarmTemplateEventMessage, List<AlarmTemplateRow>)

Returns an AlarmTemplateEventMessage where the parameters defined by the AlarmTemplateRows are removed. The conditions will also be removed if there are no links anymore.

DeleteAlarmTemplateRowsOnServer(AlarmTemplateID, List<AlarmTemplateRow>)

Deletes the specified alarm template rows from the specified alarm template.

GetAlarmTemplateRow(AlarmTemplateEventMessage, AlarmTemplateRowID)

Returns the alarm template row with the specified alarm template row ID.

GetAlarmTemplateRows(AlarmTemplateEventMessage, List<AlarmTemplateRowID>)

Returns a list of AlarmTemplateRow objects that were requested by the list of AlarmTemplateRowIDs.

GetAlarmTemplateRowsFromServer(AlarmTemplateID, List<AlarmTemplateRowID>)

Retrieves the specified alarm template rows from the server.

MergeAlarmTemplateRow(AlarmTemplateEventMessage, AlarmTemplateRow, bool)

Returns an AlarmTemplateEventMessage where the parameter defined by the AlarmTemplateRow is merged.

MergeAlarmTemplateRows(AlarmTemplateEventMessage, List<AlarmTemplateRow>)

Merges the specified rows with the specified template.

MergeAlarmTemplateRowsOnServer(AlarmTemplateID, List<AlarmTemplateRow>)

Merges the specified rows with the specified template.

UpdateAlarmTemplateRow(AlarmTemplateEventMessage, AlarmTemplateRow)

Updates parameter data in the target AlarmTemplate, when no data to update is found, an exception is thrown.

UpdateAlarmTemplateRows(AlarmTemplateEventMessage, List<AlarmTemplateRow>)

Updates the specified alarm template with the specified rows.

UpdateAlarmTemplateRowsOnServer(AlarmTemplateID, List<AlarmTemplateRow>)

Updates the specified alarm template with the specified rows.