PX4 Firmware
PX4 Autopilot Software http://px4.io
uavcannode_main.cpp File Reference
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/tasks.h>
#include <px4_platform_common/workqueue.h>
#include <cstdlib>
#include <cstring>
#include <fcntl.h>
#include <systemlib/err.h>
#include <parameters/param.h>
#include <lib/mixer/MixerGroup.hpp>
#include <version/version.h>
#include <nuttx/board.h>
#include <arch/chip/chip.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_pwm_output.h>
#include "uavcannode_main.hpp"
#include "indication_controller.hpp"
#include "sim_controller.hpp"
#include "resources.hpp"
#include "led.hpp"
#include "boot_app_shared.h"
Include dependency graph for uavcannode_main.cpp:

Go to the source code of this file.

Classes

class  RestartRequestHandler
 

Macros

#define RESOURCE_DEBUG
 
#define resources(s)
 

Functions

static void cb_reboot (const uavcan::TimerEvent &)
 
static void signal_callback (void *arg)
 
static void print_usage ()
 
__EXPORT int uavcannode_start (int argc, char *argv[])
 
__EXPORT int uavcannode_main (int argc, char *argv[])
 

Variables

boot_app_shared_section app_descriptor_t AppDescriptor
 
RestartRequestHandler restart_request_handler
 

Macro Definition Documentation

◆ RESOURCE_DEBUG

#define RESOURCE_DEBUG

Definition at line 78 of file uavcannode_main.cpp.

◆ resources

#define resources (   s)
Value:
::syslog(LOG_INFO," %s\n",(s)); \
syslog(LOG_INFO,"UAVCAN getPeakNumUsedBlocks() in bytes %d\n", \
UAVCAN_MEM_POOL_BLOCK_SIZE * UavcanNode::instance()->get_node().getAllocator().getPeakNumUsedBlocks()); \
} \
free_check(); \
stack_check();
static UavcanNode * instance()

Definition at line 80 of file uavcannode_main.cpp.

Referenced by UavcanNode::run(), and uavcannode_start().

Function Documentation

◆ cb_reboot()

static void cb_reboot ( const uavcan::TimerEvent &  )
static

Definition at line 259 of file uavcannode_main.cpp.

Referenced by UavcanNode::cb_beginfirmware_update().

Here is the caller graph for this function:

◆ print_usage()

static void print_usage ( void  )
static

Definition at line 499 of file uavcannode_main.cpp.

References uavcannode_start(), and warnx.

Referenced by uavcannode_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signal_callback()

static void signal_callback ( void *  arg)
static

Definition at line 343 of file uavcannode_main.cpp.

References UavcanNode::busevent_signal_trampoline().

Referenced by UavcanNode::run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uavcannode_main()

int uavcannode_main ( int  argc,
char *  argv[] 
)

Definition at line 555 of file uavcannode_main.cpp.

References errx, UavcanNode::instance(), UavcanNode::print_info(), print_usage(), and uavcannode_start().

Referenced by uavcannode_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uavcannode_start()

__EXPORT int uavcannode_start ( int  argc,
char *  argv[] 
)

Definition at line 507 of file uavcannode_main.cpp.

References BootLoader, bootloader_app_shared_invalidate(), bootloader_app_shared_read(), bootloader_app_shared_t::bus_speed, bootloader_app_shared_t::node_id, param_find(), param_get(), resources, UavcanNode::start(), uavcannode_main(), and warnx.

Referenced by print_usage(), and uavcannode_main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ AppDescriptor

Initial value:
= {
.signature = {APP_DESCRIPTOR_SIGNATURE},
.image_crc = 0,
.image_size = 0,
.vcs_commit = 0,
.major_version = APP_VERSION_MAJOR,
.minor_version = APP_VERSION_MINOR,
.reserved = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
}
#define APP_DESCRIPTOR_SIGNATURE

Definition at line 99 of file uavcannode_main.cpp.

◆ restart_request_handler