Skip to content

Global Variables API

dbaechtel edited this page Mar 27, 2017 · 1 revision

Global Variables API

The GlobalVariable API provides several different types of information for global variables. Global variable name, total number of global variables, etc.

GlobalVariableCheck
GlobalVariableDel
GlobalVariableGet
GlobalVariableName
GlobalVariableSet
GlobalVariableSetOnCondition
GlobalVariablesDeleteAll
GlobalVariablesTotal

GlobalVariableCheck

Checks the existence of a global variable with the specified name

protected bool GlobalVariableCheck(string name)

Parameters

  • name - Global variable name

Returns

  • Returns true, if the global variable exists, otherwise returns false

GlobalVariableDel

Deletes a global variable from the client terminal.

protected bool GlobalVariableDel(string name)

Parameters

  • name - Global variable name

Returns

  • If successful, the function returns true, otherwise it returns false

GlobalVariableGet

Returns the value of an existing global variable of the client terminal

protected double GlobalVariableGet(string name)

Parameters

  • name - Global variable name

Returns

  • The value of the existing global variable or 0 in case of an error

GlobalVariableName

Returns the name of a global variable by its ordinal number

protected string GlobalVariableName(int index)

Parameters

  • index - Sequence number in the list of global variables

Returns

  • Global variable name by its ordinal number in the list of global variables

GlobalVariableSet

Sets a new value for a global variable. If the variable does not exist, the system creates a new global variable

protected datetime GlobalVariableSet(string name, double value)

Parameters

  • name - Global variable name
  • value - The new numerical value

Returns

  • If successful, the function returns the last modification time, otherwise 0

GlobalVariableSetOnCondition

Sets the new value of the existing global variable if the current value equals to the third parameter checkValue

protected bool GlobalVariableSetOnCondition(string name, double value, double checkValue)

Parameters

  • name - The name of a global variable
  • value - New value
  • checkValue - The value to check the current value of the global variable

Returns

  • If successful, the function returns true, otherwise it returns false

GlobalVariablesDeleteAll

Deletes global variables of the client terminal with specified prefix

protected int GlobalVariablesDeleteAll(string prefixName = "")

Parameters

  • prefixName - Prefix (empty string is default value)

Returns

  • The number of deleted variables

GlobalVariablesTotal

Returns the total number of global variables of the client terminal

protected int GlobalVariablesTotal()

Returns

  • Number of global variables

Clone this wiki locally