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