#ifndef __OObasics_Smlk_h__
#define __OObasics_Smlk_h__
#include <applstdef_emC.h>
#include <emC/Base/Object_emC.h>

/**
 * @simulink defPortTypes.
 */
inline char const* definePorts(struct DefPortTypes_emC_t* defPortTypes, enum EDefPortTypes_emC_t cause)
{
  Entry_DefPortType_emC* portTypes = defPortTypes->entries;
  portTypes[defPortTypes->ixOutputStep] = portTypes[0];   //Set output like input. Note: struct copy. 
  portTypes[defPortTypes->ixOutputStep].newDefined = 1;
  return null;  //no error.
}

#error TODO see source

//TODO: This file is excluded in examples yet (2019-01.
//TODO: To get port Info from the environment in the model it is necessary to have dedicated a info
//      about specific port properties of specific ports:
//      Use arguments int __inport0_dim0 for the array size first dimension of the inport 0
//      char __outport1_type for the type char (F I etc). 
//      Then less information are necessary to generate. 
//      Note: The port info are type specific. Therefore it cannot store as one static const structure
//      It should be dedicated for instances, therfore prepared in the stack context. That is effort.
/**
 * @simulink Operation-FB.
 */
inline void stepDummyHandle_Smlk(DefPortTypes_emC* defPortTypes, void const* x, uint32 in2, void* y_y)
{ 
  int size = defPortTypes->entries[0].sizeArray[0];  //input x, output y_y is the same.
  int sizeType = defPortTypes->entries[0].sizeType; 
  memcpy(y_y, x, size * sizeType);
}



#endif //__OObasics_Smlk_h__
