BooleanConstant

block BooleanConstant "Generate constant signal of type Boolean"
    parameter Boolean k = true "Constant output value"
        annotation (Dialog(groupImage = "modelica://Modelica/Resources/Images/Blocks/Sources/BooleanConstant.png"));

    extends Interfaces.partialBooleanSource;
equation
    y = k;

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Line(points = {
                    {-80, 0}, 
                    {80, 0}}), 
                Text(
                    extent = {
                        {-150, -140}, 
                        {150, -110}},
                    textString = "%k")}),
        Diagram(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Line(
                    points = {
                        {-70, 0}, 
                        {80, 0}},
                    color = {0, 0, 255},
                    thickness = 0.5), 
                Text(
                    extent = {
                        {-69, 20}, 
                        {-49, 0}},
                    textString = "k"), 
                Text(
                    extent = {
                        {-96, 6}, 
                        {-76, -4}},
                    textString = "true"), 
                Text(
                    extent = {
                        {-98, -58}, 
                        {-72, -68}},
                    textString = "false")}),
        Documentation(info = "<html>\n<p>\nThe Boolean output y is a constant signal:\n</p>\n\n<p>\n<img src=\"modelica://Modelica/Resources/Images/Blocks/Sources/BooleanConstant.png\"\n     alt=\"BooleanConstant.png\">\n</p>\n</html>"));
end BooleanConstant;