Skip to content

Cellular: Remove support for multiple ATHandlers #12305

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

Merged
merged 1 commit into from
Feb 7, 2020
Merged

Cellular: Remove support for multiple ATHandlers #12305

merged 1 commit into from
Feb 7, 2020

Conversation

kivaisan
Copy link
Contributor

@kivaisan kivaisan commented Jan 23, 2020

Summary of changes

This commit removes multi ATHandler support from cellular. This has not been used and causes unnecessary complexity and memory consumption.

Memory statistics of mbed-os-example-cellular with NRF52840_DK + BG96:
GCC:
Total Static RAM memory (data + bss): 29360(+296) bytes
Total Flash memory (text + data): 130660(-832) bytes

ARM:
Total Static RAM memory (data + bss): 261554(+8) bytes
Total Flash memory (text + data): 127573(-1193) bytes

IAR:
Total Static RAM memory (data + bss): 25479(+296) bytes
Total Flash memory (text + data): 102418(-527) bytes

RAM increase is because now ATHandler is no longer created with new -operator but is now member of AT_CellularDevice, so image tool is able to count it. Actual total RAM consumption has decreased due to removed variables.

Impact of changes

Major changes:

  • Dependency to FileHandle removed from base classes
  • AT_CellularDevice owns the default FileHandle and shares it with AT -classes
  • Controlling hang-up -detection moved as CellularContext::configure_hup(). Cannot be configured via CellularDevice any more.

Migration actions required

  • Enabling hang-up detection is now configured using CellularContext::configure_hup(). CellularDevice::enable_hup() and context creation with BufferedSerial handle removed. Cellular will now automatically enable and disable HUP when switching between AT and PPP mode.
  • CellularDevice::create_context() no longer takes FileHandle as parameter
  • CellularDevice::get_file_handle() removed. ATHandler::get_file_handle() can be used instead.

Documentation


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[X] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Reviewers

@ARMmbed/mbed-os-wan @kjbracey-arm


Major changes:
- Dependency to FileHandle removed from base classes
- AT_CellularDevice owns the default FileHandle and shares it with AT -classes
- Hang-up -detection moved as CellularContext::configure_hup(). Cannot be configured via CellularDevice any more.

Result on NRF52840_DK + BG96:
GCC:
Total Static RAM memory (data + bss): 29360(+296) bytes
Total Flash memory (text + data): 130660(-832) bytes

ARM:
Total Static RAM memory (data + bss): 261554(+8) bytes
Total Flash memory (text + data): 127573(-1193) bytes

IAR:
Total Static RAM memory (data + bss): 25479(+296) bytes
Total Flash memory (text + data): 102418(-527) bytes

RAM increase is because now ATHandler is no longer created with new -operator but is now member of AT_CellularDevice,
so image tool is able to count it. Actually total RAM consumption has decreased due to removed variables.
@ciarmcom ciarmcom requested review from kjbracey and a team January 23, 2020 10:00
@ciarmcom
Copy link
Member

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

@adbridge
Copy link
Contributor

@kivaisan thank you for a well documented PR template :)

@adbridge
Copy link
Contributor

@kjbracey-arm could you please review ?

@0Grit
Copy link

0Grit commented Jan 25, 2020 via email

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 5, 2020

Let's resume the reviews!

@mergify mergify bot added needs: CI and removed needs: review labels Feb 6, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 6, 2020

CI started

@0xc0170 0xc0170 requested a review from bulislaw February 6, 2020 09:03
@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 label Feb 6, 2020
@mbed-ci
Copy link

mbed-ci commented Feb 6, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING-CHANGE release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants