#!/usr/bin/python3
# This file was automatically generated from drawio2cbd with the command:
#   /home/red/git/DrawioConvert/__main__.py Test.drawio -e Test -Ssargv -F CBD -E delta=0.1

from pyCBD.Core import *
from pyCBD.lib.std import *

DELTA_T = 0.1

class Test(CBD):
    def __init__(self, block_name):
        CBD.__init__(self, block_name, input_ports=[], output_ports=['y'])

        # Create the Blocks
        self.addBlock(IntegratorBlock("int"))
        self.addBlock(ConstantBlock("IC", value=(0)))
        self.addBlock(ProductBlock("mult"))
        self.addBlock(AdderBlock("sum"))
        self.addBlock(ConstantBlock("one", value=(1)))

        # Create the Connections
        self.addConnection("IC", "int", input_port_name='IC', output_port_name='OUT1')
        self.addConnection("int", "mult", input_port_name='IN1', output_port_name='OUT1')
        self.addConnection("int", "mult", input_port_name='IN2', output_port_name='OUT1')
        self.addConnection("int", "y", output_port_name='OUT1')
        self.addConnection("mult", "sum", input_port_name='IN2', output_port_name='OUT1')
        self.addConnection("one", "sum", input_port_name='IN1', output_port_name='OUT1')
        self.addConnection("sum", "int", input_port_name='IN1', output_port_name='OUT1')


