Skip to content
Snippets Groups Projects
Commit 413856af authored by Botond Baranyi's avatar Botond Baranyi Committed by Gerrit Code Review
Browse files

Merge "Added new function to make the IPL4 testport work with translation ports"

parents f8cbb9b3 90823060
No related branches found
No related tags found
No related merge requests found
...@@ -503,6 +503,15 @@ boolean PORT::port_is_started() { ...@@ -503,6 +503,15 @@ boolean PORT::port_is_started() {
return is_started; return is_started;
} }
PORT* PORT::get_provider_port() {
get_default_destination();
PORT* p = lookup_by_name(system_mappings[0], TRUE);
if (p == NULL) {
p = lookup_by_name(system_mappings[0], FALSE);
}
return p;
}
alt_status PORT::receive(const COMPONENT_template&, COMPONENT *, Index_Redirect*) alt_status PORT::receive(const COMPONENT_template&, COMPONENT *, Index_Redirect*)
{ {
TTCN_Logger::log_matching_problem( TTCN_Logger::log_matching_problem(
......
...@@ -138,6 +138,12 @@ public: ...@@ -138,6 +138,12 @@ public:
boolean port_is_started(); boolean port_is_started();
// Returns the outer message port it is mapped to
// when the port works in translation mode. Otherwise returns NULL.
// Emits errors when the port is mapped to more than one port or
// has both connections or mappings.
PORT* get_provider_port();
boolean check_port_state(const CHARSTRING& type) const; boolean check_port_state(const CHARSTRING& type) const;
static boolean any_check_port_state(const CHARSTRING& type); static boolean any_check_port_state(const CHARSTRING& type);
static boolean all_check_port_state(const CHARSTRING& type); static boolean all_check_port_state(const CHARSTRING& type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment