Table of Contents

Method GetParameter

Namespace
Skyline.DataMiner.Scripting
Assembly
SLManagedScripting.dll

GetParameter(int)

Retrieves the value of the parameter with the specified ID.

object GetParameter(int iID)

Parameters

iID int

The ID of the parameter.

Returns

object

The value of the parameter. If no parameter with the specified ID exists in the protocol, null is returned.

Examples

string myValue = Convert.ToString(protocol.GetParameter(100));

In order to avoid magic numbers, you can make use of the Parameter class.

string myValue = Convert.ToString(protocol.GetParameter(Parameter.myparameter));

Remarks

  • This is a wrapper method for the Notify type 73 NT_GET_PARAMETER call.
  • When a GetParameter call is executed for a parameter that does not exist in the protocol, null is returned and the following message will be logged “NT_GET_PARAMETER for [parameterID] failed. 0x80040239”.
  • When calling this method on a numeric standalone parameter(i.e.a parameter having RawType set to either numeric text, signed number or unsigned number) that is not initialized, 0 will be returned.To determine whether a standalone parameter is uninitialized, the IsEmpty(int) method should be used.