Understanding the FlexPendant application life cycle |
Understanding the FlexPendant application life cycle improves your ability to design and debug the application.
TAF - Application host frameworkThe Teach Pendant Application Framework (TAF) is the application service provider that runs on the FlexPendant. It targets .NET CF and is implemented in C#. All applications using the FlexPendant SDK must run as TAF clients, as TAF contains services for hosting controls and for managing applications.
TAF uses a customized configuration file to create the appearance and behavior of the hosted application. It also defines a set of rules that have to be followed.
Starting a custom applicationWhen the FlexPendant starts up TAF is already in the flash memory. Applications that will execute in the TAF container are now loaded from the controller.
If the FlexPendant SDK application is to be started manually by the end-user the application icon and text are placed in the ABB Menu. The other alternative is to have it started automatically by TAF at FlexPendant startup. For more information on how this is configured, see FlexPendant TpsView attribute.
Application life cycleTAF handles the life cycle of a custom application, starting by calling the constructor of its TpsView class. After this, the Install method and then the Activate method in the same class execute.
During its lifetime, the application switches between the active and the passive state. Each time, either Activate or Deactivate is executed. In its active state the application is visible in the client view, in the passive state another application may have been opened or you may have opened another application through the FlexPendant task bar.
When the application is closed via the close button, first the Deactivate method runs and then Uninstall. After this the Dispose method of the TpsView class is called. Then the application instance is disposed of by TAF. For more information about how you can implement these methods, see ITpsViewSetup and ITpsViewActivation.
IllustrationThe figure illustrates the life cycle of a FlexPendant application.
As the FlexPendant is a device with very limited resources compared to a PC, you should learn and use the mechanisms implemented to assist you in writing efficient code.
Both process power and memory resources are limited compared to the virtual environment on the desktop. An application that runs very well on the virtual FlexPendant, may encounter serious problems in the real environment because of these limitations. For more information, see Technical overview of the FlexPendant device..
![]() |
---|
You are strongly recommended to read Understanding the FlexPendant application life cycle in this manual before starting coding. Always keep the limitations of the device in mind when you develop custom FlexPendant applications. |