-
Notifications
You must be signed in to change notification settings - Fork 3k
Add get_connection_status() override in CellularContext #9378
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
Conversation
Add override for the virtual method get_connection_status() inherited from NetworkInterface. The method in the base class returns NSAPI_STATUS_ERROR_UNSUPPORTED. The CellularContext has the member _connection_status, which means that we could return this.
The helper method call_network_cb, actually does a lot more than calling the callback. The method has a check that the network status supplied for the callback is different compared to the internal one. It also sets the class member if it is changed. This is a bit surprising, given the name of the method. It also means that it doesn't work in this call, as the member is already set.
@oscarh, thank you for your changes. |
@ARMmbed/team-ublox Can you please review? |
OK in review |
Looks OK |
CI started |
Test run: FAILEDSummary: 1 of 1 test jobs failed Failed test jobs:
|
Can you review unittest failures? Open build artifacts above in the test report
|
I'll try to fix it ASAP.
Kind regards
Oscar
Am Di., 22. Jan. 2019, 14:29 hat Martin Kojtal <[email protected]>
geschrieben:
… Can you review unittest failures? Open build artifacts above in the test
report
[linux]
CMakeFiles/features-cellular-framework-AT-at_cellulardevice.dir/stubs/AT_CellularContext_stub.cpp.o:(.rodata._ZTVN4mbed18AT_CellularContextE[_ZTVN4mbed18AT_CellularContextE]+0x88):
undefined reference to mbed::AT_CellularContext::get_connection_status()
const'`
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9378 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEzpIVU-aQ2ekxplyRd30wcBFaSZtL1ks5vFxIbgaJpZM4aAfaO>
.
|
Hi @oscarh , it seems like you need to add a stub function in AT_CellularContext_stub.cpp file to resolve the unit test failure. |
@oscarh Any update? |
CI restarted |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
Description
The CellularContext does have the member
nsapi_connection_status_t _connect_status
, which can simple be returned to support the get_connection_status() API.The second part is UBLOX_AT specific, where the callback never is called, as the network_callback helper method actually wants to set the status as well, and doesn't do anything if the status isn't changed.
Pull request type
Reviewers