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
Cellular: CellularContext must provide access to CellularDevice #10210
Conversation
@jarvte, thank you for your changes. |
ebb65ed
to
c0151b1
Compare
Force pushed review fixes:
|
This is a great feature to add! Whenever working with the cell infrastructure, I always find it cumbersome to work between |
When using NetworkInterface::get_default_instance() application gets handle to CellularInterface which is actually CellularContext derived from CellularInterface. Application needs also handle to CellularDevice to open other interfaces.
c0151b1
to
b0ee22c
Compare
pushed AT-specific device getter to AT_CellularContext as @kjbracey-arm suggested. |
Should getter be |
(I don't think I'm talking nonsense here, but it's possible...) The application doesn't need to know the type - if it is using If it's using So we're just using whatever static type information we have at the call-site, and maintaining that static type information in the output. The actual dynamic type we don't know, and can't determine anyway as RTTI is turned off, and either way you're getting a pointer to the same object - the two implementations do the same thing, so it doesn't matter which one you call. An application using It's just a bit like the overloads:
Both do the same thing, so it doesn't really matter which you call, but the static type of the output depends on the static type of the input. |
CI started |
Test run: SUCCESSSummary: 13 of 13 test jobs passed |
Cellular: CellularContext must provide access to CellularDevice
Description
When using NetworkInterface::get_default_instance() application gets handle
to CellularInterface which is actually CellularContext derived from CellularInterface.
Application needs also handle to CellularDevice to open other interfaces.
Pull request type
Reviewers
@AnttiKauppila @kivaisan
Release Notes
When using NetworkInterface::get_default_instance() application gets handle
to CellularInterface which is actually CellularContext derived from CellularInterface.
Application needs also handle to CellularDevice to open other interfaces.