Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 import gen_base
00020
00021 profile_yaml = """rtcProfile:
00022 version: "1.0"
00023 id: [id]
00024
00025 basicInfo:
00026 name: [basicInfo.name]
00027
00028 description: [basicInfo.description]
00029
00030 version: [basicInfo.version]
00031
00032 vendor: [basicInfo.vendor]
00033
00034 category: [basicInfo.category]
00035
00036 componentType: [basicInfo.componentType]
00037
00038 activityType: [basicInfo.activityType]
00039
00040 componentKind: [basicInfo.componentKind]
00041
00042 maxInstances: [basicInfo.maxInstances]
00043
00044 abstract: [basicInfo.abstract]
00045
00046 executionRate: [basicInfo.executionRate]
00047
00048 executionType: [basicInfo.executionType]
00049
00050 creationDate:
00051 year: [basicInfo.creationDate.year]
00052
00053 month: [basicInfo.creationDate.month]
00054
00055 day: [basicInfo.creationDate.day]
00056
00057 hour: [basicInfo.creationDate.hour]
00058
00059 minute: [basicInfo.creationDate.minute]
00060
00061 second: [basicInfo.creationDate.second]
00062
00063 updateDate:
00064 year: [basicInfo.updateDate.year]
00065
00066 month: [basicInfo.updateDate.month]
00067
00068 day: [basicInfo.updateDate.day]
00069
00070 hour: [basicInfo.updateDate.hour]
00071
00072 minute: [basicInfo.updateDate.minute]
00073
00074 second: [basicInfo.updateDate.second]
00075
00076 "rtcDoc::doc":
00077 algorithm: [basicInfo.rtcDoc::doc.algorithm]
00078
00079 creator: [basicInfo.rtcDoc::doc.creator]
00080
00081 description: [basicInfo.rtcDoc::doc.description]
00082
00083 inout: [basicInfo.rtcDoc::doc.inout]
00084
00085 license: [basicInfo.rtcDoc::doc.license]
00086
00087 reference: [basicInfo.rtcDoc::doc.reference]
00088
00089 "rtcExt::versionUpLog":
00090 [for log in basicInfo.rtcExt::versionUpLog]
00091 - [log]
00092 [endfor]
00093 language:
00094 [if-any language.java]
00095 java:
00096 library:
00097 [for javalib in language.java.library]
00098 - [javalib]
00099 [endfor]
00100 [endif]
00101 actions:
00102 onInitialize:
00103 implemented: [actions.onInitialize.implemented]
00104
00105 "rtcDoc::doc":
00106 description: [actions.onInitialize.rtcDoc::doc.description]
00107
00108 postCondition: [actions.onInitialize.rtcDoc::doc.postCondition]
00109
00110 preCondition: [actions.onInitialize.rtcDoc::doc.preCondition]
00111
00112 onActivated:
00113 implemented: [actions.onActivated.implemented]
00114
00115 "rtcDoc::doc":
00116 description: [actions.onActivated.rtcDoc::doc.description]
00117
00118 postCondition: [actions.onActivated.rtcDoc::doc.postCondition]
00119
00120 preCondition: [actions.onActivated.rtcDoc::doc.preCondition]
00121
00122 onDeactivated:
00123 implemented: [actions.onDeactivated.implemented]
00124
00125 "rtcDoc::doc":
00126 description: [actions.onDeactivated.rtcDoc::doc.description]
00127
00128 postCondition: [actions.onDeactivated.rtcDoc::doc.postCondition]
00129
00130 preCondition: [actions.onDeactivated.rtcDoc::doc.preCondition]
00131
00132 onAborting:
00133 implemented: [actions.onAborting.implemented]
00134
00135 "rtcDoc::doc":
00136 description: [actions.onAborting.rtcDoc::doc.description]
00137
00138 postCondition: [actions.onAborting.rtcDoc::doc.postCondition]
00139
00140 preCondition: [actions.onAborting.rtcDoc::doc.preCondition]
00141
00142 onError:
00143 implemented: [actions.onError.implemented]
00144
00145 "rtcDoc::doc":
00146 description: [actions.onError.rtcDoc::doc.description]
00147
00148 postCondition: [actions.onError.rtcDoc::doc.postCondition]
00149
00150 preCondition: [actions.onError.rtcDoc::doc.preCondition]
00151
00152 onReset:
00153 implemented: [actions.onReset.implemented]
00154
00155 "rtcDoc::doc":
00156 description: [actions.onReset.rtcDoc::doc.description]
00157
00158 postCondition: [actions.onReset.rtcDoc::doc.postCondition]
00159
00160 preCondition: [actions.onReset.rtcDoc::doc.preCondition]
00161
00162 onFinalize:
00163 implemented: [actions.onFinalize.implemented]
00164
00165 "rtcDoc::doc":
00166 description: [actions.onFinalize.rtcDoc::doc.description]
00167
00168 postCondition: [actions.onFinalize.rtcDoc::doc.postCondition]
00169
00170 preCondition: [actions.onFinalize.rtcDoc::doc.preCondition]
00171
00172 onStartup:
00173 implemented: [actions.onStartup.implemented]
00174
00175 "rtcDoc::doc":
00176 description: [actions.onStartup.rtcDoc::doc.description]
00177
00178 postCondition: [actions.onStartup.rtcDoc::doc.postCondition]
00179
00180 preCondition: [actions.onStartup.rtcDoc::doc.preCondition]
00181
00182 onRateChanged:
00183 implemented: [actions.onRateChanged.implemented]
00184
00185 "rtcDoc::doc":
00186 description: [actions.onRateChanged.rtcDoc::doc.description]
00187
00188 postCondition: [actions.onRateChanged.rtcDoc::doc.postCondition]
00189
00190 preCondition: [actions.onRateChanged.rtcDoc::doc.preCondition]
00191
00192 onShutdown:
00193 implemented: [actions.onShutdown.implemented]
00194
00195 "rtcDoc::doc":
00196 description: [actions.onShutdown.rtcDoc::doc.description]
00197
00198 postCondition: [actions.onShutdown.rtcDoc::doc.postCondition]
00199
00200 preCondition: [actions.onShutdown.rtcDoc::doc.preCondition]
00201
00202 onExecute:
00203 implemented: [actions.onExecute.implemented]
00204
00205 "rtcDoc::doc":
00206 description: [actions.onExecute.rtcDoc::doc.description]
00207
00208 postCondition: [actions.onExecute.rtcDoc::doc.postCondition]
00209
00210 preCondition: [actions.onExecute.rtcDoc::doc.preCondition]
00211
00212 onStateUpdate:
00213 implemented: [actions.onStateUpdate.implemented]
00214
00215 "rtcDoc::doc":
00216 description: [actions.onStateUpdate.rtcDoc::doc.description]
00217
00218 postCondition: [actions.onStateUpdate.rtcDoc::doc.postCondition]
00219
00220 preCondition: [actions.onStateUpdate.rtcDoc::doc.preCondition]
00221
00222 dataPorts:
00223 [for dport in dataPorts]
00224 -
00225 portType: [dport.portType]
00226
00227 name: [dport.name]
00228
00229 type: [dport.type]
00230
00231 interfaceType: [dport.interfaceType]
00232
00233 dataflowType: [dport.dataflowType]
00234
00235 subscriptionType: [dport.subscriptionType]
00236
00237 idlFile: [dport.idlFile]
00238
00239 "rtcDoc::doc":
00240 type: [dport.rtcDoc::doc.type]
00241
00242 description: [dport.rtcDoc::doc.description]
00243
00244 number: [dport.rtcDoc::doc.number]
00245
00246 occerrence: [dport.rtcDoc::doc.occerrence]
00247
00248 operation: [dport.rtcDoc::doc.operation]
00249
00250 semantics: [dport.rtcDoc::doc.semantics]
00251
00252 unit: [dport.rtcDoc::doc.unit]
00253
00254 "rtcExt::position": [dport.rtcExt::position]
00255
00256 "rtcExt::varname": [dport.rtcExt::varname]
00257
00258 [endfor]
00259 servicePorts:
00260 [for sport in servicePorts]
00261 -
00262 name: [sport.name]
00263
00264 "rtcDoc::doc":
00265 description: [sport.rtcDoc::doc.description]
00266
00267 ifdescription: [sport.rtcDoc::doc.ifdescription]
00268
00269 "rtcExt::position": [sport.rtcExt::position]
00270
00271 serviceInterface:
00272 [for sif in sport.serviceInterface]
00273 -
00274 direction: [sif.direction]
00275
00276 name: [sif.name]
00277
00278 type: [sif.type]
00279
00280 varname: [sif.varname]
00281
00282 instanceName: [sif.instanceName]
00283
00284 idlFile: [sif.idlFile]
00285
00286 path: [sif.path]
00287
00288 "rtcDoc::doc":
00289 description: [sif.rtcDoc::doc.description]
00290
00291 docArgument: [sif.rtcDoc::doc.docArgument]
00292
00293 docException: [sif.rtcDoc::doc.docException]
00294
00295 docPostCondition: [sif.rtcDoc::doc.docPostCondition]
00296
00297 docPreCondition: [sif.rtcDoc::doc.docPreCondition]
00298
00299 docReturn: [sif.rtcDoc::doc.docReturn]
00300
00301 [endfor]
00302 [endfor]
00303 configurationSet:
00304 configuration:
00305 [for conf in configurationSet.configuration]
00306 -
00307 name: [conf.name]
00308
00309 type: [conf.type]
00310
00311 varname: [conf.varname]
00312
00313 defaultValue: [conf.defaultValue]
00314
00315 "rtcDoc::doc":
00316 constraint: [conf.rtcDoc::doc.constraint]
00317
00318 dataname: [conf.rtcDoc::doc.dataname]
00319
00320 defaultValue: [conf.rtcDoc::doc.defaultValue]
00321
00322 description: [conf.rtcDoc::doc.description]
00323
00324 range: [conf.rtcDoc::doc.range]
00325
00326 unit: [conf.rtcDoc::doc.unit]
00327
00328 [endfor]
00329 parameters:
00330 [if-any parameters]
00331 [for param in parameters]
00332 -
00333 name: [param.name]
00334
00335 defaultValue: [param.defaultValue]
00336
00337 [endfor]
00338 [endif]
00339 """
00340
00341
00342 class profile_gen(gen_base.gen_base):
00343 def __init__(self, data):
00344 self.data = data
00345 self.data["fname"] = data["basicInfo"]["name"] + ".yaml"
00346 self.tags = {}
00347
00348 def print_yamlprofile(self):
00349 self.gen(self.data["fname"], profile_yaml, self.data, self.tags)
00350
00351 def print_all(self):
00352 self.print_yamlprofile()