The document discusses test and measurement system architecture. It begins by introducing some LabVIEW tools and frameworks. It then defines software architecture and discusses key aspects like different design levels, architectural patterns, and considerations for configuration, maintenance, and managing product variants. Examples of simplifying complex test systems through use of XML configuration and separating generic test code from product-specific code are provided. Strategies for background measurement processes and sequential "hit and run" testing are also contrasted. The conclusion emphasizes that architecture involves more than just software design and to keep designs simple.
2. Presentation
• Mattias Ericsson
– LabVIEW developer ~15years
– CLA
– LabVIEW Partner Program
• QRM
• www.addq.se/qrm
• G# Framework
• Free, open source tool
• LabVIEW Add-On of the Year for Community 2011
• www.ni.com/labviewtools
• www.addq.se/gsharp
3. The Art of Archiceture
• What is a Artictecture?
• Conciderations
• Different Strategies
• Conclusions
4. Architecture
• ” The software architecture of a
program or computing system is
the structure or structures of the
system, which comprise software
components, the externally visible
properties of those components,
and the relationships between
them.”
“Tell us what is important. Architecture is about the
important stuff. Whatever that is.” – Ralph Johnson
5. Architecture – some aspects
• Ralph Johnson - “The expert developers
working on that project have a shared
understanding of the system design. That
shared understanding is called architecture.”
• Jim Coplien - “Architecture is when you
design your abstract base classes.”
• Martin Fowler – “Two common elements:
Highest-level breakdown of a system into parts
and the decisions that are hard to change”
• Eoin Woods – ”The set of design decisions
which, if made incorrectly, will cause your
project to be cancelled.”
6. Design vs Architecture
• What is the difference?
– Architecture is design, but not all design is
architecture.
– Many design decisions are left unbound by the
architecture.
– Architecture is often referred as strategic design
7. What is design all about?
• Managing complexity and
dependencies
• Tradeoffs and priorities
• Nondeterministics
• Hard to know when its ”good
enough”
”No one’s skull is really big enough to contain a modern computer
program” – Edgar Dijsktra 1972
7
11. Symptoms of Poor Design
The Odors of Rotting Software
• Hard to change
• Easy to break
• Hard to reuse
• Hard to do the right thing
• Complexity and overdesign
• Repeating structures that could be
unified under a single abstraction
• Hard to read and understand
12. Design Approches
• Top-Down
– Your brain isn’t force to deal with too
many details at once
– Decomposition strategy
• Bottom-up
– Sometimes the top-down is so
abstract it is hard to get started.
– When identifying several low-level
responsibilities, start from the top
again!
– Composition strategy
13. Hardware Abstract Layer (HAL)
Power Supply
KeySight PS HAMEG PS Power Supply Mock
To HAL or not to HAL is the question!
14. Important Considerations
• Receiver of the system
– Maintainer
– Operator
• Station setups
– Different brands of instruments
– Different instrumentation
• Product support
– Variants
– Coexisting versions
16. Configuration Dependency
• Station Configuration
– Hardware setup
– COM ports etc.
• Product Configuration
– Requirement and Sequences
– Images
– Different fixtures
• Channel maps
– Firmware
• Common Configuration
– Platform setup
17. Configuration Override
• INI-file
– Search hierarchy
1. File name
2. Section
3. Key
• XML
– Compare Microsoft .NET
Always use relative paths!
Station
Common
Product
18. Example of Simplification
Problem:
– TestStand
• Sequences
• Variants requires own sequence
– LabVIEW
• Test Code State Machine – sometimes product specific
– INI for requirements
– INI for test cases
– Station specific
• Channel maps
– No override for local changes
Very hard for maintainer to know what to do!
19. Example of Simplification
Solution:
– LabVIEW
• Test Code – generic simple steps
• One platform for all station, products and variants.
– Platform ini-config
– XML
• Sequence
• Requirements and parameters
• Test steps
• Xpath override
– Configuration override
1. Station
2. Product
3. Common
Easy for maintainer to manage!
22. Architectural Strategies
• What to test?
– Test object
– Test equipment
• Who is going to maintain?
• Product and Variants
– What’s next to be tested?
• Serial Numbers
– Generation
– Scanning
• Documentation
– Block diagrams e.g. UML
– Schemes and Manuals
• Results
– Measurements
– Traceability
25. Background Meas Process
1. Application launches
background process.
2. Background process
measures and constantly
writes to memory.
3. Application regular polls
memory for latest meas
values.
4. Application closes process
when closing down.
+ Easy switch between Test
and Manual
+ Always monitoring
+ Averaging
- Slow sampling
26.
27. ”Hit and Run” 1. Application initialize
equipment.
2. Sequential testing
1. Measure
2. Analyze
3. Application close
equipment when closing
down.
+ Easy control flow
+ Simple
+ High performance
- No monitoring
- Snapshot
28. Conclusion
• Architecture is not only software design
– Configuration
– Maintenance
– Product and variants
– Result Management
• No overdesign!
• Documentation
– Keep up to date!
• KISS – Keep It Simple Stupid!
Editor's Notes
Ralph E. Johnson is a Research Associate Professor in the Department of Computer Science at the University of Illinois at Urbana-Champaign. He is a co-author of the influential computer science textbook Design Patterns: Elements of Reusable Object-Oriented Software.
James O. "Jim" Coplien (also simply known as Cope) is a writer, lecturer, and researcher in the field of Computer Science. Cope was a founding Member of Hillside Group with Kent Beck, Grady Booch, Ward Cunningham, Ralph Johnson, Ken Auer and Hal Hildebrand. He has started up several of the conferences in the Pattern Languages of Programs (PLoP) conference series and is a longstanding pattern author and PLoP shepherd.
Martin Fowler is an author and international speaker on software development, specializing in object-oriented analysis and design, UML, patterns, and agile software development methodologies, including extreme programming. Fowler is a member of the Agile Alliance and helped create the Manifesto for Agile Software Development in 2001, along with more than 15 co-authors.
Eoin Woods works for Barclays Global Investors as the lead software architect of a new equities portfolio management system and the head of the firm's application architecture group.
When complexity goes out of hands, developers can no longer understand the software well enough to change or extend it easily and safely. [Evans04] s xxi
How do we tackle complexity? We do that by raising the level of abstraction. [Booch]
Process of tradeoffs between qualities such as efficient performance and ease of maintainence”. [McGregor]
If you send three people away to design the same program, they all return with three different designs, each of which could be perfectly acceptable. [Conn04] s 76
Since design is open-ended, the most common answer to that question is ’When you’re out of time.’ [Conn04] s.76
[Conn04]
Level 1: Software System
The first level is the entire system. Architecture level.
Level 2: Division into Subsystems or Packages
The main product of design at this level is the identification of all major subsystems. Allow
communication between subsystems only on a “need to know” basis—and it had better
be a good reason.
Level 3: Division into Classes
Design at this level includes identifying all classes in the system. In particular, the class’s interface is defined.
Level 4: Division into Routines
Design at this level includes dividing each class into routines. The class interface
defined at Level 3 will define some of the routines.
Level 5: Internal Routine Design
Design at the routine level consists of laying out the detailed functionality of the individual
routines. Internal routine design is typically left to the individual programmer
working on an individual routine.
The metaphor of layering is so widely used that it feels intuitive to most developers. [Evans04] s.68
For a pattern to be architectural, it refers to a problem at the architectural level of abstraction, the overall system structure.
The design of many software applications begins as a vital image in the minds of its designers. At this stage it is clean, elegant, and compelling. But then something happen. The software starts to rot. At first it isn’t so bad. A clumsy hack here and there, but the beauty of the design still shows through. Over time it becomes a festering mass of code that the developers find increasingly hard to maintain. [Martin00]
The idea is that the human brain can concentrate on only a certain amount of details at a time. [Conn04]
Ask yourself, ”What do I know this system needs to do?” For example, a particular report. [Conn04]
Top down tends to start simple, but sometimes low-level complexity ripples back to the top. Bottom up tends to start complex, but identifying that complexity early on leads to better design.