- Clear the mode states for a given SystemInstance. That is, the modal adapters for the model all have their modes set to null.
- Just walk the whole tree and clear the modes of all the components. We used to use the SOMs to do this so that we only touched those components that were modal. But we cannot be sure that any single SOM refers to all the modal components because some modal components may not exist in some SOMs.
-
Lookup a non-modal numeric SEI PowerCapacity property value scaled to the given unit (from platform:/plugin/org.osate.contribution.sei/resources/properties/SEI.aadl). Units used: KW, mW and W
-
Collect budget and supply information
- Supply in form of power budget drawn this power supply from other supply. This could be a requires bus access, or an incoming abstract feature. There must be a connection on this feature
If power supply > 0
- List connection info
Else // warning unconnected power requirement (in current code, there is no code in else statement, just this comment)
Get destination connection instances for this feature
// incoming connections: does the other end provide power?
If supply > 0, add text to report (for example) : 40.0 W from EPSU
Same for outgoing connections - if budget > 0, add text to report
// outgoing connection. Does the other end have a power budget?
After you checked all features,
// power supply and budget based on access connections to this bus
// we are checking whether there are connections with the component with power capacity as source or destination
// this could be a bus, possibly an abstract component
— same logic for in/out connections again ( // Outgoing / Incoming from Power system as bus)
Record budget and supply
-
Building report
Check if budget exceeds capacity
Check if budget exceeds supply (available)
-
Write out to Excel file
Lookup a non-modal numeric SEI PowerCapacity property value scaled to the given unit (from platform:/plugin/org.osate.contribution.sei/resources/properties/SEI.aadl). Units used: KW, mW and W
Collect budget and supply information
If power supply > 0
Else // warning unconnected power requirement (in current code, there is no code in else statement, just this comment)
Get destination connection instances for this feature
// incoming connections: does the other end provide power?
If supply > 0, add text to report (for example) : 40.0 W from EPSU
Same for outgoing connections - if budget > 0, add text to report
// outgoing connection. Does the other end have a power budget?
After you checked all features,
// power supply and budget based on access connections to this bus
// we are checking whether there are connections with the component with power capacity as source or destination
// this could be a bus, possibly an abstract component
— same logic for in/out connections again ( // Outgoing / Incoming from Power system as bus)
Record budget and supply
Building report
Check if budget exceeds capacity
Check if budget exceeds supply (available)
Write out to Excel file