PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <fcntl.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/tasks.h>
#include <poll.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <systemlib/err.h>
#include <perf/perf_counter.h>
#include "../comms.h"
#include "../messages.h"
Go to the source code of this file.
Macros | |
#define | DEFAULT_UART "/dev/ttyS6"; |
Serial4. More... | |
Functions | |
__EXPORT int | hott_telemetry_main (int argc, char *argv[]) |
Deamon management function. More... | |
int | hott_telemetry_thread_main (int argc, char *argv[]) |
Mainloop of daemon. More... | |
static int | recv_req_id (int uart, uint8_t *id) |
static int | send_data (int uart, uint8_t *buffer, size_t size) |
Variables | |
static int | thread_should_exit = false |
Deamon exit flag. More... | |
static int | thread_running = false |
Deamon status flag. More... | |
static int | deamon_task |
Handle of deamon task / thread. More... | |
static const char | daemon_name [] = "hott_telemetry" |
static const char | commandline_usage [] |
static uint8_t | read_log [16] |
static int | timeout_ms = POLL_TIMEOUT_IN_MSECS |
static int | read_delay_us = POST_READ_DELAY_IN_USECS |
static int | write_delay_us = POST_WRITE_DELAY_IN_USECS |
perf_counter_t | reqs_count |
perf_counter_t | connect_count |
perf_counter_t | recon_port |
perf_counter_t | bin_reply |
perf_counter_t | txt_reply |
perf_counter_t | bad_reply |
perf_counter_t | dead_reply |
#define DEFAULT_UART "/dev/ttyS6"; |
Serial4.
Definition at line 62 of file hott_telemetry.cpp.
Referenced by hott_telemetry_thread_main().
int hott_telemetry_main | ( | int | argc, |
char * | argv[] | ||
) |
Deamon management function.
Process command line arguments and start the daemon.
Definition at line 287 of file hott_telemetry.cpp.
References commandline_usage, daemon_name, deamon_task, errx, hott_telemetry_thread_main(), perf_print_counter(), read_delay_us, read_log, thread_running, thread_should_exit, timeout_ms, warnx, and write_delay_us.
int hott_telemetry_thread_main | ( | int | argc, |
char * | argv[] | ||
) |
Mainloop of daemon.
Definition at line 167 of file hott_telemetry.cpp.
References BINARY_MODE_REQUEST_ID, build_eam_response(), build_gam_response(), build_gps_response(), commandline_usage, DEFAULT_UART, EAM_SENSOR_ID, errx, GAM_SENSOR_ID, GPS_SENSOR_ID, init_sub_messages(), MAX_MESSAGE_BUFFER_SIZE, open_uart(), PC_COUNT, perf_alloc, perf_count(), perf_free(), perf_reset(), recv_req_id(), send_data(), thread_running, thread_should_exit, and warnx.
Referenced by hott_telemetry_main().
|
static |
Definition at line 99 of file hott_telemetry.cpp.
References BINARY_MODE_REQUEST_ID, perf_count(), read(), read_log, timeout_ms, and warnx.
Referenced by hott_telemetry_thread_main().
|
static |
Definition at line 137 of file hott_telemetry.cpp.
References read(), read_delay_us, write(), and write_delay_us.
Referenced by i2cdetect::detect(), and hott_telemetry_thread_main().
perf_counter_t bad_reply |
Definition at line 82 of file hott_telemetry.cpp.
perf_counter_t bin_reply |
Definition at line 80 of file hott_telemetry.cpp.
|
static |
Definition at line 68 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main(), and hott_telemetry_thread_main().
perf_counter_t connect_count |
Definition at line 78 of file hott_telemetry.cpp.
|
static |
Definition at line 67 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main().
perf_counter_t dead_reply |
Definition at line 83 of file hott_telemetry.cpp.
|
static |
Handle of deamon task / thread.
Definition at line 66 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main().
|
static |
Definition at line 74 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main(), and send_data().
|
static |
Definition at line 71 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main(), and recv_req_id().
perf_counter_t recon_port |
Definition at line 79 of file hott_telemetry.cpp.
perf_counter_t reqs_count |
Definition at line 77 of file hott_telemetry.cpp.
|
static |
Deamon status flag.
Definition at line 65 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main(), and hott_telemetry_thread_main().
|
static |
Deamon exit flag.
Definition at line 64 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main(), and hott_telemetry_thread_main().
|
static |
Definition at line 73 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main(), motor_test(), motor_test_main(), px4::logger::LogWriterMavlink::publish_message(), recv_data(), recv_req_id(), vmount::InputBase::~InputBase(), and vmount::InputTest::~InputTest().
perf_counter_t txt_reply |
Definition at line 81 of file hott_telemetry.cpp.
|
static |
Definition at line 75 of file hott_telemetry.cpp.
Referenced by hott_telemetry_main(), and send_data().