!Const¶
The !Const tag is used to tie a port of a module to a constant value, rather than connecting it to another module. For more information on describing interconnectivity, see the !Connect and !Mod tag descriptions.
Note
In the future !Def and !Const tags may be merged into one new tag in order to reduce complexity of the schema.
Usage¶
The !Const tag is primitive, so it is preferable to use sequence rather than mapping syntax - although both are allowed:
- !Connect
const:
- !Point [a_port, child_block]
- !Const [1]
- !Connect
const:
- !Point [b_port, child_block]
- !Const
value: 2
-
class
blade.schema.ph_const.Const(value, name='unknown')¶ Defines a constant value tie for a port
-
__init__(value, name='unknown')¶ Initialisation of the !Const tag
- Parameters
value – The value to tie the port to
name – Optional name for the value
-
validate()¶ Check that this tag agrees with our YAML schema
-