00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 import OpenRTM
00020 import SDOPackage, SDOPackage__POA
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 class InPortProvider:
00037 """
00038 """
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 def __init__(self):
00054 self._properties = []
00055 self._dataType = ""
00056 self._interfaceType = ""
00057 self._dataflowType = ""
00058 self._subscriptionType = ""
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 def publishInterfaceProfile(self, prop):
00074 OpenRTM.NVUtil.appendStringValue(prop, "dataport.data_type",
00075 self._dataType)
00076 OpenRTM.NVUtil.appendStringValue(prop, "dataport.interface_type",
00077 self._interfaceType)
00078 OpenRTM.NVUtil.appendStringValue(prop, "dataport.dataflow_type",
00079 self._dataflowType)
00080 OpenRTM.NVUtil.appendStringValue(prop, "dataport.subscription_type",
00081 self._subscriptionType)
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096 def publishInterface(self, prop):
00097 if not OpenRTM.NVUtil.isStringValue(prop,
00098 "dataport.interface_type",
00099 self._interfaceType):
00100 return
00101
00102 OpenRTM.NVUtil.append(prop, self._properties)
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117 def setDataType(self, data_type):
00118 self._dataType = data_type
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 def setInterfaceType(self, interface_type):
00134 self._interfaceType = interface_type
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149 def setDataFlowType(self, dataflow_type):
00150 self._dataflowType = dataflow_type
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165 def setSubscriptionType(self, subs_type):
00166 self._subscriptionType = subs_type