• No results found

The conformance testing software is the main module which resides on the personal computer and runs under DOS 6.22 and the Microsoft Windows 3.11 environment. A real-time kernel such as iRMX is not used, as the timing and task scheduling of the conformance testing process are not critical. The use of a dedicated operating system would make in-house testing more difficult

lly S.H.Khoh P a g e 5 - 5

Chapter 5 - The DeviceNet Conformance Test Engine Framework

to set up. The CTE should remain as simple as possible to enable product developers to carry out in-house testing themselves. It must utilise the commonly available resources such as DOS and Windows whenever possible.

In addition, the resources must also be standardised so that the quality and consistency of the tests are not sacrificed.

The CTE software is developed using the Visual C++ object-oriented programming environment to take advantage of the Microsoft Foundation Class (MFC) library and Dynamic Link Libraries (DLLs). MFC is an object- oriented library for the Windows environment. For example, the mouse actions such as drag-and-drop and double click actions in Windows are all governed by the MFC library, and can be inherited from the foundation class.

One o f the advantage of this is that when the need to upgrade to a later version o f Windows arises, the source code can be compiled using the later versions o f the MFC library. The utilisation o f the MFC and DLL also allows forward compatibility of Windows programs to the latest version of Windows.

For example, most Windows 3.11 programs can be run safely on Windows 95, with a few exceptions. The DLL is another feature of Windows programs where the program is dynamically linked during run time. This allows a smaller executable file size to be achieved. However, if a required library component is missing from the working directory, the program will stall with an execution error. For instance, if one accidentally deleted a program.DLL file, the program will not launch even though the program.EXE file is present. The purpose o f DLL is to minimise the Windows executable code size.

By S.B.Khoh Page 5-6

Chapter 5 - The DeviceNet Conformance Test Engine Framework

5.5.1 Dual Purpose Conformance Test Software

The conformance test software can be categorised into two different modes of operations,

i.e.-• development test, and

• conformance test modes.

The development test mode will be used by product developers in-house to investigate their implementations during development. Normally, a reduced configuration CTE hardware is used by the product developers. Therefore, some functions on the conformance test software involving special hardware such as the EFG protocol emulator may be disabled. Any option not available to the developers will be automatically greyed out by the conformance test software, which is a standard feature of Windows software.

Once the product developers are satisfied with their implementations, the implementations will be sent to an independent test lab for conformance testing. The same piece of conformance test software is used to allow consistency in testing. All functions of the CTE will be enabled. The exercise of letting the product developers run the conformance test in-house aims to minimise the engineering iteration process involved in conforming an implementation to DeviceNet. This will result in a shorter development lead time and cost savings.

5.5.2 Modularity of CTE Design

The CTE framework has been designed for modularity using object- oriented techniques and component software. This is important as the development of the DeviceNet conformance test comes from the participating members in the ODVA conformance Special Interests Group (SIG). The

tiy S.B.Khoh Page 5-7

Chapter 5 - The DeviceNet Conformance Test Engine Framework

conformance SIG has to liaise with other working groups such as the drive profile SIG to include the appropriate module for conformance testing. The modularity achieved through object-oriented design allows various modules to be added and combined together at different stages of CTE development.

Furthermore, the design can be modified easily to utilise the component software in future. All the modules will then be compiled prior to run-time to achieve maximum efficiency and timing during conformance testing.

Component software can be analogous to Integrated Circuits (ICs) in the electronics world. With the use of the IC components, the design engineer can concentrate on the higher level of the design without getting into the lower level details. For example, the engineer can use the AND gate in an IC without having to design an AND gate from transistors and resistors. In software engineering context, an application can be divided into components such as Graphical User Interfaces (GUIs) for Man Machine Interface (MMI), databases for storing information and spreadsheets for calculations. Each component can be separately developed and combined together to form a complete package.

Conformance testing is a growing process, with endless introduction of new device profiles. Therefore, the database of conformance test suites needs to be updated frequently. If component software is used, one can use the Access database package to store all the conformance test suites and test steps for the CTE. If a test suite update is required, only the conformance test suites database needs to be updated. The rest o f the framework remains intact.

In the instance of modularity, the EFG is an optional module of the CTE framework used at the independent test lab. The EFG unit is a CAN protocol emulator capable of emulating error conditions on a DeviceNct network. It is

Ily S.B.Khoh Page 5-8

Chapter 5 - The DeviceNet Conformance Test Engine Framework

remotely controlled by the CTE software on the PC using the CErrFrGen object class. If the EFG hardware is available, the CErrFrGen class will notify the conformance test software and this feature is enabled. The CErrFrGen object class will then be available to the Windows environment, so that commands and controls to the EFG can be issued via the conformance test software. The EFG hardware will appear only as an encapsulated CErrFrGen object with its appropriate attributes. The conformance test software can be visualised as a collection o f objects as shown in Figure 5.2. Again, the EFG object is another software component which contributes to the whole CTE software.

Figure 5-2 The object decomposition of CTE software

The design and development of EFG is unique in the area of DeviceNet research. With the help o f an EFG unit, the DUT’s behaviour during error conditions can now be investigated and tested. Chapter 6 provides detailed discussions on the EFG design.

Il y S.D.Khnh Page 5-9

Chapter 5 - The DeviceNet Conformance Test Engine Framework