Skip to content

SD::Log Overflow bounds checks and removing Arduino Strings #268

@ReidP-source

Description

@ReidP-source

Features of Log():

  • Escape character handling for objects and CSVs ("," , "\0" , "\r" , "\n" , ' " ' )
  • Log now returns true on successful writes
  • Used FNV1A 64 bit hashing to check module names in files. Creates a new file if the modules have changed.
  • Buffer agnostic appending to prevent overflows. Large documents will be truncated. Once memory pools are implemented we can use a producer/consumer pipeline to store larger documents with limited buffers.

Features of buildSchemaHashes():

  • Takes two variables (init as 0) and converts to two 64 bit hashes with different seeds.
  • Creates a hash pair for every module currently in the file and document
  • Compares the hashes.
  • Differing hashes indicate the modules have changes and a new file will be started.

Stress test results

https://drive.google.com/file/d/12Fc_cr8wg9ZvRylpuSW3uYzq9tB_bCWe/view?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions