This function diodeNoBypassCode calculates the currents (and the capacitances) that are necessary for the currents to be used in the top-level model.
function diodeNoBypassCode extends Modelica.Icons.Function; input DiodeModelLineParams in_p "Input record model line parameters for diode"; input DiodeParams in_dp "Input record with parameters for diode"; input DiodeCalc in_c "Input record DiodeCalc"; input Model.Model in_m "Input record model"; input Boolean in_m_mbInit; input SI.Voltage[2] in_m_pVoltageValues; output CurrentsCapacitances out_cc "Output record with calculated currents and capacitances"; output Types.Capacitance m_dCap "Output capacitance"; end diodeNoBypassCode;