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

Implement modem #66

Closed
wants to merge 28 commits into from
Closed

Conversation

ed7coyne
Copy link
Collaborator

This is still a work in progress, definitely needs some cleaning at the least but it is working.

  • To do this I needed to be able to mock a firebase object. Per our recent discussions this may become much easier with the refactorings we were talking about but this impl will work for now.
  • Also needed to break out an http client object to keep all the esp8266 from compiling to build a Firebase.
  • I also needed to be able to build and run locally outside of the arduino framework, as such I have added some dummies and a link to the arduino-mock repository to make this possible.

#define HTTP_CODE_TEMPORARY_REDIRECT 307
#define USE_ESP_ARDUINO_CORE_2_0_0
#endif
using std::unique_ptr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we could assume unique_ptr is there in all arduino c++ toolchains (this would be our first dep on the stl).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is true, if it isn't we can drop these and fall back to comments saying "the client owns the object and is responsible for freeing" I would prefer to keep it explicit if we can though.

@ed7coyne
Copy link
Collaborator Author

The FirebaseSerialHost example is working and I have tested it with the huzzah module. We are still missing the advanced versions of all commands.

I wouldn't mind checking in the simple version though and making a smaller PR for the advanced versions. This one is getting a little large.

@@ -0,0 +1 @@
modem
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an odd artifact of the arduino IDE. It is a symlink because the IDE will only compile .cpp files that are either in the root of a library or in a folder called "utility". Supposedly git handles symlinks correctly and will create it properly on checkout.

In the long run I am not sure what we want to do. The modem is logically completely separate from the Firebase library so I don't really want to dump them both in a flat folder.

What do you think of separating them into different arduino libraries? Maybe even different github repos?

@proppy proppy mentioned this pull request Apr 2, 2016
4 tasks
//


// FirebasePush_ESP8266 is a sample that will start our serial transciever
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/Push/SerialHost/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

# The first commit's message is:

Update FirebaseStream_ESP8266.ino

# This is the 2nd commit message:

Fix parsing of returned json object.

The json object now has multiple values in data{}. Changing the code to pull the "last" value.
# The first commit's message is:
Modem design image

# This is the 2nd commit message:

Updated diagram

# This is the 3rd commit message:

Update design.md
Add tests

Added gmock/gtest submodules

Revert "Added gmock/gtest submodules"

This reverts commit b975f3b.

found out googlemock and googletest are now merged, only need one.

Added googletest submodule

Added *Ptr methods to firebase, get test mostly compiling

Broke FirebaseHttpClient out from Firebase to allow greater portability and testability.

re check in commands and add input stream

Working local command test

Added base test for set

Added base test for set (actually this time)

Cleanup set test and add error test

Clean up get test and added failure handling

Added remove command and test

Added push command and test

Minor cleanup to set test

Added begin command and test

Fixed all tests operating on the assumption that readLine() included the \r\n
Getting serial example together

Cleaning up

Changes to make both arduino and tests compile

All existing examples work now.

changes to get SerialHost building

Fixed up Stream example

Fixed up Stream example

Fixes to get FirebaseSerialHost.ino working!

Switch to huzzah module.

All examples are working

Add instructions to example and test files.

unit tests are all working with new changes

Cleanup comments

remove arduino-mock

Revert "remove arduino-mock"

This reverts commit e7aa75f.

remove old arduino-mock

Add modified submodule

Added stream command using simple syntax.

Fixes from testing with serial modem
Modem design image

modified diagram

renamed diagram

Create design.md

Update design.md

Updated diagram

Update design.md

switched diagram back to png

Update design.md

Update design.md

Untested initial command with tests

Added gmock/gtest submodules

Revert "Added gmock/gtest submodules"

This reverts commit b975f3b.

found out googlemock and googletest are now merged, only need one.

Added googletest submodule

import example make file

Added *Ptr methods to firebase, get test mostly compiling

Broke FirebaseHttpClient out from Firebase to allow greater portability and testability.

re check in commands and add input stream

Working local command test

Added base test for set

Added base test for set (actually this time)

Cleanup set test and add error test

Clean up get test and added failure handling

Added remove command and test

Added push command and test

Minor cleanup to set test

Added begin command and test

Fixed all tests operating on the assumption that readLine() included the \r\n

Add base for SerialTransciever.

Getting serial example together

Cleaning up

Changes to make both arduino and tests compile

All existing examples work now.

changes to get SerialHost building

Fixed up Stream example

Fixes to get FirebaseSerialHost.ino working!

Switch to huzzah module.

All examples are working

unit tests are all working with new changes

Added stream command using simple syntax.

Fixes from testing with serial modem

Reorganized the library to comply with arduino 1.5+ library standards https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification

Fixed some issues from PR review

Modem design image

modified diagram

renamed diagram

Create design.md

Update design.md

Updated diagram

Update design.md

switched diagram back to png

Update design.md

Update design.md

Untested initial command with tests

Added gmock/gtest submodules

Revert "Added gmock/gtest submodules"

This reverts commit b975f3b.

found out googlemock and googletest are now merged, only need one.

Added googletest submodule

import example make file

Added *Ptr methods to firebase, get test mostly compiling

Broke FirebaseHttpClient out from Firebase to allow greater portability and testability.

re check in commands and add input stream

Working local command test

Added base test for set

Added base test for set (actually this time)

Cleanup set test and add error test

Clean up get test and added failure handling

Added remove command and test

Added push command and test

Minor cleanup to set test

Added begin command and test

Fixed all tests operating on the assumption that readLine() included the \r\n

Add base for SerialTransciever.

Getting serial example together

Cleaning up

Changes to make both arduino and tests compile

All existing examples work now.

changes to get SerialHost building

Fixed up Stream example

Fixed up Stream example

Fixes to get FirebaseSerialHost.ino working!

Switch to huzzah module.

All examples are working

unit tests are all working with new changes

Add modified submodule

Added stream command using simple syntax.

Fixes from testing with serial modem

Reorganized the library to comply with arduino 1.5+ library standards https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification

Fixed some issues from PR review

re check in commands and add input stream

Working local command test

Update design.md

Update design.md

Added base test for set

Added base test for set (actually this time)

Cleanup set test and add error test

Added remove command and test

Added push command and test

Minor cleanup to set test

Added begin command and test

Fixed all tests operating on the assumption that readLine() included the \r\n

Add base for SerialTransciever.

Getting serial example together

Cleaning up

Changes to make both arduino and tests compile

All existing examples work now.

changes to get SerialHost building

Fixed up Stream example

Fixed up Stream example

Fixes to get FirebaseSerialHost.ino working!

Switch to huzzah module.

All examples are working

unit tests are all working with new changes

Add modified submodule

Added stream command using simple syntax.

Fixes from testing with serial modem

Reorganized the library to comply with arduino 1.5+ library standards https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification

Fixed some issues from PR review
@googlebot
Copy link

CLAs look good, thanks!

This was referenced Apr 15, 2016
@ed7coyne
Copy link
Collaborator Author

This PR is being abandoned, it is in a hopeless tailspin of rebasing that I cannot pull it out of. See #83 and #84

@ed7coyne ed7coyne closed this Apr 15, 2016
@ed7coyne ed7coyne deleted the modem-impl branch June 17, 2016 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants