Open reteprelief opened 7 years ago
Could this user provide a short example of a model where it is needed and actions that are need to be done with this model?
More details are required here.
I think what @reteprelief meant was that there was a general "user need" rather than a specific user who needs this. That said, I've been interested in this capability (and implemented it in OSATE, though that implementation has been subsequently removed) so I can explain it a little bit.
In brief, what would be nice is being able to take some EMV2-specific element A (in the example below, an error type) and associate it directly with some model element B (in the example, a port connection). I was using this to heavily annotate A's existence in the context of B in order to drive report generation.
Consider the following example, which is from my dissertation work (overview here, downloadable model here).
package PulseOx_Forwarding_System
public
with PulseOx_Interface, PulseOx_Forwarding_Logic, PulseOx_Forwarding_Display,
PulseOx_Forwarding_Properties, MAP_Properties, MAP_Error_Properties,
PulseOx_Forwarding_Errors;
system PulseOx_Forwarding_System
end PulseOx_Forwarding_System;
system implementation PulseOx_Forwarding_System.imp
subcomponents
-- Physiological inputs
pulseOx : device PulseOx_Interface::ICEpoInterface.imp;
-- App logic
appLogic : process PulseOx_Forwarding_Logic::PulseOx_Logic_Process.imp;
appDisplay : process PulseOx_Forwarding_Display::PulseOx_Display_Process.imp;
connections
-- From device to logic
spo2_to_logic : port pulseOx.SpO2 -> appLogic.SpO2;
-- From device to display
spo2_to_display : port pulseOx.SpO2 -> appDisplay.SpO2
{MAP_Properties::Channel_Delay => 150 ms;};
-- From logic to display
alarm_to_display : port appLogic.DerivedAlarm -> appDisplay.DerivedAlarm;
annex EMV2 {**
use types PulseOx_Forwarding_Errors;
properties
MAP_Error_Properties::Occurrence => [
Kind => NotProviding;
Hazard => PulseOx_Forwarding_Error_Properties::MissedAlarm;
ViolatedConstraint => PulseOx_Forwarding_Error_Properties::ShowAllAlarms;
Title => "Bad SpO2";
Cause => "The SpO2 values from the pulse oximeter are too high, so the alarm is missed";
Compensation => "None";
Impact => reference(SpO2ValueHigh); -- SpO2ValueHigh is an error type
-> ] applies to alarm_to_display; -- This line is an error
MAP_Error_Properties::Occurrence => [
Kind => ValueHigh;
Hazard => PulseOx_Forwarding_Error_Properties::BadInfoDisplayed;
ViolatedConstraint => PulseOx_Forwarding_Error_Properties::ShowGoodInfo;
Title => "Bad SpO2";
Cause => "Incorrect SpO2 values are sent to the display";
Compensation => "None";
Impact => reference(SpO2ValueHigh); -- SpO2ValueHigh is an error type
-> ] applies to spo2_to_display; -- This line is also an error
**};
end PulseOx_Forwarding_System.imp;
end PulseOx_Forwarding_System;
The Occurrence property is defined as follows:
Occurrence : record (
Kind : MAP_Error_Properties::KindsType;
Hazard : MAP_Error_Properties::Hazard;
ViolatedConstraint : MAP_Error_Properties::Constraint;
Title : aadlstring;
Cause : aadlstring;
Compensation : aadlstring;
Impact : reference ({emv2}**error type);
) applies to (port connection);
We need a minimal working example on which we can experiment. Two needs:
Check intersection with saeaadl/aadlv2.2#20 for common resolutions
Currently EMV2 specific property associations are declared in the properties section of EMV2. However, we can only associate values to EMV2 model elements. There has been a user need to associate an EMV2 specific property with the enclosing component or a subcomponent.