Pigeon abstraction layer (#1977)

* pigeon abstraction layer

* Fix string literals

* more generic pigeon class

* add TTYpigon

* nicer tty error handling

* close tty fd on pigeon delete

* pigeon receive return std::string

* use sizeof

* max receive size to prevent infinite loop

* remove namespace

* add unistd include for usleep

* fix is pigeon

* Handle tty error in opening

* fix printing binary strings with dump.py

* fix pigeon build on macos

* Handle errors seperately

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 502cc665e0bad89eba0b1c344c2f4f580b153ae1
This commit is contained in:
Willem Melching
2020-08-13 10:10:50 +02:00
committed by GitHub
parent e25063a0b3
commit 938ce91d02
11 changed files with 443 additions and 99 deletions
+1 -2
View File
@@ -5,7 +5,7 @@ if SHARED:
else:
fxn = env.Library
_common = fxn('common', ['params.cc', 'swaglog.cc', 'util.c', 'cqueue.c'], LIBS="json11")
_common = fxn('common', ['params.cc', 'swaglog.cc', 'util.c', 'cqueue.c', 'gpio.cc'], LIBS="json11")
_visionipc = fxn('visionipc', ['visionipc.c', 'ipc.c'])
files = [
@@ -42,4 +42,3 @@ else:
_gpucommon = fxn('gpucommon', files, CPPDEFINES=defines, LIBS=_gpu_libs)
Export('_common', '_visionipc', '_gpucommon', '_gpu_libs')