Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
GrxUIonEclipse-project-0.9.8
src
jp
go
aist
hrp
simulator
PathConsumerComp.java
Go to the documentation of this file.
1
// -*- Java -*-
9
package
jp.go.aist.hrp.simulator;
10
11
import
com
.
generalrobotix
.
ui
.
item
.
GrxPathPlanningAlgorithmItem
;
12
13
import
jp
.
go
.
aist
.
hrp
.
simulator
.
PathPlanner
;
14
import
jp
.
go
.
aist
.rtm.RTC.Manager;
15
import
jp
.
go
.
aist
.rtm.RTC.ModuleInitProc;
16
import
jp
.
go
.
aist
.rtm.RTC.RTObject_impl;
17
import
jp
.
go
.
aist
.rtm.RTC.util.Properties;
18
19
public
class
PathConsumerComp
implements
ModuleInitProc
{
20
21
PathConsumerImpl
impl=
null
;
22
public
PathPlanner
getImpl
(){
23
return
impl.
m_PathBase
._ptr();
24
}
25
26
public
String
getInstanceName
(){
27
return
impl.getInstanceName();
28
}
29
30
public
void
setConnectedCallback
(
GrxPathPlanningAlgorithmItem
item
){
31
impl.
setConnectedCallback
(item);
32
}
33
34
public
void
myModuleInit
(Manager mgr) {
35
Properties
prop
=
new
Properties
(
PathConsumer
.
component_conf
);
36
mgr.registerFactory(prop,
new
PathConsumer
(),
new
PathConsumer
());
37
38
// Create a component
39
RTObject_impl comp = mgr.createComponent(
"PathConsumer"
);
40
if
( comp==
null
) {
41
System.err.println(
"Component create failed."
);
42
System.exit(0);
43
}
44
45
impl = (
PathConsumerImpl
) comp;
46
47
// Example
48
// The following procedure is examples how handle RT-Components.
49
// These should not be in this function.
50
51
// // Get the component's object reference
52
// Manager manager = Manager.instance();
53
// RTObject rtobj = null;
54
// try {
55
// rtobj = RTObjectHelper.narrow(manager.getPOA().servant_to_reference(comp));
56
// } catch (ServantNotActive e) {
57
// e.printStackTrace();
58
// } catch (WrongPolicy e) {
59
// e.printStackTrace();
60
// }
61
//
62
// // Get the port list of the component
63
// PortListHolder portlist = new PortListHolder();
64
// portlist.value = rtobj.get_ports();
65
//
66
// // getting port profiles
67
// System.out.println( "Number of Ports: " );
68
// System.out.println( portlist.value.length );
69
// for( int intIdx=0;intIdx<portlist.value.length;++intIdx ) {
70
// Port port = portlist.value[intIdx];
71
// System.out.println( "Port" + intIdx + " (name): ");
72
// System.out.println( port.get_port_profile().name );
73
//
74
// PortInterfaceProfileListHolder iflist = new PortInterfaceProfileListHolder();
75
// iflist.value = port.get_port_profile().interfaces;
76
// System.out.println( "---interfaces---" );
77
// for( int intIdx2=0;intIdx2<iflist.value.length;++intIdx2 ) {
78
// System.out.println( "I/F name: " );
79
// System.out.println( iflist.value[intIdx2].instance_name );
80
// System.out.println( "I/F type: " );
81
// System.out.println( iflist.value[intIdx2].type_name );
82
// if( iflist.value[intIdx2].polarity==PortInterfacePolarity.PROVIDED ) {
83
// System.out.println( "Polarity: PROVIDED" );
84
// } else {
85
// System.out.println( "Polarity: REQUIRED" );
86
// }
87
// }
88
// System.out.println( "---properties---" );
89
// NVUtil.dump( new NVListHolder(port.get_port_profile().properties) );
90
// System.out.println( "----------------" );
91
// }
92
}
93
/*
94
public static void main(String[] args) {
95
// Initialize manager
96
final Manager manager = Manager.init(args);
97
98
// Set module initialization proceduer
99
// This procedure will be invoked in activateManager() function.
100
PathConsumerComp init = new PathConsumerComp();
101
manager.setModuleInitProc(init);
102
103
// Activate manager and register to naming service
104
manager.activateManager();
105
106
// run the manager in blocking mode
107
// runManager(false) is the default.
108
manager.runManager();
109
110
// If you want to run the manager in non-blocking mode, do like this
111
// manager.runManager(true);
112
}
113
*/
114
115
116
}
jp.go.aist.hrp.simulator.PathConsumerComp.getInstanceName
String getInstanceName()
Definition:
PathConsumerComp.java:26
ModuleInitProc
void(* ModuleInitProc)(Manager *manager)
autoplay.item
item
Definition:
autoplay.py:11
jp
com.generalrobotix.ui
com.generalrobotix.ui.item
Definition:
GrxCollisionPairItem.java:19
jp.go.aist
null
#define null
our own NULL pointer
Definition:
IceTypes.h:57
jp.go.aist.hrp
com
jp.go.aist.hrp.simulator.PathConsumerImpl.m_PathBase
CorbaConsumer< PathPlanner > m_PathBase
Definition:
PathConsumerImpl.java:192
com.generalrobotix.ui.item.GrxPathPlanningAlgorithmItem
Definition:
GrxPathPlanningAlgorithmItem.java:48
jp.go.aist.hrp.simulator
Definition:
PathConsumer.java:8
jp.go
jp.go.aist.hrp.simulator.PathConsumerComp.setConnectedCallback
void setConnectedCallback(GrxPathPlanningAlgorithmItem item)
Definition:
PathConsumerComp.java:30
jp.go.aist.hrp.simulator.PathConsumer
Definition:
PathConsumer.java:15
jp.go.aist.hrp.simulator.PathConsumerComp.myModuleInit
void myModuleInit(Manager mgr)
Definition:
PathConsumerComp.java:34
jp.go.aist.hrp.simulator.PathConsumerComp
Definition:
PathConsumerComp.java:19
jp.go.aist.hrp.simulator.PathConsumerImpl.setConnectedCallback
void setConnectedCallback(GrxPathPlanningAlgorithmItem item)
Definition:
PathConsumerImpl.java:197
jp.go.aist.hrp.simulator.PathConsumer.component_conf
static String component_conf[]
Definition:
PathConsumer.java:19
prop
prop
jp.go.aist.hrp.simulator.PathConsumerImpl
Definition:
PathConsumerImpl.java:29
Properties
PathPlanner
jp.go.aist.hrp.simulator.PathConsumerComp.getImpl
PathPlanner getImpl()
Definition:
PathConsumerComp.java:22
com.generalrobotix
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:40