#ifndef EXTERNALIOMODULE_H #define EXTERNALIOMODULE_H #include "GlobalDefine.h" #ifndef WINDOWS_OS #include "seamaxlin.h" #endif #include "IOModule.h" typedef enum eExternalModuleType { EXT_IO_TYPE_430 = 430, EXT_IO_TYPE_440 = 440, EXT_IO_TYPE_470 = 470, EXT_IO_TYPE_INVALID = 0 }eExternalModuleType_t; enum eExternalModuleRetValue { EXT_MOD_RET_OK, EXT_MOD_RET_ERR_INVALID_POINTER, EXT_MOD_RET_ERR_MODULE_OFFLINE, EXT_MOD_RET_ERR_MODULE_TYPE_MISMATCH, EXT_MOD_RET_MODULE_ALREADY_OPENED, EXT_MOD_RET_WRONG_ANALOG_CONFIGURATION }; class CExternalIOModule { public: CExternalIOModule(); virtual ~CExternalIOModule(); #ifndef WINDOWS_OS unsigned int SetModuleDriverPtr(CSeaMaxLin *DriverPtr); virtual unsigned int OpenModule(unsigned int SlaveAddress,CSeaMaxLin *DriverPtr, unsigned int ModuleID); // unsigned int OpenModule(unsigned int SlaveAddress,SeaMaxLin *DriverPtr, unsigned int ModuleID); eExternalModuleType_t GetType(void){return mModuleType;} unsigned int GetID(void){return mModuleID;} #endif protected: bool mIsOpened; #ifndef WINDOWS_OS CSeaMaxLin *mModuleDriverPtr; unsigned int mModuleAddress; unsigned int mModuleID; eExternalModuleType_t mModuleType; seaio_type_t mSeaIOModuleType; address_loc_t mRegisterStart; address_range_t mRegisterRange; #endif // pseaMaxModule->Read(2,type,start,range,&data[0]); }; #endif // EXTERNALIOMODULE_H