Commit Graph

15 Commits

Author SHA1 Message Date
Shane Smiskol
c92be0564c Automatically generate service ports (#136)
* make sure specified port isn't reserved

* only sshd

* Add check to tests as well and test

* commonly define these safety check numbers in services and check in both places

* add function to generate new ports that aren't reserved

* port is guaranteed to not be a reserved port and above 8000 now

asserting the rate on runtime isn't necessary, just for testing

* create service_list dynamically

* redundant

* just add an offset equal to length of services dict

* fix test?

* only one reserved

* ignore the argument type error

* rm line

* Add back tests

* starts at 8001
2021-04-20 17:57:54 +02:00
HaraldSchafer
a034837924 Best practice (#107)
* Update README.md

* Update README.md

* Split out sensors

* no duplicate ports

* not used

* misc cleanup

* fix tests

* only catch import error

* celcius is not SI

* better temp

* update servicespy

* add explicit

* -data

* save sensors for later

* more thermal

* little more

* thermal -> deviceState

* steering

* forgot deg

* explicit ids

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-02-16 21:09:50 -08:00
Alexander Litzenberger
32024acdc0 Switch send to using bytes. (#93) 2020-10-06 17:15:01 -07:00
Willem Melching
42e66ba92e use bytes in messaging tests 2020-10-05 11:28:26 +02:00
Adeeb Shihadeh
566152fc29 fix linter 2020-07-29 14:09:00 -07:00
Adeeb Shihadeh
87c10d3346 fix test file path 2020-07-29 13:57:24 -07:00
Adeeb Shihadeh
17c3ad78f2 test generated services.h 2020-07-29 13:45:03 -07:00
Adeeb Shihadeh
3020c2b925 simple service tests 2020-07-29 13:38:36 -07:00
Adeeb Shihadeh
06c7f72a2c Tests for lower level messaging functions (#73)
* start messaging tests

* test drain sock

* recv with retry

* test retry blocking

* fix zmq
2020-07-27 17:30:45 -07:00
Adeeb Shihadeh
45cd21a468 Messaging unit tests (#66)
* pub sub unit test

* pub master test

* first submaster test case

* test init

* submaster conflate test

* more submaster

* all submaster except alive and valid

* fix ZMQ

* fix ZMQ for test_messaging

* single underscore

* fix key error

* more zmq sleep

* zmq needs even more sleep

* unused

* zmq sleep in submaster tests
2020-07-26 19:58:12 -07: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
Willem Melching
1ba646773e fix linter 2019-12-03 07:56:57 -08: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
f6a8e394a2 add test with multiple subscribers 2019-11-21 13:14:31 -08:00
Willem Melching
66be37087a run python unittest in ci 2019-11-20 17:31:33 -08:00