%if EXISTS("_BLKIO_API_") == 0
%assign _BLKIO_API_ = 1
%include "blkio_internalapi.tlc"
%function LibBlockInputSignalNumDimensions(portIdx) void
%<LibGetInputPortRecordIsValid(portIdx)>
%return CGMODEL_ACCESS("Block.InputSignalNumDimensions", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockInputSignalWidth(portIdx) void
%return CGMODEL_ACCESS("Block.InputSignalWidth", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockInputSignalDimensions(portIdx) void
%return CGMODEL_ACCESS("Block.InputSignalDimensions", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibCGTypeNumDimensions(idx) void
%return CGMODEL_ACCESS("CGType.GetNumDimensions", idx)
%endfunction
%function LibBlockInputSignalIsComplex(portIdx) void
%<LibGetInputPortRecordIsValid(portIdx)>
%return CGMODEL_ACCESS("Block.InputSignalIsComplex", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockInputSignalDataTypeId(portIdx) void
%<LibGetInputPortRecordIsValid(portIdx)>
%return CGMODEL_ACCESS("Block.InputSignalDataTypeId", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockInputSignalAllowScalarExpandedExpr(block,ipIdx) void
% block.BlockIdx[0], block.BlockIdx[2], ipIdx, 1)>
%endfunction
%function LibBlockInputSignalIsFrameData(portIdx) void
%<LibGetInputPortRecordIsValid(portIdx)>
%return CGMODEL_ACCESS("Block.InputSignalIsFrameData", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockOutputSignalIsFrameData(portIdx) void
%return CGMODEL_ACCESS("Block.OutputSignalIsFrameData", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockInputSignalIsExpr(portIdx) void
%if ::CompiledModel.GeneratingOutputsCode
%return CGMODEL_ACCESS("Block.InputSignalIsExpr", BlockIdx[0], BlockIdx[2], portIdx)
%else
%return TLC_FALSE
%endif
%endfunction
%function LibBlockInputSignalIsTrivialExpr(portIdx) void
%if ::CompiledModel.GeneratingOutputsCode
%return CGMODEL_ACCESS("Block.InputSignalIsTrivialExpr", BlockIdx[0], BlockIdx[2], portIdx)
%else
%return TLC_FALSE
%endif
%endfunction
%function LibBlockOutputSignalIsTrivialExpr(portIdx) void
%if ::CompiledModel.GeneratingOutputsCode
%return CGMODEL_ACCESS("Block.OutputSignalIsTrivialExpr", BlockIdx[0], BlockIdx[2], portIdx)
%else
%return 0
%endif
%endfunction
%function LibBlockOutputSignalIsConstExpr(portIdx) void
%return CGMODEL_ACCESS("Block.OutputSignalIsConstExpr", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockOutputSignalIsNonConstExpr(portIdx) void
%if ::CompiledModel.GeneratingOutputsCode
%return LibBlockOutputSignalIsExprInOutputs(portIdx) && ...
! LibBlockOutputSignalIsConstExpr(portIdx)
%else
%return 0
%endif
%endfunction
%function LibBlockOutputSignalIsExpr(portIdx) void
%if ::CompiledModel.GeneratingOutputsCode
%if NumDataOutputPorts < 1
%assign warningString = "LibBlockOutputSignalIsExpr should only be called on a block with 1 or more output ports"
%<LibReportWarning(warningString)>
%return 0
%else
%return LibBlockOutputSignalIsExprInOutputs(portIdx)
%endif
%else
%return 0
%endif
%endfunction
%function LibBlockOutputSignalIsExprInOutputs(portIdx) void
%return CGMODEL_ACCESS("Block.OutputSignalIsExpr", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockInputSignalConnected(portIdx) void
%return CGMODEL_ACCESS("Block.InputSignalConnected", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%function LibBlockOutputSignalConnected(portIdx) void
%return CGMODEL_ACCESS("Block.OutputSignalConnected", BlockIdx[0], BlockIdx[2], portIdx)
%endfunction
%endif