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
TypeCode.cpp@7:6c7af1d50fb3, 2013-08-29 (annotated)
- Committer:
- ysuga
- Date:
- Thu Aug 29 05:29:55 2013 +0000
- Revision:
- 7:6c7af1d50fb3
- Parent:
- 0:5f7bc45bc2e8
update v5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ysuga | 0:5f7bc45bc2e8 | 1 | #include <ctype.h> |
ysuga | 0:5f7bc45bc2e8 | 2 | |
ysuga | 0:5f7bc45bc2e8 | 3 | #include "TypeCode.h" |
ysuga | 0:5f7bc45bc2e8 | 4 | |
ysuga | 0:5f7bc45bc2e8 | 5 | uint8_t TypeCode_isSequence(const char typeCode) { |
ysuga | 0:5f7bc45bc2e8 | 6 | return isupper(typeCode); |
ysuga | 0:5f7bc45bc2e8 | 7 | } |
ysuga | 0:5f7bc45bc2e8 | 8 | |
ysuga | 0:5f7bc45bc2e8 | 9 | uint8_t TypeCode_getElementSize(const char typeCode) { |
ysuga | 0:5f7bc45bc2e8 | 10 | switch(tolower(typeCode)) { |
ysuga | 0:5f7bc45bc2e8 | 11 | case 'b': |
ysuga | 0:5f7bc45bc2e8 | 12 | case 'c': |
ysuga | 0:5f7bc45bc2e8 | 13 | case 'o': |
ysuga | 0:5f7bc45bc2e8 | 14 | return 1; |
ysuga | 0:5f7bc45bc2e8 | 15 | case 's': |
ysuga | 0:5f7bc45bc2e8 | 16 | return 2; |
ysuga | 0:5f7bc45bc2e8 | 17 | case 'l': |
ysuga | 0:5f7bc45bc2e8 | 18 | case 'f': |
ysuga | 0:5f7bc45bc2e8 | 19 | case 'd': |
ysuga | 0:5f7bc45bc2e8 | 20 | return 4; |
ysuga | 0:5f7bc45bc2e8 | 21 | |
ysuga | 0:5f7bc45bc2e8 | 22 | default: |
ysuga | 0:5f7bc45bc2e8 | 23 | return 4; |
ysuga | 0:5f7bc45bc2e8 | 24 | } |
ysuga | 0:5f7bc45bc2e8 | 25 | } |