Пример #1
0
 def apply(cls, ws):
     package = ws.getPortInterfacePackage()
     if package.find(name) is None:
         ws.apply(cls.dataTypeTemplate)
         if (cls.dataName is None):
             cls.dataName = name
         package.createSenderReceiverInterface(
             name,
             autosar.DataElement(cls.dataName,
                                 cls.dataTypeTemplate.__name__))
Пример #2
0
def createSenderReceiverInterfaceTemplate(name, dataTypeTemplate, dataName=None):
   @classmethod
   def apply(cls, ws):
      package = ws.getPortInterfacePackage()
      if package.find(name) is None:
         if(cls.dataName is None):
             cls.dataName = name
         if(type(cls.dataTypeTemplate) == list):
             dataElements = []
             for dataTypeTemplate in cls.dataTypeTemplate:
                 dataElements.append(ws.apply(dataTypeTemplate))
             package.createSenderReceiverInterface(name, dataElements)
         else: