3.2.2. getAbstractInterface()

Bridging between C++ and LISA+ components is done by calls through the getAbstractInterface() function. Figure 3.4 shows this function in relation to the C++ and LISA+ components. The function is implemented by LISA+ component ports and does the following:

The LISA+ construct portinstance.getAbstractInterface() can be used in all component behaviors to get a pointer to the abstract interface class instance for a specific port portinstance. It returns a non-const pointer to a class named protocol_ProtocolName, where ProtocolName in the name of the protocol of the port. The LISA+ code can pass a pointer to this class to the C++ code upon component initialization and the C++ code can call the LISA+ code back through the abstract interface class and the port behaviors.

For the example shown in Figure 3.4, use the LISA+ construct mySlave.getAbstractInterface() to get the pointer *protocol_myInterface to the mySlave port.

Copyright © 2007-2010 ARM Limited. All rights reserved.ARM DUI 0372I
Non-Confidential