blark.transform.FunctionCall

class blark.transform.FunctionCall(name: SimpleVariable | MultiElementVariable, parameters: List[ParameterAssignment], dereferenced: bool, meta: Meta | None = None)[source]

Bases: Expression

A function (function block, method, action, etc.) call.

The return value may be dereferenced with a carat (^).

Examples:

A()^
A(1, 2)
A(1, 2, sName:='test', iOutput=>)
A.B[1].C(1, 2)

Lark grammar

This class is used by the following grammar rules:

function_call

function_call: symbolic_variable "(" [ param_assignment ( "," param_assignment )* ","? ] ")" DEREFERENCED?

Methods

__init__(name, parameters, dereferenced[, meta])

from_lark(name, *params)

Attributes

base_type_name

The base type name.

full_type_name

The full type name, including any dereferencing or subscripts.

meta

value

The initialization value (the function call itself).

name

The function name.

parameters

Positional, naed, or output parameters.

dereferenced

Dereference the return value?

name: SimpleVariable | MultiElementVariable

The function name.

parameters: List[ParameterAssignment]

Positional, naed, or output parameters.

dereferenced: bool

Dereference the return value?

meta: Meta | None = None
property base_type_name: str

The base type name.

This is used as part of the summary mechanism. The “type” is that of the underlying function block or function.

property full_type_name: str

The full type name, including any dereferencing or subscripts.

property value: str

The initialization value (the function call itself).

This is used as part of the summary tool.

static from_lark(name: SimpleVariable | MultiElementVariable, *params: ParameterAssignment | Token | None) FunctionCall[source]
__init__(name: SimpleVariable | MultiElementVariable, parameters: List[ParameterAssignment], dereferenced: bool, meta: Meta | None = None) None