Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow path implementation incorrectly has error marking when components are modal #1909

Closed
reteprelief opened this issue Jul 19, 2019 · 0 comments · Fixed by #1910

Comments

@reteprelief
Copy link
Contributor

commented Jul 19, 2019

Legality rule 5 in section 10.2 (Flow Implementations) on page
189. "In case of a mode-specific flow implementation, the connections and
the subcomponents named in the flow implementation must be declared at
least for the modes listed in the in modes statement of the flow implementation."
This check should only occur if the flow implementation is modal. If it is not modal then the modes of the flow elements determine whether the flow implementation is active.

In the example below we get the message "Subcomponent 'manage_heat_source' does not exist in mode 'standby'" on manage_heat_source in the flow implementation.

Example:

package RegulateTemperature
public

	process Regulate_Temperature_Pr
		features
			current_temp: in data port ;
			
			heat_control: out data port ;
		flows
			regulate: flow path current_temp -> heat_control;
		modes
			normal : initial mode;
			standby: mode;
	end Regulate_Temperature_Pr;

--@description process implementation that holds threads that regulate air temperature
	process implementation Regulate_Temperature_Pr.impl
		subcomponents
			self_check_regulator: thread Self_Check_Regulator in modes (normal);
			manage_heat_source: thread Manage_Heat_Source in modes (normal);
		connections
			ctmhs: port current_temp -> manage_heat_source.current_temp;
					-- output regulator subsystem status to operator interface  
			rhc: port manage_heat_source.heat_control -> heat_control;
		flows
			regulate: flow path current_temp -> ctmhs -> manage_heat_source.regulate -> rhc -> heat_control;
	end Regulate_Temperature_Pr.impl;

	thread Self_Check_Regulator
		features
			regulator_status: out data port ;
	end Self_Check_Regulator;

	thread Manage_Heat_Source
		features
			current_temp: in data port ;
			heat_control: out data port ;
		flows
			regulate: flow path current_temp -> heat_control;
	end Manage_Heat_Source;

end RegulateTemperature;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.