Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This section consists of the following:

Children Displaytoc

Block

The //@IzoT Block directive creates one or more blocks from a profile. The Block instruction syntax is as follows:

...

Block Syntax Elements

Syntax ElementPurpose
profileThe name of the profile, e.g.SFPTopenLoopSensor,UFPTheatExchanger.
type-modifierA name or number which, in combination with the profile name (and, if provided, the xxx-type name, produces a unique name for the block type.  You can use the block variable name for the type modifier.  When When a declaration implements multiple variables, you can use the name of the first.
xxx-typeThe datapoint type to use for all generically typed (SNVT_xxx) profile members.  This This type is only required if the profile implements generic datapoint members.
variableName of the global C variable which implements this item.  The The optional external name for this item.  This This name appears in the device’s public network interface and helps the network integrator to identify the functionality you provide.

external-name

When a block’s external name is provided, all members are automatically implemented with external names derived from the member names defined in the profile. When a block's external name is not provided, block members have no external name.

Assigning an external name simplifies device installation for network integrators.

member-name

This can be a datapoint member , or a block property member. To specify a property which applies to a datapoint member, use the datapoint member name and the property member name, separated by a period.  ExampleExample: nvoLoad.cpnLoadControl

array-size

This attribute can only be applied to properties.  The The size supplied must be within the rules for array implementations detailed within the profile.  If If the size is not specified, the minimum array size specified by the profile is implemented.

initial-value

The initial value for the named member, expressed as a C language static initializer.

You can specify any initial value, but the C compiler may report errors if the value provided does not meet the requirements of the type which is initialized.

You can specify an i-string construct to simplify initialization of string-type members within a resource.  For For example, i"room 101" is equivalent to {"room 101"}.

event-handler

The name of your event handler function.  The The function must be a global function (not static) and match the IzoT Device Stack DX API requirements for the corresponding event.  You You do not need to specify the function prototype, but you must supply the implementation of this function.

Datapoint

The //@IzoT Datapoint directive creates one or more device datapoints. The Datapoint instruction syntax is as follows:

Code Block
datapoint-declaration ::= datapoint-

...

type

...

 variables ; //@IzoT Datapoint[(datapoint-modifiers)[datapoint-attributes]

where:

...

Code Block
variables ::= variable | variable, variables 
variable ::= name | name[number] 
datapoint-modifiers :: datapoint-modifier | datapoint-modifier, datapoint-modifiers 
datapoint-modifier  ::= direction-identifier | locator 
locator ::= location="Izot Python Resources package path" 
direction-identifier ::= direction=(Input | Output) 
datapoint-attributes ::= datapoint-attribute | datapoint-attribute, datapoint-attributes 
datapoint-attribute  ::= authentication(enabled= True | False [, configurable=  True | False])     

...

	| comment("comment")     

...

	| external(external-name)     

...

	| init(initial-value)     

...

	| onComplete(event-handler)     

...

	| onUpdate(event-handler)     

...

	| persistent(enabled=  True | False  [, configurable=  True | False ])     

...

	| priority(enabled=  True | False  [, configurable=  True | False ])     

...

	| service(servicetype=  ACKD | UNACKD_RPT | UNACKD [, configurable=  True | False])

...

The authentication  attribute defaults to enabled=False, configurable=True.

The persistent attribute defaults to enabled=False, configurable=True.

The priority attribute defaults to enabled=False, configurable=True.

The service attribute defaults to servicetype=ACKD, configurable=True.

Datapoint Examples

Code Block
UNVT_test

...

 a, b, c; //@IzoT Datapoint 
SNVT_switch

...

 nviEnable; //@IzoT Datapoint(direction=Output)

Datapoint Syntax Elements

The initial value for the named member, expressed as a C language static initializer. You can specify any initial value, but the C compiler may report errors if the value provided does not meet the requirements of the type which is initialized.

You can specify an i-string construct to simplify initialization of string-type members within a resource. For example, i"room 101" is equivalent to {"room 101"}.

Syntax ElementPurpose
datapoint-typeThe name of the datapoint type, e.g., SNVT_switch,UNVT_lottery_numbers.


variableName of the global C variable that implements this item.
typeinitial-modifierA name or number which, in combination with the datapoint type name, produces a unique name for the datapoint implementation type. You can use the datapoint variable name for the type-modifier. When a declaration implements multiple variables, you can use the name of the first.
variableName of the global C variable that implements this item.
initial-value
event-handler

The name of your event handler function. The function must be a global function (not static) and match the IzoT Device Stack API requirements for the corresponding event. You do not have to specify the function prototype, but you must supply the implementation of this function.

Device Events

The //@IzoT Event directive registers one or more handlers for device-wide events. The Event instruction syntax is as follows:

event-declaration ::= //@IzoT Event[event-specs]

...

value

The initial value for the named member, expressed as a C language static initializer. You can specify any initial value, but the C compiler may report errors if the value provided does not meet the requirements of the type which is initialized.

You can specify an i-string construct to simplify initialization of string-type members within a resource. For example, i"room 101" is equivalent to {"room 101"}.

event-handler

The name of your event handler function. The function must be a global function (not static) and match the IzoT Device Stack API requirements for the corresponding event. You do not have to specify the function prototype, but you must supply the implementation of this function.

Device Events

The //@IzoT Event directive registers one or more handlers for device-wide events. The Event instruction syntax is as follows:

Code Block
event-declaration ::= //@IzoT Event[event-specs]

where

Code Block
event-specs ::= event-spec | event-spec, event-specs 
event-spec  ::= onOffline(event-handler)     

...

	| onOnline(event-handler)     

...

	| onReset(event-handler)     

...

	| onWink(event-handler)     

...

	| onService(event-handler)

Device Event Syntax Elements

Syntax ElementPurpose
Event-handlerThe name of your event handler function. The function must be a global function (not static) and match the IzoT Device Stack API requirements for the corresponding event. You do not have to specify the function prototype, but you must supply the implementation of this function.

Property

The //@IzoT Property directive creates one or more device properties. The Property instruction syntax is as follows:

Code Block
property-declaration ::= property-type variables; //@IzoTProperty[(locator)] [property-attributes]

where:

Code Block
variables ::= variable | variable, variables 
variable  ::= name | name[number] 
locator ::= location="Izot Python Resources package path" 
property-attributes ::= property-attribute | property-attribute, property-attributes 
property-attribute  ::= comment("comment")     

...

	| flags(flags-value)     

...

	| init(initial-value) 
flags-value ::= flag-value | flag-value + flags-value 

...

flag-value ::= Const     

...

	| DeviceSpecific     

...

	| Disable     

...

	| Manufacture     

...

	| Offline     

...

	| Reset

...

The flags attribute defaults to zero (no flag).

...

Code Block
SCPTlocation cpLocation; //@IzoT Property init("Room  101") 
SCPTnwrkCnfg configurationSource; //IzoT Property init(CFG_EXTERNAL), flags(Reset)

Tag

The //@IzoT Tag directive creates one or more messages. The Tag instruction syntax is as follows:

Code Block
tag-declaration ::= IzotTag variables ; //@IzoTTag[tag-attributes]

where:

Code Block
variables ::= variable | variable , variables 
variable ::= name | name[number] 
tag-attributes ::= tag-attribute | tag-attribute , tag-attributes 
tag-attribute  ::= bindable(True|False)

...

The bindable attribute defaults to True.

Tag Examples

Code Block
SCPTlocation cpLocation; //@IzoT Property init("Room  101") 
SCPTnwrkCnfg configurationSource; //IzoT Property init(CFG_EXTERNAL), flags(Reset)

Tag

The //@IzoT Tag directive creates one or more messages. The tag instruction syntax is as follows:

Code Block
tag-declaration ::= IzotTag variables ; //@IzoTTag[tag-attributes]

where:

Code Block
variables ::= variable | variable , variables 
variable ::= name | name[number] 
tag-attributes ::= tag-attribute | tag-attribute , tag-attributes 
tag-attribute  ::= bindable(True|False)

The bindable attribute defaults to True. Here are usage examples.

...

Usage examples are as follows:

Tag Examples

Code Block
IzotTag a, b;  //@IzoT Tag 
IzotTag c;     //@IzoT Tag bindable(False)

Option

The //@IzoT Option directive selects one or more options. The Option instruction syntax is as follows:

Code Block
option-declaration ::= Izot Option[option-attributes]

where:

Code Block
option-attribues ::= option-attribute | option-attribute , option-attributes 
option-attribute ::= addresses (0..

...

N)     

...

	| aliases(0..

...

N)     
	| api(VALUE)

...

	| authentication(True | False)     

...

	| buffersize(

...

20...

...

4096)

...

     
	| dynamic(blocks=0...N, datapoints=0..M)
	| explicit_addressing(True | False)
	| isi(True | False)

...

	| 

...

namespace(

...

IDENTIFIER)

...

	| 

...

Option Details

...

namestyle("v1" | "v2")
	| neutral(True | False )
	| output("output-filename")     
	| programId("program-id")
	| property_policy("datapoint" | "file")     
	| server(PATH)
	| servicebutton_held(0..31)
	| strict(True | False)     
	| target("cpm-4000" | "cpm-4200" | "shortstack-classic" | "xif")
	| variable(name, value)     
	| verbose(True | False)

Option Details

Option AttributePurpose
addresses

The number of address table entries to be allocated for the device. If not specified, the IzoT Interface Interpreter computes a number based on inspection of your application's interface. Target xif supports up to 4095 addresses, cpm-4200 and cpm-4000 targets support up to 254.

This option is not supported with ShortStack, where the number of addresses is an intrinsic property of the chosen Micro Server that cannot be changed with IML.

aliases

The number of alias table entries to be allocated for the device. If not specified, the IzoT Interface Interpreter computes a number based on inspection of your application's interface. Target xif supports up to 8191 aliases, cpm-4200 and cpm-4000 targets support up to 127 aliases.

This option is not supported with ShortStack, where the number of aliases is an intrinsic property of the chosen Micro Server that cannot be changed with IML.

api

This option selects API features as a combination of the following:

0 (the default) selects the basic API
1 adds local query and update functions
2 adds local utility functions.

This option is only available with ShortStack.

authentication

Enables authentication for the device. The default is False.

This option is only available with cpm-4000 and cpm-4200 targets.

buffersize

The requested minimum buffer size for all input and output buffers. The IzoT Device Stack allocates a buffer size equal to or larger than the requested number if possible, or fails to initialize if it cannot allocate  the requested buffer size. If not specified, the IzoT Interface Interpreter allocates buffers according to the size of the largest datapoint (plus required protocol  overhead). If a Tag object is declared, the IzoT Interface Interpreter  ensures that the minimum buffer size is at least 255 bytes.
 
Your explicit minimum buffer size request triggers warning 32 if it fails to meet the size required by the largest datapoint (and an allowance for protocol overhead). This warning becomes an error with the strict option.

dynamic

This option is supported with the xif target. The dynamic option accepts the number of dynamic blocks and datapoints to declare with the generated interface file. Both default to 0 (zero). The sum of dynamic and static datapoints cannot exceed 4096, and the number of dynamic blocks cannot exceed the number of dynamic datapoints.

Example:

//@IzoT Option dynamic(blocks=100, datapoints=1000)
explicit_ addressing

This option accepts a Boolean True or False to enable or disable explicit addressing support. The default is False.

This enables source addressing information for incoming messages and explicit addressing for outgoing application messages. Enabling this option enlarges the required data frame.

This option is only available with ShortStack targets. 

isi

This option accepts a Boolean True or False to enable or disable support for interoperable self-installation (ISI). The default is False.

This option is only available with ShortStack targets.

namespace

This option specifies a namespace for use with runtime interface selection. It accepts an identifier that must match this regular expression: [A-Za-z_][A-Za-z_0-9]*

This option is only available with ShortStack targets.

namestyle

This option can be used to affect the generation of external names for datapoints, as reported in the interface file (XIF) and the device's self-identification data. Valid values are "v1" and "v2". The default value is "v2".

  • namestyle "v1" yields names that are compatible with earlier releases of IzoT Interface Interpreter
  • 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

Example:

//@IzoT Option namestyle("v1")
neutral

This option accepts a Boolean True or False to enable or disable neutral output. The default is False.

In neutral mode, the tool produces neutral time, data and version information in the generated output. This is useful when comparing output generated from different versions, as is the case during automated regression testing.

This option can also be enabled with the IzoT Interface Interpreter command line option --neutral

output

The base name of the output files generated by the IzoT Interface Interpreter. The generated file names are basename.c and basename.h.

The default base name is IzoTDev so the default output file names are IzoTDev.c and IzoTDev.h (for cpm-4000 and cpm-4200), and ShortStackDev.c, ShortStackDev.h for ShortStack. 

The option has no effect with target xif.

programIdThe program ID for the device specified as a colon-separated string of hex digit pairs, e.g., 9F:FF:FF:00:00:00:00:01.
property_policy

Specifies the global property implementation policy as one of datapoint or file

The option is supported for ShortStack and XIF targets. 

server

Selects a ShortStack Micro Server.

Example: 

//@IzoT option server("microserver/standard/SS430_FT6050_SYS20000kHz")

The option is supported for ShortStack and XIF targets. 

servicebutton_held

Specifies the service pin held notification interval, 0 to 31 seconds. The default is 0.

The option is supported with ShortStack targets. 

strictChanges some of the generated warnings to errors.
target

The target platform for the application, one of: cpm-4000, cpm-4200, shortstack-classic, or xif.

Example:

//@IzoT option target("shortstack-classic")

Most IML options require that the target is specified before the option can be selected. It is recommended to declare the target option at the start of the IML declarations. 

Some installations of IzoT Interface Interpreter set the default value of this option to the target that matches the installation, but it is generally best to always declare the target. This ensures portability of the IML instructions between different installations.

This option can also be set with the IzoT Interface Interpreter command line option --target.

variableDefines or modifies a variable in the IzoT Interface Interpreter's environment. These variables are defined as a name, value pair, and may be referenced in some Interface Interpreter output using UNIX-style $name $name or ${name} references.
verbose

Enables verbose IzoT Interface Interpreter output. The default is False

This option can also be selected with the IzoT Interface Interpreter command line option --verbose.