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

E1.33 cherry pick the second #1945

Merged
merged 22 commits into from
Mar 21, 2024

Conversation

peternewman
Copy link
Member

@peternewman peternewman commented Mar 16, 2024

The next sub-part of #1841

@peternewman peternewman added this to the 0.11.0 milestone Mar 16, 2024
Copy link
Member

@kripton kripton left a comment

Choose a reason for hiding this comment

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

See inline comments. Some might be stale due to changes pushed during my review :)

/**
* @brief The port used for E1.33 LLRP communication.
*/
const uint16_t LLRP_PORT = 5569;
Copy link
Member

Choose a reason for hiding this comment

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

it's the same number as above. Do we need both? E133_PORT and LLRP_PORT?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think E133_PORT becomes redundant looking at where it's used, and they essentially reused the port they'd chosen/had allocated.

I'm inclined to leave them separate for now and I've added a task to the primary PR to remove all the redundant code from the pre-standards version.

include/ola/network/AdvancedTCPConnector.h Outdated Show resolved Hide resolved
include/ola/network/TCPConnector.h Outdated Show resolved Hide resolved
libs/acn/RootPDU.h Show resolved Hide resolved
bool IntToConnectStatusCode(uint16_t input,
E133ConnectStatusCode *connect_status_code) {
switch (input) {
case ola::e133::CONNECT_OK:
Copy link
Member

Choose a reason for hiding this comment

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

how about:

 case ola::e133::CONNECT_OK:
 case ola::e133::CONNECT_SCOPE_MISMATCH:
.......
      *connect_status_code = input;
      return true;

?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a very elegant solution.

Unfortunately that code doesn't solely exist in E1.33 land. Do you fancy a clean-up of this (once merged) and the other similar code (e.g. there's some in https://github.com/OpenLightingProject/ola/blob/master/common/rdm/RDMHelper.cpp )?

We'd also need to add OLA_FALLTHROUGH to cover us from other compiler warnings, but looks neat.

Copy link
Member

Choose a reason for hiding this comment

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

I can have a look, yes. Ping me once you merged it!

Copy link
Member Author

Choose a reason for hiding this comment

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

It's in now @kripton but I assume you got an automatic notification anyway...

@peternewman
Copy link
Member Author

See inline comments.

Thanks.

Some might be stale due to changes pushed during my review :)

Yeah sorry it was a bit lumpy! Do you want to check my replies and double-check nothing else snuck through whilst you were looking?

@kripton
Copy link
Member

kripton commented Mar 21, 2024

Some might be stale due to changes pushed during my review :)

Yeah sorry it was a bit lumpy! Do you want to check my replies and double-check nothing else snuck through whilst you were looking?

No problem. It should be fine, github makes it quite easy to track what changed after I started reviewing so go ahead merging it 👍

@peternewman peternewman merged commit 0b27b6e into OpenLightingProject:master Mar 21, 2024
22 checks passed
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.

None yet

2 participants