PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include "ArmAuthorization.h"
#include <string.h>
#include <unistd.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/px4_config.h>
#include <lib/parameters/param.h>
#include <systemlib/mavlink_log.h>
#include <uORB/PublicationQueued.hpp>
#include <uORB/topics/vehicle_command.h>
#include <uORB/topics/vehicle_command_ack.h>
Go to the source code of this file.
Enumerations | |
enum | { ARM_AUTH_IDLE = 0, ARM_AUTH_WAITING_AUTH, ARM_AUTH_WAITING_AUTH_WITH_ACK, ARM_AUTH_MISSION_APPROVED } |
Functions | |
static uint8_t | _auth_method_arm_req_check () |
static uint8_t | _auth_method_two_arm_check () |
static void | arm_auth_request_msg_send () |
uint8_t | arm_auth_check () |
void | arm_auth_update (hrt_abstime now, bool param_update) |
void | arm_auth_init (orb_advert_t *mav_log_pub, uint8_t *sys_id) |
enum arm_auth_methods | arm_auth_method_get () |
Variables | |
static orb_advert_t * | mavlink_log_pub |
static int | command_ack_sub = -1 |
static param_t | param_arm_parameters |
static hrt_abstime | auth_timeout |
static enum { ... } | state = ARM_AUTH_IDLE |
union { | |
int32_t param_value | |
} | arm_parameters |
static uint8_t * | system_id |
static uint8_t(* | arm_check_method [ARM_AUTH_METHOD_LAST])() |
anonymous enum |
Enumerator | |
---|---|
ARM_AUTH_IDLE | |
ARM_AUTH_WAITING_AUTH | |
ARM_AUTH_WAITING_AUTH_WITH_ACK | |
ARM_AUTH_MISSION_APPROVED |
Definition at line 53 of file ArmAuthorization.cpp.
|
static |
Definition at line 93 of file ArmAuthorization.cpp.
References ARM_AUTH_IDLE, ARM_AUTH_MISSION_APPROVED, arm_auth_request_msg_send(), arm_auth_update(), ARM_AUTH_WAITING_AUTH, ARM_AUTH_WAITING_AUTH_WITH_ACK, arm_parameters, auth_timeout, hrt_absolute_time(), hrt_abstime, mavlink_log_critical, mavlink_log_pub, and state.
|
static |
Definition at line 141 of file ArmAuthorization.cpp.
References ARM_AUTH_IDLE, ARM_AUTH_MISSION_APPROVED, arm_auth_request_msg_send(), ARM_AUTH_WAITING_AUTH, ARM_AUTH_WAITING_AUTH_WITH_ACK, arm_parameters, auth_timeout, hrt_absolute_time(), hrt_abstime, mavlink_log_critical, mavlink_log_pub, and state.
uint8_t arm_auth_check | ( | ) |
Definition at line 171 of file ArmAuthorization.cpp.
References ARM_AUTH_METHOD_LAST, arm_check_method, and arm_parameters.
Referenced by PreFlightCheck::preArmCheck().
void arm_auth_init | ( | orb_advert_t * | mav_log_pub, |
uint8_t * | sys_id | ||
) |
Definition at line 276 of file ArmAuthorization.cpp.
References command_ack_sub, mavlink_log_pub, ORB_ID, orb_subscribe(), param_arm_parameters, and param_find().
Referenced by Commander::run().
enum arm_auth_methods arm_auth_method_get | ( | ) |
Definition at line 284 of file ArmAuthorization.cpp.
References arm_parameters.
|
static |
Definition at line 82 of file ArmAuthorization.cpp.
References arm_parameters, hrt_absolute_time(), ORB_ID, and vehicle_command_s::timestamp.
Referenced by _auth_method_arm_req_check(), and _auth_method_two_arm_check().
void arm_auth_update | ( | hrt_abstime | now, |
bool | param_update | ||
) |
Definition at line 180 of file ArmAuthorization.cpp.
References ARM_AUTH_IDLE, ARM_AUTH_MISSION_APPROVED, ARM_AUTH_WAITING_AUTH, ARM_AUTH_WAITING_AUTH_WITH_ACK, arm_parameters, auth_timeout, vehicle_command_ack_s::command, command_ack_sub, mavlink_log_critical, mavlink_log_pub, orb_check(), orb_copy(), ORB_ID, param_arm_parameters, param_get(), vehicle_command_ack_s::result, vehicle_command_ack_s::result_param1, vehicle_command_ack_s::result_param2, state, and vehicle_command_ack_s::target_system.
Referenced by _auth_method_arm_req_check(), and Commander::run().
|
static |
Definition at line 77 of file ArmAuthorization.cpp.
Referenced by arm_auth_check().
union { ... } arm_parameters |
uint16_t auth_method_arm_timeout_msec |
Definition at line 64 of file ArmAuthorization.cpp.
union { ... } auth_method_param |
uint16_t auth_method_two_arm_timeout_msec |
Definition at line 65 of file ArmAuthorization.cpp.
|
static |
Definition at line 51 of file ArmAuthorization.cpp.
Referenced by _auth_method_arm_req_check(), _auth_method_two_arm_check(), and arm_auth_update().
uint8_t authentication_method |
Definition at line 67 of file ArmAuthorization.cpp.
uint8_t authorizer_system_id |
Definition at line 62 of file ArmAuthorization.cpp.
|
static |
Definition at line 47 of file ArmAuthorization.cpp.
Referenced by arm_auth_init(), and arm_auth_update().
|
static |
Definition at line 46 of file ArmAuthorization.cpp.
Referenced by _auth_method_arm_req_check(), _auth_method_two_arm_check(), arm_auth_init(), arm_auth_update(), do_accel_calibration_measurements(), do_gyro_calibration(), and mag_calibrate_all().
|
static |
Definition at line 49 of file ArmAuthorization.cpp.
Referenced by arm_auth_init(), and arm_auth_update().
int32_t param_value |
Definition at line 69 of file ArmAuthorization.cpp.
Referenced by MavlinkParametersManager::handle_message(), px4muorb_param_update_to_shmem(), px4muorb_param_update_value_from_shmem(), and MavlinkParametersManager::send_param().
enum { ... } state |
Referenced by _auth_method_arm_req_check(), _auth_method_two_arm_check(), TECS::_update_height_setpoint(), arm_auth_update(), dump_validator_state(), frsky_parse_host(), PrecLand::get_mode(), hardfault_check_status(), hardfault_commit(), param_import_callback(), param_import_internal(), tap_esc_common::parse_tap_esc_feedback(), ppm_input(), MPU6000::reset(), control::BlockLowPass::setState(), control::BlockLowPassVector< float, n_x >::setState(), SF0XTest::sf0xTest(), test_init(), test_stale_detector(), __EXPORT::SPI::transfer(), __EXPORT::SPI::transferhword(), uavcan_kinetis::CanIface::waitMCRChange(), uavcan_stm32::CanIface::waitMsrINakBitStateChange(), and landing_target_estimator::KalmanFilter::~KalmanFilter().
|
static |
Definition at line 72 of file ArmAuthorization.cpp.