|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "uavcan.h"#include "mcu_periph/can.h"#include "modules/core/threads.h"#include "uavcan.protocol.NodeStatus.h"#include "uavcan_reporting.h"#include "mcu_periph/sys_time.h"#include "modules/uavcan/uavcan_allocator.h"
Include dependency graph for uavcan.c:Go to the source code of this file.
Macros | |
| #define | UAVCAN_NODE_ID 100 |
| #define | UAVCAN_BAUDRATE 1000000 |
Variables | |
| static uavcan_event * | uavcan_event_hd = NULL |
|
static |
Definition at line 81 of file uavcan.c.
References CAN_EID_MASK, CAN_FRAME_EFF, CAN_SID_MASK, uavcan_iface_t::canard, and foo.
Referenced by uavcanInitIface().
Here is the caller graph for this function:
|
static |
Definition at line 252 of file uavcan.c.
References foo, kv_get(), kv_set(), uavcan_iface_t::node_id, transfer(), and uavcan_iface_t::transfer_ids_store.
Referenced by uavcan_request(), and uavcan_transfer().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Whenever a valid and 'accepted' transfer is received.
Definition at line 141 of file uavcan.c.
References abi_struct::cb, ev, foo, abi_struct::next, transfer(), and uavcan_event_hd.
Referenced by uavcanInitIface().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
If we should accept this transfer.
Definition at line 155 of file uavcan.c.
References ev, foo, abi_struct::next, and uavcan_event_hd.
Referenced by uavcanInitIface().
Here is the caller graph for this function:| void uavcan_bind | ( | uint16_t | data_type_id, |
| uint64_t | data_type_signature, | ||
| uavcan_event * | ev, | ||
| uavcan_callback | cb | ||
| ) |
Bind to a receiving message from uavcan.
Definition at line 240 of file uavcan.c.
References abi_struct::cb, ev, abi_struct::next, and uavcan_event_hd.
Referenced by actuators_uavcan_init(), airspeed_uavcan_init(), can_fuelcell_init(), gps_uavcan_init(), mag_uavcan_init(), power_uavcan_init(), range_sensor_uavcan_init(), rc_uavcan_init(), tunnel_uavcan_init_periph(), uavcan_allocator_init(), and uavcan_init_reporting().
Here is the caller graph for this function:| void uavcan_broadcast | ( | struct uavcan_iface_t * | iface, |
| uint64_t | data_type_signature, | ||
| uint16_t | data_type_id, | ||
| uint8_t | priority, | ||
| const void * | payload, | ||
| uint16_t | payload_len | ||
| ) |
Legacy function Broadcast an uavcan message to a specific interface.
Definition at line 313 of file uavcan.c.
References foo, transfer(), and uavcan_transfer().
Referenced by actuators_uavcan_cmd_commit(), actuators_uavcan_commit(), handleAllocationRequest(), id_alloc_uavcan_cb(), tunnel_uavcan_send_message(), and uavcan_reporting().
Here is the call graph for this function:
Here is the caller graph for this function:Initialize all uavcan interfaces.
uavcan interfaces
Definition at line 225 of file uavcan.c.
References foo, uavcan_allocator_init(), uavcan_init_reporting(), and uavcanInitIface().
Here is the call graph for this function:| void uavcan_request | ( | struct uavcan_iface_t * | iface, |
| uint8_t | destination_node_id, | ||
| CanardTxTransfer * | transfer | ||
| ) |
| transfer | should be initialized with canardInitTxTransfer. |
Definition at line 289 of file uavcan.c.
References uavcan_iface_t::bsem, uavcan_iface_t::canard, foo, get_transfer_id(), uavcan_iface_t::initialized, uavcan_iface_t::nb_errors, pprz_bsem_signal(), pprz_mtx_lock(), pprz_mtx_unlock(), transfer(), and uavcan_iface_t::tx_mutex.
Referenced by request_node_info().
Here is the call graph for this function:
Here is the caller graph for this function:| void uavcan_response | ( | struct uavcan_iface_t * | iface, |
| uint8_t | destination_node_id, | ||
| CanardTxTransfer * | transfer | ||
| ) |
| inout_transfer_id | should be set to the request transfer id before calling this function |
Definition at line 332 of file uavcan.c.
References uavcan_iface_t::bsem, uavcan_iface_t::canard, foo, uavcan_iface_t::initialized, pprz_bsem_signal(), pprz_mtx_lock(), pprz_mtx_unlock(), transfer(), and uavcan_iface_t::tx_mutex.
Referenced by node_info_cb().
Here is the call graph for this function:
Here is the caller graph for this function:| void uavcan_transfer | ( | struct uavcan_iface_t * | iface, |
| CanardTxTransfer * | transfer | ||
| ) |
| transfer | should be initialized with canardInitTxTransfer. |
Definition at line 268 of file uavcan.c.
References uavcan_iface_t::bsem, uavcan_iface_t::canard, foo, get_transfer_id(), uavcan_iface_t::initialized, uavcan_iface_t::nb_errors, pprz_bsem_signal(), pprz_mtx_lock(), pprz_mtx_unlock(), transfer(), and uavcan_iface_t::tx_mutex.
Referenced by uavcan_broadcast().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 100 of file uavcan.c.
References uavcan_iface_t::bsem, CAN_FRAME_EFF, pprzcan_frame::can_id, uavcan_iface_t::can_net, can_transmit_frame(), uavcan_iface_t::canard, pprzcan_frame::data, foo, pprzcan_frame::len, p, pprz_bsem_wait(), pprz_mtx_lock(), pprz_mtx_unlock(), sys_time_msleep(), and uavcan_iface_t::tx_mutex.
Referenced by uavcanInitIface().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Initialize uavcan interface.
Definition at line 192 of file uavcan.c.
References uavcan_iface_t::bsem, can_frame_cb(), uavcan_iface_t::can_net, can_register_callback(), uavcan_iface_t::canard, uavcan_iface_t::canard_memory_pool, foo, uavcan_iface_t::initialized, kv_init(), uavcan_iface_t::node_id, onTransferReceived(), pprz_bsem_init(), pprz_mtx_init(), PPRZ_NORMAL_PRIO, pprz_thread_create(), shouldAcceptTransfer(), uavcan_iface_t::thread_tx, uavcan_iface_t::transfer_ids_keys, uavcan_iface_t::transfer_ids_store, uavcan_iface_t::transfer_ids_used, uavcan_iface_t::transfer_ids_values, uavcan_iface_t::tx_mutex, UAVCAN_TID_STORE_CAPACITY, and uavcan_tx().
Referenced by uavcan_init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 43 of file uavcan.c.
Referenced by onTransferReceived(), shouldAcceptTransfer(), and uavcan_bind().