#include "modulecomm_fastrtps_tcp.h" //#include "procsm_if.h" //#include "procsm.h" #include "modulecomm_impl.h" namespace iv { namespace modulecomm_fastrtps_tcp { void * RegisterSend(const char * strcommname,const unsigned int nBufSize,const unsigned int nMsgBufCount,unsigned int nListenPort) { modulecomm_impl * pif = new modulecomm_impl(strcommname,modulecomm_impl::type_send,nListenPort); // procsm_if * pif = new procsm_if(strcommname,nBufSize,nMsgBufCount,procsm::ModeWrite); return (void *)pif; } void * RegisterRecv(const char * strcommname,SMCallBack pCall,const char * strpubip,unsigned int nListenPort) { modulecomm_impl * pif = new modulecomm_impl(strcommname,modulecomm_impl::type_recv,nListenPort,strpubip); // procsm_if * pif = new procsm_if(strcommname,0,0,procsm::ModeRead); pif->listenmsg(pCall); return (void *)pif; } void * MODULECOMMFASTRTPSTCPSHARED_EXPORT RegisterRecvPlus(const char * strcommname,ModuleFun xFun,const char * strpubip,unsigned int nListenPort) { modulecomm_impl * pif = new modulecomm_impl(strcommname,modulecomm_impl::type_recv,nListenPort,strpubip); // procsm_if * pif = new procsm_if(strcommname,0,0,procsm::ModeRead); pif->listenmsg(xFun); return (void *)pif; } void ModuleSendMsg(void * pHandle,const char * strdata,const unsigned int nDataLen) { modulecomm_impl * pif= (modulecomm_impl *)pHandle; // procsm_if * pif = (procsm_if *)pHandle; pif->writemsg(strdata,nDataLen); } void Unregister(void * pHandle) { modulecomm_impl * pif= (modulecomm_impl *)pHandle; // procsm_if * pif = (procsm_if *)pHandle; delete pif; } void PauseComm(void *pHandle) { // procsm_if * pif = (procsm_if *)pHandle; // pif->pausecomm(); } void ContintuComm(void *pHandle) { // procsm_if * pif = (procsm_if *)pHandle; // pif->continuecomm(); } } }