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