Skip to content

standard non-blocking NetworkInterface::connect #6496

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 35 commits into from
Apr 12, 2018

Conversation

jarvte
Copy link
Contributor

@jarvte jarvte commented Mar 28, 2018

Description

• the standard non-blocking NetworkInterface::connect API introduced in mbed OS 5.8, including its events
• new cellular-specific status events

Internal ref to defect: IOTCELL-526

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@cmonr
Copy link
Contributor

cmonr commented Mar 29, 2018

As an FYI, this PR is being discussed in an internal email, determining if this PR needs to be considered a Feature.

@0xc0170 0xc0170 requested a review from AnttiKauppila April 3, 2018 13:09
uint16_t _retry_timeout_array[MAX_RETRY_ARRAY_SIZE];
int _retry_array_length;
events::EventQueue _at_queue;
char _st_string[20];
int _eventID;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_event_id

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 6, 2018

Can you please rebase to resolve conflicts?

@jarvte
Copy link
Contributor Author

jarvte commented Apr 6, 2018

@0xc0170 , rebased master and fixed conflicts.

@jarvte jarvte closed this Apr 6, 2018
@jarvte jarvte reopened this Apr 6, 2018
0xc0170
0xc0170 previously approved these changes Apr 6, 2018
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question,

virtual void attach(mbed::Callback<void(nsapi_event_t, intptr_t)> status_cb); - a user is expected to have a state machine there in the callback? Would it be worse to attach actually a callback for a state ? so callback, state, similar to how Serial does (RX or TX).

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 6, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Apr 6, 2018

Build : FAILURE

Build number : 1676
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6496/

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 6, 2018

@jarvte Please review failures, look related to the changeset

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 9, 2018

Jenkins CI failure is know github issue, haven't yet received an update from github about it.

/morph build

@mbed-ci
Copy link

mbed-ci commented Apr 9, 2018

Build : SUCCESS

Build number : 1679
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6496/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@jarvte
Copy link
Contributor Author

jarvte commented Apr 9, 2018

@0xc0170
virtual void attach(mbed::Callback<void(nsapi_event_t, intptr_t)> status_cb); is declared in NetworkInterface, we are kind of proxy here, adding some callbacks. We have different callback for statemachine states: void set_callback(mbed::Callback<bool(int, int)> status_callback);

@mbed-ci
Copy link

mbed-ci commented Apr 9, 2018

@mbed-ci
Copy link

mbed-ci commented Apr 9, 2018

@jarvte
Copy link
Contributor Author

jarvte commented Apr 10, 2018

@0xc0170 should I try to rebase latest from master to github issue potentially working?
Or is it proceeding?

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 10, 2018

@0xc0170 should I try to rebase latest from master to github issue potentially working?
Or is it proceeding?

Lets try. I am testing jenkins CI and github but so far have not found a solution. We experienced that adding a commit sometimes help to refresh github PR

would be great to workaround this for now, the results should be visible quickly

@cmonr
Copy link
Contributor

cmonr commented Apr 10, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Apr 10, 2018

Build : SUCCESS

Build number : 1715
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6496/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Apr 11, 2018

@jarvte
Copy link
Contributor Author

jarvte commented Apr 11, 2018

@0xc0170 had to fix conflicts that appeared so let's try once again :)

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 11, 2018

Will do soon, fixing one target issue in CI

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 11, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Apr 11, 2018

Build : SUCCESS

Build number : 1719
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6496/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Apr 11, 2018

@mbed-ci
Copy link

mbed-ci commented Apr 11, 2018

@cmonr
Copy link
Contributor

cmonr commented Apr 11, 2018

Ignore the above (^^^) failure. This is from the first morph build command.

@mbed-ci
Copy link

mbed-ci commented Apr 12, 2018

@jarvte
Copy link
Contributor Author

jarvte commented Apr 12, 2018

@0xc0170 please approve and merge as our development continues over this change.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 12, 2018

As an FYI, this PR is being discussed in an internal email, determining if this PR needs to be considered a Feature.

Tagged as feature/refactor, 5.9

There's one change I would like @kjbracey-arm to check, nsapi_event_t additions in https://github.com/ARMmbed/mbed-os/pull/6496/files#diff-343c62b2c4de5626e8e2a8e0823ef74aR81

@kjbracey
Copy link
Contributor

I'm fine with the nsapi_event_t change. Just one thing I want clarified - the PR description of what this is implementing. From reading the code, I believe it's

  • the standard non-blocking NetworkInterface::connect API introduced in mbed OS 5.8, including its events
  • new cellular-specific status events

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 12, 2018

@jarvte CAn you please edit the title (it's used for release notes) so better be specific what this PR introduces (keep it within 50 characters)

@jarvte
Copy link
Contributor Author

jarvte commented Apr 12, 2018

@0xc0170 comment updated, please merge.

@jarvte jarvte changed the title Async cellular standard non-blocking NetworkInterface::connect Apr 12, 2018
@0xc0170 0xc0170 merged commit a463b07 into ARMmbed:master Apr 12, 2018
@jarvte jarvte deleted the async_cellular branch April 12, 2018 10:03
chuanga added a commit to chuanga/wise-1570-mbed-os-example-cellular that referenced this pull request Apr 19, 2018
Update Mbed OS to a pre 5.9 master branch for the PR 6494 (ARMmbed/mbed-os#6496). This is for testing with WISE-1570 NBIoT module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants