Skip to content

Instantly share code, notes, and snippets.

@geowurster
Last active August 29, 2015 14:18
Show Gist options
  • Save geowurster/03848f2cd20dccf1a575 to your computer and use it in GitHub Desktop.
Save geowurster/03848f2cd20dccf1a575 to your computer and use it in GitHub Desktop.
GPSD Message Modification Functions
  • Force message
  • Force but keep invalid. Also keep values that are out of bounds.
  • Strip off fields that don't belong
  • Complete a message by adding default fields that are missing
  • Validates whether the fields and values are correct for a given message - returns boolean
  • Import a message - decodes datetime fields to a datetime.datetime object, etc.
  • Export a message - encodes datetime.datetime fields to a string, etc.
  • Given a type, get a complete message that only contains default values.

Let validate failures raise exceptions in the reader that are caught by skip failures

Let the raw failed messages be written somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment