{"id":20989987,"url":"https://github.com/robtillaart/devnull","last_synced_at":"2025-09-07T20:16:21.133Z","repository":{"id":45402897,"uuid":"274420295","full_name":"RobTillaart/DEVNULL","owner":"RobTillaart","description":"Arduino library for a /dev/null stream. - useful for debugging","archived":false,"fork":false,"pushed_at":"2025-08-20T09:08:56.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-20T10:36:12.605Z","etag":null,"topics":["arduino-library","dev","null"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobTillaart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"RobTillaart","custom":"https://www.paypal.me/robtillaart"}},"created_at":"2020-06-23T13:59:27.000Z","updated_at":"2025-08-20T08:57:25.000Z","dependencies_parsed_at":"2024-04-13T09:52:14.269Z","dependency_job_id":"c2239899-267f-4f81-a325-3608cc3036a0","html_url":"https://github.com/RobTillaart/DEVNULL","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/RobTillaart/DEVNULL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDEVNULL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDEVNULL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDEVNULL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDEVNULL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobTillaart","download_url":"https://codeload.github.com/RobTillaart/DEVNULL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDEVNULL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274088637,"owners_count":25220261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino-library","dev","null"],"created_at":"2024-11-19T06:27:16.800Z","updated_at":"2025-09-07T20:16:21.124Z","avatar_url":"https://github.com/RobTillaart.png","language":"C++","readme":"\n[![Arduino CI](https://github.com/RobTillaart/DEVNULL/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)\n[![Arduino-lint](https://github.com/RobTillaart/DEVNULL/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/DEVNULL/actions/workflows/arduino-lint.yml)\n[![JSON check](https://github.com/RobTillaart/DEVNULL/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/DEVNULL/actions/workflows/jsoncheck.yml)\n[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/DEVNULL.svg)](https://github.com/RobTillaart/DEVNULL/issues)\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/DEVNULL/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/RobTillaart/DEVNULL.svg?maxAge=3600)](https://github.com/RobTillaart/DEVNULL/releases)\n[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/DEVNULL.svg)](https://registry.platformio.org/libraries/robtillaart/DEVNULL)\n\n\n# DEVNULL\n\nArduino library for a /dev/null stream.\n\n\n## Description\n\nThe library implements a stream class that mimics the **/dev/null**\ndevice of a Linux system. You can write everything to it. \nYou can never read data from it as it always returns EOF (end of file);\n\nThe 0.1.0 version is a minimal implementation that can be optimized.\nit implements the **write(const uint8_t data)** call and e.g. a float is still\nconverted to individual characters that are send one after another.\nStrings and text send every byte.\n\nThe advantage is that printing takes time and e.g. one can use it to measure \nthe **print** class performance.\n\nPerformance can be increased by implementing all methods of the print interface\nwith only a return 0; (or at least **print(Type)** as the **println(T)** would only \ncall once extra for the \"\\n\".\n\n\n### Related\n\n- https://github.com/RobTillaart/DEVFULL\n- https://github.com/RobTillaart/DEVNULL\n- https://github.com/RobTillaart/DEVRANDOM\n\n\n## Interface\n\n```cpp\n#include \"DEVNULL.h\"\n```\n\n### Constructor\n\n- **DEVNULL()** constructor, sets the timeout to zero.\n\n### Stream interface\n\n- **int available()** always return zero.\n- **int peek()** always returns EOF.\n- **int read()** always return EOF.\n- **void flush()** does nothing but keeps some compilers happy.\n- **size_t write(const uint8_t data)** implements print interface. returns 1.\n- **size_t write( const uint8_t \\*buffer, size_t size)** implements print interface.\nReturns size.\n- **int lastByte()** returns last byte written (debug and test purpose).\nReturns -1 if no byte has been written yet.\n\n\n## Operation\n\nUse with care.\n\nSee examples.\n\n\n## Future\n\n#### Must\n\n#### Should\n\n#### Could\n\n- add byte counter (uint32_t)\n- investigate if DEVNULL can be used to harvest entropy?\n  - sum xor of all data + timestamp?\n  - enable / disable flag (complex)\n  - =\u003e /dev/entropy class?\n- **flush()** could reset bottomLessPit to -1?\n\n\n#### Wont\n\n- add delay to mimic pause / tune behaviour for simulating devices\n  - microseconds\n  - delay per byte, esp long arrays might need other performance\n  - out of scope for /dev/null =\u003e separate class?\n- implement Print class to increase performance?\n  - derived class?\n\n\n## Support\n\nIf you appreciate my libraries, you can support the development and maintenance.\nImprove the quality of the libraries by providing issues and Pull Requests, or\ndonate through PayPal or GitHub sponsors.\n\nThank you,\n\n","funding_links":["https://github.com/sponsors/RobTillaart","https://www.paypal.me/robtillaart"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtillaart%2Fdevnull","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtillaart%2Fdevnull","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtillaart%2Fdevnull/lists"}