Vous êtes sur la page 1sur 10

Multi-Platform Architecture

ASE Core Team

- restricted -
ASE library architecture

Robot Framework Test Case

ASE libraries CanLib LinLib

packages: peakcan vectorcan virtualcan peaklin


can, lin driver driver driver driver

2018-04-16 restricted Copyright © Infineon Technologies AG 2018. All rights reserved. 2


ASE configuration for CanLib
Library (file) name
Configure multiple channels
Create symbols name for every channel. This can be any string.
Configure the driver to use for this channel
Driver is implemented in package “can” and “peakcan” module
Driver specific configuration parameter 1
Driver specific configuration parameter 2
Channel specific reference properties, i.e. unique ID
to identify the same hardware and driver specific channel
reference

Generic CAN parameters

2018-04-16 restricted Copyright © Infineon Technologies AG 2018. All rights reserved. 3


Base class

› It is the parent class for the library and all the


drivers
› Provides the minimum set of functions to be
implemented by a subclass
› It will force any subclass to implement the functions
decorated by the @abstractmethod

› It will contain only generic functionality to be used


by all subclasses. e.g. Initialized variable (property)

2018-04-16 restricted Copyright © Infineon Technologies AG 2018. All rights reserved. 4


Import strategy

› Create a package for the


libraries which contain drivers

› Import all the public classes at


the package level
– can.__init__.py

› Import only the class at the


library level
– CanLib.py:
– peakcan:

2018-04-16 restricted Copyright © Infineon Technologies AG 2018. All rights reserved. 5


UML diagram

2018-04-16 restricted Copyright © Infineon Technologies AG 2018. All rights reserved. 6


Implementation hints

› Implement “get_keyword_names” and “run_keyword” to run a


driver specific keyword.
› Use the “**kwargs” in all library keywords to enable extra
arguments for the driver

› Beside AseCfg provide a dictionary-based configuration to enable


library to run standalone

2018-04-16 restricted Copyright © Infineon Technologies AG 2018. All rights reserved. 7


Usage in Robot Framework

2018-04-16 restricted Copyright © Infineon Technologies AG 2018. All rights reserved. 8


Virtual Can

› Configuration

Change to “can.virtualcan”

2018-04-16 restricted Copyright © Infineon Technologies AG 2018. All rights reserved. 9

Vous aimerez peut-être aussi