.ModelicaReference.Classes.'block'

Information

Define specialized class block

Examples

block Integrator
  input Real u;
  output Real y;
protected
  Real x;
equation
  der(x) = u;
  y = x;
end Integrator;

Syntax

   [ encapsulated ][ partial ] block
   IDENT class_specifier

class_specifier :
   string_comment composition end IDENT
   | "=" base_prefix name [ array_subscripts ] [ class_modification ] comment
   | "=" enumeration "(" ( [enum_list] | ":" ) ")" comment

See Modelica Language Specification for further details.

Description

A block class is the same as a model class with the restriction that each connector component of a block must have prefixes input and/or output for all connector variables. The purpose is to model input/output blocks of block diagrams. Due to the restrictions on input and output prefixes, connections between blocks are only possible according to block diagram semantic.


Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39