Table of Contents

Method GetAlarmLevel

Namespace
Skyline.DataMiner.Core.DataMinerSystem.Common
Assembly
Skyline.DataMiner.Core.DataMinerSystem.Common.dll

GetAlarmLevel(string)

Retrieves the alarm level of the cell that corresponds with the specified key.

[Obsolete("Use the overload with the additional KeyType argument instead.")]
AlarmLevel GetAlarmLevel(string key)

Parameters

key string

The key of the row.

Returns

AlarmLevel

The alarm level.

Examples

IDms myDms = protocol.GetDms();
IDmsElement element = myDms.GetElement(new DmsElementId(346, 100));
var table = element.GetTable(1000);
var column = table.GetColumn<double?>(1004);

string displayKey = "DK 1";
var alarmLevel = column.GetAlarmLevel(displayKey);

Remarks

The key is assumed to be the display key. If no display key was found with the specified value, but a row exists with a primary key with the specified value, then the value of that row will be returned (only the case if the naming option or NamingFormat is in the protocol XML is used, not for the deprecated displayColumn attribute).

Do not use this call with primary keys in case the primary key value is also used as display key of another row.

This overload is deprecated. Use the overload with the additional KeyType argument instead.

Exceptions

ArgumentNullException

key is null.

ArgumentException

key is empty ("") or white space.

ElementStoppedException

The element is stopped.

ElementNotFoundException

The element was not found in the DataMiner System.

ParameterNotFoundException

The parameter was not found.

GetAlarmLevel(string, KeyType)

Retrieves the alarm level of the cell that corresponds with the specified key.

AlarmLevel GetAlarmLevel(string key, KeyType keyType)

Parameters

key string

The key of the row.

keyType KeyType

The key type.

Returns

AlarmLevel

The alarm level.

Examples

IDms myDms = protocol.GetDms();
IDmsElement element = myDms.GetElement(new DmsElementId(346, 100));
var table = element.GetTable(1000);
var column = table.GetColumn<double?>(1004);

string primaryKey = "PK 1";
var alarmLevel = column.GetAlarmLevel(primaryKey, KeyType.PrimaryKey);

Exceptions

ArgumentNullException

key is null.

ArgumentException

key is empty ("") or white space.

ElementStoppedException

The element is stopped.

ElementNotFoundException

The element was not found in the DataMiner System.

ParameterNotFoundException

The parameter was not found.