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

Add get_connection_status() override in CellularContext #9378

Merged
merged 3 commits into from Feb 5, 2019

Conversation

Projects
None yet
9 participants
@oscarh
Copy link
Contributor

commented Jan 15, 2019

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

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

oscarh added some commits Jan 15, 2019

Add connection status override for CellularContext
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.
Call network status callback from UBLOX AT
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.

@ciarmcom ciarmcom requested a review from ARMmbed/mbed-os-maintainers Jan 15, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Jan 15, 2019

@oscarh, thank you for your changes.
@ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested a review from ARMmbed/mbed-os-wan Jan 15, 2019

@jarvte

jarvte approved these changes Jan 16, 2019

@0xc0170 0xc0170 requested a review from ARMmbed/team-ublox Jan 16, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 21, 2019

@ARMmbed/team-ublox Can you please review?

@fahim-ublox

This comment has been minimized.

Copy link
Contributor

commented Jan 21, 2019

OK in review

@fahim-ublox

This comment has been minimized.

Copy link
Contributor

commented Jan 22, 2019

Looks OK

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Jan 22, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 22, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Jan 22, 2019

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests
@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 22, 2019

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'`

@0xc0170 0xc0170 added needs: work and removed needs: CI labels Jan 22, 2019

@oscarh

This comment has been minimized.

Copy link
Contributor Author

commented Jan 22, 2019

@bqam-ublox

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

Hi @oscarh , it seems like you need to add a stub function in AT_CellularContext_stub.cpp file to resolve the unit test failure.

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Jan 30, 2019

@oscarh Any update?

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Feb 4, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Feb 4, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit a0ec77d into ARMmbed:master Feb 5, 2019

27 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+52 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 10970 cycles (+1738 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Feb 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.