-
Notifications
You must be signed in to change notification settings - Fork 1
/
gen.sh
54 lines (49 loc) · 1.68 KB
/
gen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
. ./config.sh
#mkdir -p temp
#cp ${COMP_NAME}Service.idl temp
#cp SequencePlayerService.idl temp
#cd temp
/opt/grx/bin/rtc-template -bcxx \
--module-name=${COMP_NAME} \
--module-type='sonyComponent' \
--module-desc='sonyComponent' \
--module-version=1.0 \
--module-vendor='tohoku' \
--module-category=example \
--module-comp-type=DataFlowComponent \
--module-act-type=SPORADIC \
--module-max-inst=1 \
--inport=q:TimedDoubleSeq \
--inport=rhsensor:TimedDoubleSeq \
--inport=lhsensor:TimedDoubleSeq \
--inport=rfsensor:TimedDoubleSeq \
--inport=lfsensor:TimedDoubleSeq \
--inport=mc:TimedDoubleSeq \
--outport=rzmp:TimedDoubleSeq \
--outport=refq:TimedDoubleSeq \
--service=${COMP_NAME}Service:service0:${COMP_NAME}Service \
--service-idl=${COMP_NAME}Service.idl \
#--consumer=ToSequencePlayerService:serviceSeq0:SequencePlayerService \
#--consumer-idl=SequencePlayerService.idl
rm *_vc*
rm *.bat
rm user_config.vsprops
mv ${COMP_NAME}ServiceSVC_impl.h ${COMP_NAME}Service_impl.h
mv ${COMP_NAME}ServiceSVC_impl.cpp ${COMP_NAME}Service_impl.cpp
rm Makefile.${COMP_NAME}
removeSVC() {
sed -e "s/ServiceSVC/Service/g" $1 > /tmp/.$1
sed -e "s/SERVICESVC/SERVICE/g" /tmp/.$1 > $1
}
removeSVC ${COMP_NAME}.h
removeSVC ${COMP_NAME}Service_impl.h
removeSVC ${COMP_NAME}Service_impl.cpp
removeOpenHRP() {
sed -e "s/OpenHRP_//g" $1 > /tmp/.$1
sed -e "s/${COMP_NAME}ServiceSkel.h/${COMP_NAME}Service.hh/g" /tmp/.$1 > $1
}
removeOpenHRP ${COMP_NAME}Service_impl.h
removeOpenHRP ${COMP_NAME}Service_impl.cpp
#sed '16 a\#include "JointDataTypesStub.h"' ${COMP_NAME}.h > .${COMP_NAME}.h
#mv .${COMP_NAME}.h ${COMP_NAME}.h