Labview Object Oriented System Design: Mikael Holmstrom (C)
Labview Object Oriented System Design: Mikael Holmstrom (C)
System Design
VI 1
VI 2 VI 3 VI 4
VI 1 VI 4
VI 2
Global
VI 3
solved
Functions (VIs) are grouped with the data they
need
VI 1 VI 4
M1 M2
VI 2
Data
M3 M4
VI 3
Object
A ClassName.lvclass file
The lvclass is similar to lvlib
– it defines a name space
◦ Public
◦ Protected
◦ Private
frees memory
destroyed)
To control when objects get copied – or
GOOP3
ClassName_GetAttributesToModify.vi
ClassName_SetModifiedAttributes.vi
automotive industri
Issues:
The CAN protocol is actually two
protocols: CAN (layer two), and an
automotive specific protocol on top of
that. For example the variable ”Engine
revolutions” is received in four separate
CAN messages which must be merged
into the variable value.
Abstraction
Aggregation
value
Changing file format for the meas data file
Improving the user interface layout
the abstraction
Always add methods to try out new classes –
VIs
◦ Potentially one VI on each class in an inheritance
hierarchy
◦ Which one gets executed depends on object type
ancestor classes
frees memory
aggregates
The whole controls the lifetime of it’s parts
Examples: Crossing-TrafficLight, Circle-Point
aggregates
Only possible for by-reference classes
83
Mikael Holmstrom (c)
Structure vs. Architecture
(c) 84
Mikael Holmstrom (c)
How do I start using OO?
and when should I use it?
Choices: