RTno is communicating library and framework which allows you to make your embedded device capable of communicating with RT-middleware world. RT-middleware is a platform software to realize Robotic system. In RTM, robots are developed by constructing robotics technologies\' elements (components) named RT-component. Therefore, the RTno helps you to create your own RT-component with your mbed and arduino. To know how to use your RTno device, visit here: http://ysuga.net/robot_e/rtm_e/rtc_e/1065?lang=en To know about RT-middleware and RT-component, visit http://www.openrtm.org
Dependencies: EthernetInterface mbed-rtos
PortBase.cpp
- Committer:
- ysuga
- Date:
- 2013-06-24
- Revision:
- 0:5f7bc45bc2e8
File content as of revision 0:5f7bc45bc2e8:
/******************************************* * PortBase.h * @author Yuki Suga * @copyright Yuki Suga (ysuga.net) Nov, 10th, 2010. * @license LGPLv3 *****************************************/ #define RTNO_SUBMODULE_DEFINE #include <stdlib.h> #include <string.h> #include "PortBase.h" #include "NullBuffer.h" PortBase* PortBase_create() { return (PortBase*)malloc(sizeof(PortBase)); } void PortBase_init(PortBase* portBase, const char* name, char typeCode, PortBuffer* dataBuffer) { portBase->pName = (char*)malloc(strlen(name)+1); strcpy(portBase->pName, name); portBase->typeCode = typeCode; portBase->pPortBuffer = dataBuffer; } void PortBase_destroy(PortBase* pPortBase) { free(pPortBase->pName); free(pPortBase); }