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

Duplicated functions getMemory and address in Modelica.Electrical.Digital.Memories #2084

Closed
modelica-trac-importer opened this issue Jan 15, 2017 · 4 comments
Assignees
Labels
bug Critical/severe issue L: Electrical.Digital Issue addresses Modelica.Electrical.Digital
Milestone

Comments

@modelica-trac-importer
Copy link

modelica-trac-importer commented Jan 15, 2017

Reported by beutlich on 18 Oct 2016 12:33 UTC
There is no need to have have the functions getMemory and address both in Memories.DLATRAM and Memories.DLATROM.


Migrated-From: https://trac.modelica.org/Modelica/ticket/2084

@modelica-trac-importer modelica-trac-importer added this to the MSL_next-MINOR-version milestone Jan 15, 2017
@modelica-trac-importer modelica-trac-importer added bug Critical/severe issue L: Electrical.Digital Issue addresses Modelica.Electrical.Digital labels Jan 15, 2017
@modelica-trac-importer
Copy link
Author

Comment by hansolsson on 26 Oct 2016 09:45 UTC
Replying to [ticket:2084 beutlich]:

There is no need to have have the functions getMemory and address both in Memories.DLATRAM and Memories.DLATRAM.

I assume you mean "There is no need to have have the function getMemory both in Memories.DLATRAM and Memories.DLATROM."

As far as I can see address is not currently used in DLATROM (but could be).

I agree that moving getMemory (and possibly address) could be moved up one level.

@modelica-trac-importer
Copy link
Author

Comment by anonymous on 26 Oct 2016 09:57 UTC
You are right, I mixed it up. There is only DLATRAM.address, but DLATROM uses the same algorithm without a separate function, thus kind of inlined.

@dietmarw dietmarw removed their assignment Jan 16, 2017
@beutlich beutlich modified the milestones: MSL_next-MAJOR-version, MSL_next-MINOR-version Jan 31, 2017
@beutlich
Copy link
Member

Moving public functions (in or across packages) requires a conversion script, so reschedule Milestone.

beutlich added a commit that referenced this issue Apr 19, 2017
* Introduce partial base class MemoryBase
* MemoryBase also provides public function getMemory and protected function address
* See http://tour.xogeny.com/#/chapter-3/lesson-2: Redundancy is the root of all evil
@beutlich beutlich self-assigned this Apr 19, 2017
@beutlich beutlich modified the milestones: MSL_next-MAJOR-version, MSL_next-MINOR-version Apr 19, 2017
@beutlich
Copy link
Member

Resolved in master by preserving backward compatibility.

beutlich added a commit that referenced this issue Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: Electrical.Digital Issue addresses Modelica.Electrical.Digital
Projects
None yet
Development

No branches or pull requests

6 participants