Commit Graph

46 Commits

Author SHA1 Message Date
Adeeb Shihadeh eabd20c919
remove prints in sconscript[ 2024-06-11 11:21:08 -07:00
Harald Schäfer 381fc3d9df
Restructure package (#622)
* Move around

* rename messaging to ipc

* More renames

* refactor visionipc ipc

* more movement

* compiles

* works well

* update workflow

* Update

* test fake

* fix names

* Fix test

* exclude library

* exclude from lint too

* Rm dir

* rm this wayu

* Try again

* mv logger

* delete old

* HAX

* Move logger down

* add warning abck
2024-06-09 17:17:12 -07:00
Harald Schäfer 2ac05eae17
Get tests running again (#621)
* Get tests running again

* rn

* I don't understand what any of this means

* More updates

* Try fixing test_fake

* test fake passes

* All python tests pass
2024-06-07 13:32:22 -07:00
Harald Schäfer 6d2cc6e222
Restructure cereal (#620)
* Dont want those here

* Move visionipc

* doesnt make sense for now

* Compiles

* Move rest over

* Somewhat works

* Add .sp

* Delete messaging/messaging_pyx.so

* Delete messaging/messaging_pyx.cpp

* ignore this too

* Not needed

* Add pyproj

* Fix zmq port
2024-06-06 13:58:15 -07:00
Justin Newberry 2012d9fd16
scons: move exports to submodule (#593)
cleanup-cereal
2024-02-27 13:15:22 -08:00
Adeeb Shihadeh 82bca3a971
add --minimal build flag (#523)
* add --minimal build flag

* update that
2023-08-24 14:00:32 -07:00
Harald Schäfer 9b6b53396f
Custom events reserved for forks (#449)
* Custom events reserved for forks

* Fixes

* Custom updates

* Update README.md

* little more

* add identifiers

* Language

* little more

* rm that

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-05-23 20:44:17 +02:00
Kacper Rączy 4e063ca166
FakeSubSocket and FakePubSocket for IPC synchronization (#439)
* Implementation of FakeSubSocket and FakePubSocket using eventfd with support for one-in/one-out synchronization

* Expose FakeEvent to Python

* Add demo showcasing synchronization between processes

* Fix linter errors

* Expose more FakeEvent APIs in Python bindings

* Add FakePoller implementation

* Remove suffix from poll env vars

* Set poller timeout to zero when events are enabled

* Replace poll with ppoll. Add invalidation methods

* Fix lint issues

* Fix comment indent

* Remove fake_demo

* Remove FakePubSocket. Simpler FakePoller implementation. Ability to wait for multiple events

* Rename FakeEvent to Event and move it to event.cc

* Rename event purpose constants in py

* Add support for timeout in wait methods

* Add tests for events and fake sockets

* Fix lint errors

* Add zmq sleeps

* Temporarly disable TestFakeSockets on ZMQ

* Add exception type specifiers to test_fake

* Event Manager implementation

* Fix fake sockets tests

* Update EventManager API

* Add test for enable/disable

* Add tests for cereal prefix

* Remove EventPurpose from python bindings

* Fix lint issues

* event_state_shm_mmap implementation shared by EventManager and FakeSubSocket

* Rename EventManager to SocketEventHandle

* More renames
2023-05-23 19:38:52 +02:00
Adeeb Shihadeh 1b342ce4e0 cleanup comma two stuff 2022-04-19 10:58:17 -07:00
Willem Melching 9416d75c20 fix library order 2022-03-07 11:50:17 +01:00
Adeeb Shihadeh 206df19a5f
mac: fix test build (#252) 2022-03-05 14:56:15 -08:00
Adeeb Shihadeh eef624067f
get rid of the java (#199) 2021-09-21 14:48:35 -07:00
Willem Melching aa2a1e9d80
Improve VisionIPC error handling (#184)
* add return values to visionbuf

* add mock logger and log prints

* add logging to server

* unused

* link in common
2021-07-29 10:32:29 +02:00
Adeeb Shihadeh d87e7e56d9 fix cython visionipc for qcom 2021-05-28 20:34:11 -07:00
Adeeb Shihadeh 3ef74b4d99 remove QCOM_REPLAY 2021-05-28 19:43:58 -07:00
Comma Device 7d304cdd29 cleanup in the post-apk era 2021-04-10 14:24:10 -07:00
Adeeb Shihadeh a36758d8ba
define services in python (#118)
* define services in python

* rm

* optional
2021-02-11 17:27:15 -08:00
Willem Melching 122c371910 fix macos build 2021-02-09 17:39:33 +01:00
Willem Melching dc406553eb
Cython wrapper for VisionIpc server (#117)
* vipc cython wrapper

* send some data

* start listener

* fix extra datatype
2021-02-09 17:15:18 +01:00
Adeeb Shihadeh b19a3ed38d
cleanup + comments (#116)
* start cleanup

* controlsState is horrible

* more controlsState cleanup

* carstate

* cleanup plan packets

* rename events

* update mono times

* update service list

* don't need multiple radar alerts

* small car.capnp cleanup

* start thermal cleanup

* fan speed

* model packets

* fix build

* hw -> panda

* capitalize

* deprecate rest of warp matrices

* generate headers
2021-02-03 19:56:19 -08:00
Adeeb Shihadeh af57ebd232
split out deprecated structs into separate schema file (#113)
* legacy capnp

* little more

* move model data

* much orb

* move rest of it

* cleanup

* explicit id

* rm tmp file
2021-02-02 12:20:18 -08: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
grekiki adcbc666b6
cython scons builder (#100)
* improve building

* numpy will probably not be needed

* remove unnedded lines

* guessing what static analysis wants to pass

* fix the test by removing it

* Update __init__.py

* Update SConstruct

* Update SConscript

* style

* pre commit

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-25 17:14:50 -08:00
Adeeb Shihadeh 7234804834
ubuntu 16.04 -> 20.04 (#97)
* ubuntu 20.04

* non interactive

* fix src prefix
2020-10-24 00:07:24 -07:00
Adeeb Shihadeh 3020c2b925 simple service tests 2020-07-29 13:38:36 -07:00
Adeeb Shihadeh 7b78cda876 rebuild cython extensions when python/cython/distuils change 2020-07-16 13:33:19 -07:00
Dean Lee be3fc45176
move socketmaster to messaging (#53) 2020-06-11 17:44:19 -07:00
Dean Lee 30838d40a4
C++ implementation of SubMaster and PubMaster (#42)
* add class SubMaster&PubMaster

* add socketmaster.cc

* move to cereal_objects

* modify SubMaster

* modify SubMaster

* Code streamlining

* m createSocket

remove dup SubMessage

* Streamline code

Streamline code

Streamline code

alive if delay with LogMonoTime x

reduce code lines

add underscore to class variable,dont check getValid() in poll

add static function get_service(), assert if pub name is not in service list

remove paramater alive from recieve()

rename services to endpoints

is alive is freq_ <= (1e-5)

referer

use sockets_.find() in pushMaster::send to avoid create an empty entry

submaster only do poller, rm PubMaster,add PubMessage

add MessageContext

make SubMaster api same as python version

add class PubMessage

add empty line

fix type

fix typo

remove service_list_

Streamline code

 use cached heaparry to build&send msg

reduce lines

rename sockets_ to messages_

initialize member variable in class

don't use std::find

fix typo

* use global context,remove class PubMessage

remove SubMessage interface from header,add operator[]

undo format source

add new line at end of file

add missing header fiel

reve std::find

add empty line

better drain
2020-05-21 13:57:25 -07:00
Willem Melching 9073b9b1b4
Library cleanup (#43)
* library cleanup

* no static libraries

* apks need static zmq

* Typo

* No hacky script
2020-05-12 18:50:24 -07:00
Adeeb Shihadeh 12aad06e12 no more c capnp 2020-05-07 22:41:03 -07:00
George Hotz 21cf3f557e build on mac 2019-12-14 19:34:01 -08:00
Willem Melching a7d5bb76b2 add explicit dependencies on services.h 2019-12-03 09:46:17 -08:00
George Hotz e25bba7747 no need to double build the objects 2019-11-22 07:09:46 -08:00
andyh2 e8ae9086c2 Generate capnp for java 2019-11-21 23:34:52 -05:00
Comma Device 57126a23d9 cereal_shared 2019-11-22 02:01:54 +00:00
Willem Melching 52c6db8719
Run scons in CI (#14)
* try to run scons in azure pipelines

* sudo

* install capnp

* does this run

* also clean test runner

* remove makefiles

* this should build
2019-11-20 16:32:42 -08:00
George Hotz 9414615b99 do need it, but only for arm 2019-11-20 13:03:32 -08:00
George Hotz 2856c37c7b remove gnustl_shared 2019-11-20 13:01:23 -08:00
Comma Device 7f05ee64d9 fix apks 2019-11-20 20:06:32 +00:00
Comma Device da2ed115e8 don't link the wrong one 2019-11-20 17:54:48 +00:00
Comma Device fe9fe2a200 scons builds the python lib now 2019-11-20 17:44:47 +00:00
Comma Device 57b03f8b92 now we shouldn't need that yaml crap everywhere 2019-11-20 16:47:01 +00:00
Comma Device f8e5327781 bridge builds with services.h 2019-11-20 16:33:24 +00:00
Willem Melching ec27e18cf3 capnpc also generated the header files 2019-11-14 13:50:12 -08:00
Comma Device 7fd314afa4 update scons build file 2019-11-13 18:01:01 +00:00
Comma Device 64ce0b5f40 add scons build 2019-11-12 00:49:08 +00:00