Page tree
Skip to end of metadata
Go to start of metadata

An IzoT application follows the order of initialization phase, runtime phase, and shutdown phase. To create your IzoT application, create a single Framework object, and then call the app_start(). You must call the app.stop() method before the application object goes out of scope.

from izot.examples.common.framework.framework import Framework 
from izot.examples.common.framework.framework import ApplicationType 

APP_NAME = 'The application name' 
APP_DESCRIPTION = 'The IzoT example application' 
APP_TYPE = ApplicationType.OTHER 
PROGRAM_ID='9F:FF:FF:05:00:00:00:00' 

def main(): 
	framework=Framework(APP_NAME,APP_TYPE,APP_DESCRIPTION,PROGRAM_ID) 

	framework.app_start() 

	done = False 
	while not done: 
		app.service(0.100) 

	app.stop()

namestyle Property

The Application object namestyle property accepts valid values of "v1" and "v2". The default is "v2".

The namestyle selection affects the generation of external names for datapoints, as reported in the interface file (XIF) and the device's self-identification data.

  • namestyle "v1" yields names that are compatible with earlier releases of IzoT SDK and the tools that use it
  • namestyle "v2" yields names that meet IzoT CT expectations, which results in a cleaner user interface when using automatically-generated datapoint names in a drawing

Possible API errors that may raised include:

  • #2019 indicating "unknown namestyle"
  • #2020 indicating "no unique name," when a unique external name cannot be found for a given datapoint

Example

my_app.namestyle = "v1"

block Factory Method

The block() factory method supports two optional arguments: elements and element.

The elements and element values can be supplied to indicate that this block implements an element in a block array of elements items at zero-based index element.

While this information is optional, it helps guide the generation of external names for block member datapoints when namestyle "v2" is selected.

Example

_my_block = my_app.block( ..., elements=5, element=0)



  • No labels