Skip to content

Commit 94d24af

Browse files
authored
Merge pull request #3 from NACLab/issue2
Naming Bug Fix
2 parents ef5b018 + 9becae8 commit 94d24af

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

ngcsimlib/controller.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def verify_connections(self, skip_components=None):
5858
else:
5959
self.components[component].verify_connections()
6060

61-
def connect(self, source_component_name, source_compartment_name, destination_component_name,
61+
def connect(self, source_component_name, source_compartment_name, target_component_name,
6262
target_compartment_name, bundle=None):
6363
"""
6464
Creates a cable from one component to another.
@@ -69,7 +69,7 @@ def connect(self, source_component_name, source_compartment_name, destination_co
6969
source_compartment_name: the name of the compartment containing the
7070
source value
7171
72-
destination_component_name: the name of the component receiving
72+
target_component_name: the name of the component receiving
7373
the value
7474
7575
target_compartment_name: the name of the compartment to store the
@@ -78,16 +78,16 @@ def connect(self, source_component_name, source_compartment_name, destination_co
7878
bundle: the number of the bundle rule to be used when using this
7979
cable (Default: None)
8080
"""
81-
self.components[destination_component_name].create_incoming_connection(
81+
self.components[target_component_name].create_incoming_connection(
8282
self.components[source_component_name].create_outgoing_connection(source_compartment_name),
8383
target_compartment_name,
8484
bundle)
85-
self.connections.append((source_component_name, source_compartment_name, destination_component_name,
85+
self.connections.append((source_component_name, source_compartment_name, target_component_name,
8686
target_compartment_name, bundle))
8787
self._json_objects['connections'].append({
8888
"source_component_name": source_component_name,
8989
"source_compartment_name": source_compartment_name,
90-
"target_component_name": destination_component_name,
90+
"target_component_name": target_component_name,
9191
"target_compartment_name": target_compartment_name,
9292
"bundle": bundle})
9393

ngcsimlib/json_schemas/cables.schema

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
items: {
66
description: "The five different parts of a single cable",
77
type: "object",
8-
required: ["source_component", "source_compartment", "target_component", "target_compartment", "bundle"],
8+
required: ["source_component_name", "source_compartment_name", "target_component_name", "target_compartment_name", "bundle"],
99
properties: {
10-
source_component: {
10+
source_component_name: {
1111
type: "string"
1212
},
13-
source_compartment: {
13+
source_compartment_name: {
1414
type: "string"
1515
},
16-
target_component: {
16+
target_component_name: {
1717
type: "string"
1818
},
19-
target_compartment: {
19+
target_compartment_name: {
2020
type: "string"
2121
},
2222
bundle: {

0 commit comments

Comments
 (0)