26 Commits

Author SHA1 Message Date
Adeeb Shihadeh
959ff79963 add cpplint (#401)
* add cpplint

* include what you use

* whitespace fixes

* passes
2022-12-31 16:33:09 -08:00
Adeeb Shihadeh
6e58b293ee include from project root (#402) 2022-12-31 14:19:29 -08:00
ntegan1
4ec689c0c4 fix set but unused warning (#390)
* fix set but unused warning

* re-run ci maybe
2022-11-30 11:36:17 -08:00
Lukas Petersson
c09b92c72b messaging: support OPENPILOT_PREFIX (#299)
* messaging prefix

* cleanup

* cleanup

* cleanup

* bin

* clean dir

* max dirs working

* increase max dirs

* check if file exists

* filesystem except

* cleanup

* dont delete manager folder

* dont delete manager folder fix

* default dir

* create file structure

* tab size

* assert no prefix when zmq

* PR feedback

* create dir in test

* Update messaging/messaging.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* import

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-05-16 17:19:32 -07:00
Adeeb Shihadeh
582c379261 silence that 2022-05-06 17:09:31 -07:00
Adeeb Shihadeh
e1395936c0 msgq: remove common prints 2022-04-19 13:57:28 -07:00
Willem Melching
e137c5731e Less open file permissions (#187) 2021-08-28 18:20:54 -07:00
Willem Melching
9d83b15104 msgq_all_readers_updated: only return true when at least one reader is connected 2021-05-05 14:10:58 +02:00
Adeeb Shihadeh
3be0bf50c8 rename headers: hpp -> h 2021-05-03 20:40:36 -07:00
Joost Wooning
957147cb84 some fixes and small changes for locationd in c++ (#135)
* Added getters

* extra service to ack messages in process replay

* fix allAliveAndValid ignoring ignoreValid services

* check if readers are updated

* default message valid true
2021-04-19 17:28:06 +02:00
Willem Melching
95e32803cd Visionipc v2.0 (#101)
* add visionbuf

make static

ignore that

* Needs decleration

* add test binary

* c++

* create some structure

* some impl

* socket stuff

* Accept socket connection

* Alloc some buffers

* Create pub sockets and send buffer id

* make listener private

* Implement receive

* use error check macros in cl_helpers

* constructors to pass in opencl context

* add some convenience values in struct

* refactor creating buffers

* rgb is not so simple

* add fake stride and expose buffers

* add comment

* add extra data struct

* support conflate

* init opencl on all buffers

* make ion compile

* fix qcom2

* correctly setup yuv pointers when importing buffer

* also included from c

* Remove send print statements

* send metadata

* reveive metadata

* also used in c code

* dont start listener automatically

* Was started in 2 places

* set 100ms timeout on socket

* verify server id to detect reconnects

* handle reconnect

* buffer cleanup

* let user handle opencl creation

* add default values

* Add support for aligned rgb buffers

* add align macro

* dont use namespace

* use poller

* apple ifdef in ipc.cc

* VisionBuf is C++ class

* Install opencl headers

* cppcheck c++

* remove c header guard

* fix mac build

* simplify constructors

* Update visionipc/visionipc.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update visionipc/visionbuf_ion.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* add brackets

* s/VIPCBufExtra/VisionIpcBufExtra/g

* Add unittesting harness

* remove vipc demo

* very basic tests

* add conflate test

* Install opencl

* suppress msgq warnings

* Make it work using zmq

* cl in qcom replay

* run unittests in zmq mode as well

* non blocking connect

* always larger frame queues

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-08 14:54:41 +01:00
Dean Lee
16f10b6a9d free reosurces after failed (#91)
* free reosurces aftet fail

* remove delete
2020-10-06 10:54:43 +02:00
Adeeb Shihadeh
2d48c23ca5 fix blocking msgq poll (#64)
* remove unnecessary condition on msqg poll

* fix blocking msgq poll
2020-09-12 22:59:12 -07:00
grekiki
177bc413f7 fix the isssue 41 (#87)
* fix the isssue

* Improve code style

* Improve code style2, remove failing test

* less changes

* style3
2020-09-11 14:45:47 +02:00
George Hotz
9915b2086a fix mac build (#50)
* fix mac build

* remove duplicate line

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-06-11 17:49:19 -07:00
Adeeb Shihadeh
1aaf1bfd7c fix dereferencing of full_path after free 2020-06-08 12:21:07 -07:00
Paweł Goliński
c1a6d75d1d Fix potential segfault in MSGQPubSocket::connect (#45) 2020-05-20 16:12:44 -07:00
Willem Melching
c6b5c73b0b Switch default to msgq (#21)
* switch default to msgq

* SIGUSR1 is already used by the apks

* Don't return message upstream when exiting

* Remove debug print

* Remove more debug print
2020-01-13 09:47:03 -08:00
George Hotz
21cf3f557e build on mac 2019-12-14 19:34:01 -08:00
Willem Melching
3b753be905 Implement error handling and exceptions (#18)
* implement error handling and exceptions

* Add test for MultiplePublisherError

* add some more tests
2019-12-04 23:05:20 +01:00
George Hotz
347a86615c Switch from polling on FIFOs to signal (#12)
* uids are pids

* remove fifo, go for signal

* that's more what i'm saying

* oops, that's wrong

* add some todos

* make signal poll work

* bring randomness back

* fix case in msgq when subs get evicted while polling

* check for ready messages before poll starts

* No pr builds

* use nanosleep with remainder

* this should pass the test
2019-11-22 12:06:26 -08:00
Willem Melching
bcad1848f1 msgq: dont block when fifo does not exists 2019-11-19 12:52:08 -08:00
Willem Melching
c4f2ad5326 msgq: make sure read_fifos is initalized so we dont close random fds 2019-11-15 16:04:27 -08:00
Willem Melching
c008b63056 also remove the fifo from disk 2019-11-15 15:10:13 -08:00
Willem Melching
ef64eb27d7 MSGQ stability improvements when opening and closing lots of queues 2019-11-15 14:37:58 -08:00
Willem Melching
d35515a225 add all msgq files, but dont use as default 2019-11-04 16:15:19 -08:00