|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "uavcan/uavcan.h"#include "uavcan/uavcan_allocator.h"#include "uavcan.protocol.dynamic_node_id.Allocation.h"#include "uavcan.protocol.GetNodeInfo.h"
Include dependency graph for uavcan_allocator.c:Go to the source code of this file.
Macros | |
| #define | UAVCAN_MAX_NODES 50 |
| Dynamic node ID allocation. | |
| #define | INVALID_STAGE -1 |
Functions | |
| static int | detectRequestStage (struct uavcan_protocol_dynamic_node_id_Allocation *msg) |
| static int | getExpectedStage (void) |
| static int | findFreeNodeID (const uint8_t preferred) |
| static bool | unique_id_identical (int index) |
| static void | handleAllocationRequest (struct uavcan_iface_t *iface, uint8_t preferred_node_id) |
| static void | id_alloc_uavcan_cb (struct uavcan_iface_t *iface, CanardRxTransfer *transfer) |
| struct uavcan_node_mapping_t * | uavcan_get_node_id_mapping (const uint8_t id) |
| static struct uavcan_node_mapping_t * | get_free_id_mapping (void) |
| static void | node_info_resp_cb (struct uavcan_iface_t *iface, CanardRxTransfer *transfer) |
| void | request_node_info (struct uavcan_iface_t *iface, uint8_t destination_node_id) |
| void | uavcan_allocator_init (void) |
Variables | |
| static uavcan_event | id_alloc_ev |
| static uavcan_event | node_info_ev |
| static struct uavcan_node_mapping_t | uavcan_node_ids [UAVCAN_MAX_NODES] = {0} |
| struct uavcan_unique_id_t | current_unique_id = {0} |
| uint32_t | last_message_timestamp = 0 |
| #define INVALID_STAGE -1 |
Definition at line 20 of file uavcan_allocator.c.
| #define UAVCAN_MAX_NODES 50 |
Dynamic node ID allocation.
See https://dronecan.github.io/Specification/6._Application_level_functions/#dynamic-node-id-allocation
Definition at line 17 of file uavcan_allocator.c.
|
static |
Definition at line 79 of file uavcan_allocator.c.
References foo, INVALID_STAGE, and msg.
Referenced by id_alloc_uavcan_cb().
Here is the caller graph for this function:Definition at line 56 of file uavcan_allocator.c.
References foo, and uavcan_get_node_id_mapping().
Referenced by handleAllocationRequest().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 51 of file uavcan_allocator.c.
References uavcan_get_node_id_mapping().
Referenced by node_info_resp_cb().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 92 of file uavcan_allocator.c.
References current_unique_id, foo, INVALID_STAGE, and uavcan_unique_id_t::len.
Referenced by id_alloc_uavcan_cb().
Here is the caller graph for this function:
|
static |
Definition at line 110 of file uavcan_allocator.c.
References uavcan_node_mapping_t::allocated_id, current_unique_id, uavcan_unique_id_t::data, findFreeNodeID(), foo, uavcan_unique_id_t::len, uavcan_broadcast(), UAVCAN_MAX_NODES, uavcan_node_ids, uavcan_node_mapping_t::unique_id, and unique_id_identical().
Referenced by id_alloc_uavcan_cb().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 163 of file uavcan_allocator.c.
References current_unique_id, uavcan_unique_id_t::data, detectRequestStage(), foo, getExpectedStage(), handleAllocationRequest(), INVALID_STAGE, last_message_timestamp, uavcan_unique_id_t::len, msg, uavcan_iface_t::node_id, transfer(), and uavcan_broadcast().
Referenced by uavcan_allocator_init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 222 of file uavcan_allocator.c.
References foo, get_free_id_mapping(), msg, transfer(), and uavcan_get_node_id_mapping().
Referenced by uavcan_allocator_init().
Here is the call graph for this function:
Here is the caller graph for this function:| void request_node_info | ( | struct uavcan_iface_t * | iface, |
| uint8_t | destination_node_id | ||
| ) |
Definition at line 244 of file uavcan_allocator.c.
References foo, transfer(), and uavcan_request().
Referenced by node_status_cb().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 256 of file uavcan_allocator.c.
References foo, id_alloc_ev, id_alloc_uavcan_cb(), node_info_ev, node_info_resp_cb(), and uavcan_bind().
Referenced by uavcan_init().
Here is the call graph for this function:
Here is the caller graph for this function:| struct uavcan_node_mapping_t * uavcan_get_node_id_mapping | ( | const uint8_t | id | ) |
Definition at line 42 of file uavcan_allocator.c.
References uavcan_node_mapping_t::allocated_id, foo, UAVCAN_MAX_NODES, and uavcan_node_ids.
Referenced by findFreeNodeID(), get_free_id_mapping(), node_info_resp_cb(), and node_status_cb().
Here is the caller graph for this function:Definition at line 105 of file uavcan_allocator.c.
References current_unique_id, uavcan_unique_id_t::data, foo, uavcan_unique_id_t::len, uavcan_node_ids, and uavcan_node_mapping_t::unique_id.
Referenced by handleAllocationRequest().
Here is the caller graph for this function:| struct uavcan_unique_id_t current_unique_id = {0} |
Definition at line 38 of file uavcan_allocator.c.
Referenced by getExpectedStage(), handleAllocationRequest(), id_alloc_uavcan_cb(), and unique_id_identical().
|
static |
Definition at line 30 of file uavcan_allocator.c.
Referenced by uavcan_allocator_init().
| uint32_t last_message_timestamp = 0 |
Definition at line 39 of file uavcan_allocator.c.
Referenced by id_alloc_uavcan_cb().
|
static |
Definition at line 31 of file uavcan_allocator.c.
Referenced by uavcan_allocator_init().
|
static |
Definition at line 35 of file uavcan_allocator.c.
Referenced by handleAllocationRequest(), uavcan_get_node_id_mapping(), and unique_id_identical().