UniSet 2.45.1
Пространство имен st2js.fb_registry

Классы

class  FBInfo

Функции

None _register (FBInfo info)
bool needs_codesys_library (list fb_instances)
FBInfo|None get_fb_info (str name)
int load_lib_types (str yaml_path)
bool is_standard_fb (str name)

Подробное описание

Registry of standard IEC 61131-3 function blocks for uniset2-iec61131.js.

Maps IEC 61131-3 FB type names to their JavaScript class equivalents,
including constructor arguments, update() parameters, and output properties.

Функции

◆ _register()

None st2js.fb_registry._register ( FBInfo info)
protected
Register a function block in the internal registry.

◆ get_fb_info()

FBInfo | None st2js.fb_registry.get_fb_info ( str name)
Look up function block info by IEC 61131-3 type name.

Args:
    name: FB type name (case-sensitive, e.g. "TON").

Returns:
    FBInfo if known, None otherwise.

◆ is_standard_fb()

bool st2js.fb_registry.is_standard_fb ( str name)
Check whether a name refers to a standard IEC 61131-3 function block.

Args:
    name: FB type name (case-sensitive).

Returns:
    True if the name is in the standard FB registry.

◆ load_lib_types()

int st2js.fb_registry.load_lib_types ( str yaml_path)
Load external FB type definitions from a YAML file and register them.

YAML format:
    function_blocks:
      TypeName:
        inputs:
          ParamName: TYPE
        outputs:
          ParamName: TYPE

Returns:
    Number of types registered.

◆ needs_codesys_library()

bool st2js.fb_registry.needs_codesys_library ( list fb_instances)
Check if any FB instance requires the Codesys library.