Skip to content
LIBRARY
Sources.IntegerConstant.md

Sources.IntegerConstant

Generate constant signal of type Integer.

The Integer output y is a constant signal equal to the parameter k.

Mirrors Modelica.Blocks.Sources.IntegerConstant.

This component extends from BlockComponents.Interfaces.IntegerSO

Usage

BlockComponents.Sources.IntegerConstant(k)

Parameters:

NameDescriptionUnitsDefault value
kConstant output value

Connectors

  • y - This connector represents an integer signal as an output from a component (IntegerOutput)

Behavior

Source

dyad
"""
Generate constant signal of type Integer.

The Integer output `y` is a constant signal equal to the parameter `k`.

Mirrors `Modelica.Blocks.Sources.IntegerConstant`.
"""
component IntegerConstant
  extends BlockComponents.Interfaces.IntegerSO
  "Constant output value"
  parameter k::Integer
relations
  y = k
metadata {
  "Dyad": {
    "labels": [
      {"label": "k = $(k)", "x": 500, "y": 1100, "rot": 0},
      {"label": "$(instance)", "x": 500, "y": -150, "rot": 0}
    ],
    "icons": {"default": "dyad://BlockComponents/IntegerConstant.svg"}
  }
}
end
Flattened Source
dyad
"""
Generate constant signal of type Integer.

The Integer output `y` is a constant signal equal to the parameter `k`.

Mirrors `Modelica.Blocks.Sources.IntegerConstant`.
"""
component IntegerConstant
  "Connector of Integer output signal"
  y = IntegerOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 560, "rot": 0}
      },
      "tags": []
    }
  }
  "Constant output value"
  parameter k::Integer
relations
  y = k
metadata {
  "Dyad": {
    "labels": [
      {"label": "k = $(k)", "x": 500, "y": 1100, "rot": 0},
      {"label": "$(instance)", "x": 500, "y": -150, "rot": 0}
    ],
    "icons": {"default": "dyad://BlockComponents/IntegerConstant.svg"}
  }
}
end


Test Cases

No test cases defined.