Firmware
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
UavcanNode Class Reference

A UAVCAN node. More...

#include <uavcan_main.hpp>

Inheritance diagram for UavcanNode:
cdev::CDev cdev::CDev

Public Types

enum  eServerAction {
  None, Start, Stop, CheckFW,
  Busy
}
 
typedef UAVCAN_DRIVER::CanInitHelper< RxQueueLenPerIface > CanInitHelper
 
typedef uavcan::Node< MemPoolSize > Node
 
typedef uavcan_stm32::CanInitHelper< RxQueueLenPerIface > CanInitHelper
 
typedef uavcan::protocol::file::BeginFirmwareUpdate BeginFirmwareUpdate
 

Public Member Functions

 UavcanNode (uavcan::ICanDriver &can_driver, uavcan::ISystemClock &system_clock)
 
virtual int ioctl (file *filp, int cmd, unsigned long arg)
 
uavcan::Node & get_node ()
 
void subscribe ()
 
int teardown ()
 
int arm_actuators (bool arm)
 
void print_info ()
 
void shrink ()
 
void hardpoint_controller_set (uint8_t hardpoint_id, uint16_t command)
 
int fw_server (eServerAction action)
 
void attachITxQueueInjector (ITxQueueInjector *injector)
 
int list_params (int remote_node_id)
 
int save_params (int remote_node_id)
 
int set_param (int remote_node_id, const char *name, char *value)
 
int get_param (int remote_node_id, const char *name)
 
int reset_node (int remote_node_id)
 
 UavcanNode (uavcan::ICanDriver &can_driver, uavcan::ISystemClock &system_clock)
 
virtual int ioctl (file *filp, int cmd, unsigned long arg)
 
Node & get_node ()
 
int teardown ()
 
void print_info ()
 
- Public Member Functions inherited from cdev::CDev
 CDev (const char *devname)
 Constructor. More...
 
virtual int init ()
 
virtual int open (file_t *filep)
 Handle an open of the device. More...
 
virtual int close (file_t *filep)
 Handle a close of the device. More...
 
virtual ssize_t read (file_t *filep, char *buffer, size_t buflen)
 Perform a read from the device. More...
 
virtual ssize_t write (file_t *filep, const char *buffer, size_t buflen)
 Perform a write to the device. More...
 
virtual off_t seek (file_t *filep, off_t offset, int whence)
 Perform a logical seek operation on the device. More...
 
virtual int ioctl (file_t *filep, int cmd, unsigned long arg)
 Perform an ioctl operation on the device. More...
 
virtual int poll (file_t *filep, px4_pollfd_struct_t *fds, bool setup)
 Perform a poll setup/teardown operation. More...
 
const char * get_devname () const
 Get the device name. More...
 

Static Public Member Functions

static int start (uavcan::NodeID node_id, uint32_t bitrate)
 
static int control_callback (uintptr_t handle, uint8_t control_group, uint8_t control_index, float &input)
 
static UavcanNodeinstance ()
 
static int getHardwareVersion (uavcan::protocol::HardwareVersion &hwver)
 
static int start (uavcan::NodeID node_id, uint32_t bitrate)
 
static UavcanNodeinstance ()
 

Public Attributes

int32_t active_bitrate
 
uavcan::TimerEventForwarder< void(*)(const uavcan::TimerEvent &)> _reset_timer
 

Additional Inherited Members

- Protected Member Functions inherited from cdev::CDev
virtual pollevent_t poll_state (file_t *filep)
 Check the current state of the device for poll events from the perspective of the file. More...
 
virtual void poll_notify (pollevent_t events)
 Report new poll events. More...
 
virtual void poll_notify_one (px4_pollfd_struct_t *fds, pollevent_t events)
 Internal implementation of poll_notify. More...
 
virtual int open_first (file_t *filep)
 Notification of the first open. More...
 
virtual int close_last (file_t *filep)
 Notification of the last close. More...
 
virtual int register_class_devname (const char *class_devname)
 Register a class device name, automatically adding device class instance suffix if need be. More...
 
virtual int unregister_class_devname (const char *class_devname, unsigned class_instance)
 Register a class device name, automatically adding device class instance suffix if need be. More...
 
void lock ()
 Take the driver lock. More...
 
void unlock ()
 Release the driver lock.
 
- Protected Attributes inherited from cdev::CDev
px4_sem_t _lock
 lock to protect access to all class members (also for derived classes)
 
- Static Protected Attributes inherited from cdev::CDev
static const px4_file_operations_t fops = {}
 Pointer to the default cdev file operations table; useful for registering clone devices etc.
 

Detailed Description

A UAVCAN node.


The documentation for this class was generated from the following files: