moved some files
This commit is contained in:
.gitmodulesREADME.md
bsp_hosted
bsp_q7s
CMakeLists.txtInitMission.h
boardtest
devices
CMakeLists.txtHeaterHandler.cppHeaterHandler.hSolarArrayDeploymentHandler.cppSolarArrayDeploymentHandler.h
main.cppbsp_rpi
cmake/scripts
common
fsfwconfig
linux
boardtest
CMakeLists.txtI2cTestClass.cppI2cTestClass.hLibgpiodTest.cppLibgpiodTest.hSpiTestClass.cppSpiTestClass.hUartTestClass.cppUartTestClass.h
csp
gpio
i2c
spi
utility
misc
mission
core
devices
MGMHandlerLIS3MDL.cppMGMHandlerLIS3MDL.hPCDUHandler.cppPCDUHandler.hPDU2Handler.cppTmp1075Handler.cpp
devicedefinitions
utility
test/testtasks
thirdparty/libcsp
CMakeLists.txt
bindings
python
libcsp
doc
example.rsthistory.rstinterfaces.rstlibcsp.rstmemory.rstmtu.rstprotocolstack.rststructure.rsttopology.rst
examples
csp_if_fifo.ccsp_if_fifo_windows.ckiss.cpython_bindings_example_client.pypython_bindings_example_client_can.pypython_bindings_example_server.pysimple.czmqproxy.c
include
CMakeLists.txt
libcsp.mkcsp
src
CMakeLists.txt
arch
CMakeLists.txt
freertos
macosx
posix
CMakeLists.txtcsp_malloc.ccsp_queue.ccsp_semaphore.ccsp_system.ccsp_thread.ccsp_time.cpthread_queue.c
windows
bindings
python
crypto
csp_bridge.ccsp_buffer.ccsp_conn.ccsp_conn.hcsp_crc32.ccsp_debug.ccsp_dedup.ccsp_dedup.hcsp_endian.ccsp_hex_dump.ccsp_iflist.ccsp_io.ccsp_io.hcsp_port.ccsp_port.hcsp_promisc.ccsp_promisc.hcsp_qfifo.ccsp_qfifo.hcsp_route.ccsp_route.hcsp_service_handler.ccsp_services.ccsp_sfp.cdrivers
interfaces
rtable
transport
utils
30
thirdparty/libcsp/examples/python_bindings_example_client_can.py
vendored
Normal file
30
thirdparty/libcsp/examples/python_bindings_example_client_can.py
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# libcsp must be build with at least these options to run this example client:
|
||||
# ./waf distclean configure build --enable-bindings --enable-crc32 --enable-rdp --enable-if-zmq --with-driver-usart=linux --enable-if-kiss --enable-xtea --enable-if-can --enable-can-socketcan --enable-hmac --enable-examples
|
||||
|
||||
# Can be run from root of libcsp like this:
|
||||
# LD_LIBRARY_PATH=build PYTHONPATH=bindings/python:build python examples/python_bindings_example_client.py
|
||||
#
|
||||
|
||||
import os
|
||||
import time
|
||||
import libcsp as csp
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
csp.buffer_init(10, 300)
|
||||
csp.init(28)
|
||||
csp.can_socketcan_init("can0")
|
||||
csp.rtable_set(4, 5, "CAN")
|
||||
csp.route_start_task()
|
||||
|
||||
## allow router task startup
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
node = 4
|
||||
if csp.ping(node) < 0:
|
||||
print ("Unable to ping node %d"%(node))
|
||||
|
Reference in New Issue
Block a user