/* * FunctionCore.cpp * * Created on: 18 May 2016 * Author: wentzelc */ // redA Libraries #include "FunctionCore.h" #include "TimingCore.h" #include "LogCore.h" // Standard C/C++ Libraries #include #include #include //--------------------------------------------------------------------------- // Life cycle CFunctionCore::CFunctionCore( const char * FunctionName ) { // Set name if (FunctionName) { Name = (char*)malloc( strlen(FunctionName)+1 ); strcpy( Name, FunctionName ); } else { Name = NULL; } // IO Functions OutFunction = NULL; } //--------------------------------------------------------------------------- CFunctionCore::~CFunctionCore() { // Destroy pointers if (Name) { free( Name ); } } //--------------------------------------------------------------------------- // Manual Data Input/Output int CFunctionCore::Input( int InputID, const char * Buffer, int MaxLen ) { return 0; } //--------------------------------------------------------------------------- int CFunctionCore::Output( int OutputID, const char * Buffer, int Len ) { return 0; } //--------------------------------------------------------------------------- // Automated Data Input/Output bool CFunctionCore::AddInput( int InputID, CFunctionCore * OutFunction, int OutputID ) { return false; } //--------------------------------------------------------------------------- bool CFunctionCore::AddOutput( int OutputID, CFunctionCore * InFunction, int InputID ) { OutFunction = InFunction; return true; } //---------------------------------------------------------------------------