Skip to main content

system.kanoa.asset.getModeSourceId

Requires kanoaOPS license

Description

Returns the modeSourceId for a given modeSourceName. Used to store info on who set the modeEvent i.e. Operator, schedule, plc, etc.

Syntax

getModeSourceId(modeSourceName)

Parameters:
  • modeSourceName (string): The name of the mode source

  • Returns:
  • modeSourceId (int): The ID corresponding to the modeSourceName
  • Code Examples

    # Example Usage:
    mode_source_id = system.kanoa.asset.getModeSourceId('Operator')
    print(f"The modeSourceId for 'Operator' is {mode_source_id}.")