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
Refactor unnecessary functions from cellular driver #12265
Conversation
@AriParkkila, thank you for your changes. |
return NSAPI_ERROR_UNSUPPORTED; | ||
} | ||
|
||
int max_socket_count = get_max_socket_count(); | ||
if (proto == NSAPI_UDP) { | ||
if (!_device.get_property(AT_CellularDevice::PROPERTY_IP_UDP)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cosmetic, but maybe these could be combined into one if -sentence, like:
if (proto == NSAPI_UDP && !_device.get_property(AT_CellularDevice::PROPERTY_IP_UDP)) {
CI started |
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
@@ -39,6 +39,10 @@ static const intptr_t cellular_properties[AT_CellularDevice::PROPERTY_MAX] = { | |||
0, // PROPERTY_NON_IP_PDP_TYPE | |||
1, // PROPERTY_AT_CGEREP | |||
1, // PROPERTY_AT_COPS_FALLBACK_AUTO | |||
0, // PROPERTY_SOCKET_COUNT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here for this target PROPERTY_SOCKET_COUNT
is 7, PROPERTY_IP_TCP
and PROPERTY_IP_UDP
is 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definitions here are for the modem's onboard IP stack. Since this driver has no UBLOX_PPP_CellularStack.cpp
, it should be used only with LWIP that has own definitions.
@@ -62,6 +66,10 @@ static const intptr_t cellular_properties[AT_CellularDevice::PROPERTY_MAX] = { | |||
0, // PROPERTY_NON_IP_PDP_TYPE | |||
1, // PROPERTY_AT_CGEREP | |||
1, // PROPERTY_AT_COPS_FALLBACK_AUTO | |||
0, // PROPERTY_SOCKET_COUNT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same like mentioned above , PROPERTY_SOCKET_COUNT
is 7, PROPERTY_IP_TCP
and PROPERTY_IP_UDP
is 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comment above.
b0e0487
to
f9eef97
Compare
CI restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Summary of changes
Remove unnecessary internal (get_send_delay, is_protocol_supported and get_max_socket_count) functions from cellular modem drivers, and add them as simple constant properties.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers