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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GetValueEndPoint() to Manager #2013

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petergebruers
Copy link
Collaborator

Introduces helper function:

uint8 Manager::GetValueEndPoint(ValueID const &_id)

The purpose is

  • To allow printing of "End Point" for diagnosis. End Point is what is used in conversation with a device, not "Instance".
  • To allow selection of Values with certain End Point for use in "Multi Channel Association". This class does not accept "Instance".

Adds tests to cpp/test/Manager_test.cpp - verifies a (fake) mapping and tests exception thrown.

Adds "TestHelper" as a friend to allow testing of existing OZW classes without refactoring and without having to start a "real" Manager and Driver (which would have its merits but would be to involved and heavy)

If this PR gets accepted, I will update ozwcp to display the "endpoint".

The "TestHelper" can (will) be re-used to test a recent commit, 79663e1
by gizmocuz, "Making GetValue code more consistent, Releasing values", mainly as a proof-of-concept on how to test things.

I am not totally new to testing, but I am new to using "google test" and testing of C++ code so please give an honest opinion 馃檪

Introduces helper function:

uint8 Manager::GetValueEndPoint(ValueID const &_id)

The purpose is
- To allow printing of "End Point" for diagnosis. End Point is what is used in conversation with a device, not "Instance".
- To allow selection of Values with certain End Point for use in "Multi Channel Association". This class does not accept "Instance"

Adds tests to cpp/test/Manager_test.cpp - verifies a (fake) mapping and tests exception thrown.

Adds "TestHelper" as a friend to allow testing of existing OZW classes without refactoring and without having to start a "real" Manager and Driver (which would have its merits but would be to involved and heavy)
@Fishwaldo
Copy link
Member

Thanks. Will review soon.

@Fishwaldo Fishwaldo self-assigned this Nov 29, 2019
@petergebruers petergebruers deleted the endpoints_2b branch March 5, 2020 13:46
@petergebruers petergebruers restored the endpoints_2b branch March 5, 2020 13:59
@Fishwaldo Fishwaldo added this to the 1.7 milestone Mar 5, 2020
@petergebruers petergebruers reopened this Mar 6, 2020
@petergebruers
Copy link
Collaborator Author

Wasn't aware that Github would close my PR if I removed the branch. Was doing some spring cleaning 馃檪...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants