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

Moves JSON and pickle iterators into libsbp. #37

Merged
merged 1 commit into from
Mar 19, 2015
Merged

Moves JSON and pickle iterators into libsbp. #37

merged 1 commit into from
Mar 19, 2015

Conversation

mookerji
Copy link
Contributor

@mookerji mookerji added this to the libsbp release milestone Mar 18, 2015
@mookerji mookerji self-assigned this Mar 18, 2015
def __iter__(self):
return self

def next(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should next just be a NotImplementedError in the BaseDriver? The readline implementation here seems FileDriver specific - not sure what iteration looks like for the serial drivers - but not newline-based, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

... so I think the serial driver actually does support readline, but it's not clear to me if that's going to a common use case for this API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

err, yes. reading that more carefully, that does make sense. newline iteration for serial ports is a bit weird.

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting - pylibftdi does support it, and pyserial does through serial.FileLike. So yeah go for it! Not really sure what this driver abstraction is buying us, tbh - I think I wanted to wrap things in context management and have some file handle opening convenience - but that was about it. Any thoughts on how to go forward? The usage in sbp_log_analysis was a little weird :( Pass it to a FileDriver object, then to the LogIterator.

@mfine
Copy link
Contributor

mfine commented Mar 18, 2015

Looks great - excited to have this moved into libsbp!

@mookerji
Copy link
Contributor Author

TODO (Buro): Reintroduce relative paths.

@mookerji
Copy link
Contributor Author

k, this is ready to go.

mfine added a commit that referenced this pull request Mar 19, 2015
Moves JSON and pickle iterators into libsbp.
@mfine mfine merged commit ed835a4 into swift-nav:master Mar 19, 2015
@mfine mfine deleted the table-and-log branch March 19, 2015 02:02
@mfine mfine restored the table-and-log branch March 19, 2015 02:03
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.

None yet

2 participants