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

Add notification when move connectable #461

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

SlimaneAmar
Copy link
Contributor

Please check if the PR fulfills these requirements

  • [ x] The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What is the current behavior?
When we move a connectable no notification sent

What is the new behavior (if this is a feature change)?
When we move a connectable a notification is sent

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • [x ] No

@SlimaneAmar SlimaneAmar requested a review from geofjamg October 2, 2024 15:10
@SlimaneAmar SlimaneAmar force-pushed the add_notification_when_move_connectable branch from 92ef6f3 to 1fd93ea Compare October 2, 2024 15:24

@Override
public String toString() {
return "NodeTopologyPoint(" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BusTopologyPoint (same error in powsybl-core ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

public void moveConnectable(int node, String voltageLevelId) {
TopologyPoint oldTopologyPoint = TerminalImpl.this.getTopologyPoint();
super.moveConnectable(node, voltageLevelId);
index.notifyUpdate(connectable, "moveConnectable", oldTopologyPoint, TerminalImpl.this.getTopologyPoint());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attribute name "moveConnectable" is not the same as the one in powsybl-core ... (where it is : "terminal" + side)

notifyUpdate("terminal" + (iSide + 1), oldTopologyPoint, terminalExt.getTopologyPoint());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

public void moveConnectable(String busId, boolean connected) {
TopologyPoint oldTopologyPoint = TerminalImpl.this.getTopologyPoint();
super.moveConnectable(busId, connected);
index.notifyUpdate(connectable, "moveConnectable", oldTopologyPoint, TerminalImpl.this.getTopologyPoint());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

public void moveConnectable(int node, String voltageLevelId) {
TopologyPoint oldTopologyPoint = TerminalImpl.this.getTopologyPoint();
super.moveConnectable(node, voltageLevelId);
index.notifyUpdate(connectable, "terminal" + getSide(), oldTopologyPoint, TerminalImpl.this.getTopologyPoint());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getSide().getNum()

public void moveConnectable(String busId, boolean connected) {
TopologyPoint oldTopologyPoint = TerminalImpl.this.getTopologyPoint();
super.moveConnectable(busId, connected);
index.notifyUpdate(connectable, "terminal" + getSide(), oldTopologyPoint, TerminalImpl.this.getTopologyPoint());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getSide().getNum()

Signed-off-by: Slimane AMAR <[email protected]>
@SlimaneAmar SlimaneAmar force-pushed the add_notification_when_move_connectable branch from 74e5c8b to 2016ca3 Compare October 4, 2024 07:08
Copy link
Contributor

@FranckLecuyer FranckLecuyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix sonar issues

Signed-off-by: Slimane AMAR <[email protected]>
@SlimaneAmar SlimaneAmar requested review from jonenst and removed request for geofjamg October 18, 2024 13:56
… into add_notification_when_move_connectable
Copy link

sonarqubecloud bot commented Nov 4, 2024

@antoinebhs antoinebhs merged commit 8927b7c into main Nov 4, 2024
4 checks passed
@antoinebhs antoinebhs deleted the add_notification_when_move_connectable branch November 4, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants