.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 Grammar 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 2024-12-03T19:25:34Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos