#include <string.h>#include "monitor_log.h"#include "monitor_mem.h"#include "monitor_timer.h"#include "monitor_ticktime.h"#include "monitor_list.h"#include "monitor_report.h"Data Structures | |
| struct | monitor_report_t |
| struct | monitor_sample_send_ctx_t |
Macros | |
| #define | MONITOR_REPORT_CHANNEL_HEAD_OFFSET ((MONITOR_PROFILE_MIN_SIZE - 2) + (sizeof(monitor_payload_t) - 4) + (sizeof(data_payload_t) - 4)) |
| #define | MONITOR_REPORT_PACKET_HEAD_OFFSET(count) ((MONITOR_PROFILE_MIN_SIZE - 2) + (sizeof(monitor_payload_t) - 4) + ((sizeof(data_payload_t) - 4) * count)) |
| #define | MONITOR_NOTIFY_JITTER_PERIOD_MAX (4) |
| #define | MONTTOR_NOTIFY_REPORT_INTERVAL_MAX (100000) /*100ms*/ |
| #define | MONITOR_REPORT_CTX (&MONITOR_PRIVATE_VAR_NAME(monitor_report)) |
| #define | CHANNEL_REPORT_STEP (0.1) |
| #define | CHANNLE_REPORT_MAX (0.5) |
| #define | CHANNEL_REPORT_DATACOUNT_MIN_LIMIT (1000) |
Enumerations | |
| enum | { TYPE_NOTIFY = 1 , TYPE_STREAM , TYPE_BUFFER , TYPE_TRIGGER , TYPE_MAX } |
| enum | { REPORT_DATA_FLAG_MULTI_DATA = 0 , REPORT_DATA_FLAG_COMBINE_DATA } |
Functions | |
| static bool | evaluate_float_condition (float current, float prev, float target, TRIGGER_MODE mode) |
| static bool | evaluate_double_condition (double current, double prev, double target, TRIGGER_MODE mode) |
| static bool | monitor_trigger_normal_process (uint32_t addr_or_ch, void *input, uint32_t byte_len) |
| static void | monitor_sample_cb (int ret, uint8_t index) |
| uint32_t | monitor_noitfy_get_data_once_size (data_payload_t *data, uint32_t pkt_count) |
| static int | monitor_channel_add (data_payload_t *data) |
| static int | monitor_notify_add (data_payload_t *data) |
| static int | monitor_sample_add (data_payload_t *data) |
| void | monitor_trigger_clear (void) |
| void | monitor_report_clear (void) |
| int | monitor_notify_set (uint8_t *input, uint32_t length) |
| int | monitor_stream_set (uint8_t *input, uint32_t length) |
| int | monitor_buffer_set (uint8_t *input, uint32_t length) |
| static int | monitor_report_channel_config (void) |
| static int | monitor_report_notify_config (void) |
| static int | monitor_report_sample_config (uint32_t data_count, uint8_t mem_count, uint8_t is_loop) |
| static int | monitor_report_config (uint8_t type) |
| int | monitor_notify_start (void) |
| int | monitor_notify_stop (void) |
| int | monitor_stream_start (void) |
| int | monitor_stream_stop (void) |
| int | monitor_buffer_start (void) |
| int | monitor_buffer_stop (void) |
| int | monitor_trigger_start (void) |
| int | monitor_trigger_stop (void) |
| static int | monitor_report_packet_process (uint16_t cmd, ListDataNode *Node, uint8_t **output) |
| static int | monitor_nofity_report (uint32_t start_addr, uint32_t tick, uint8_t **output) |
| int | monitor_notify_ch_handle (uint8_t **output) |
| int | monitor_notify_handle (uint8_t **output) |
| void | monitor_report_send_reset (void) |
| static bool | monitor_sample_send_pending (monitor_sample_send_ctx_t *send_ctx) |
| static uint32_t | monitor_sample_send_node_addr (monitor_sample_send_ctx_t *send_ctx) |
| bool | monitor_buffer_send_pending (void) |
| uint32_t | monitor_buffer_send_node_addr (void) |
| bool | monitor_stream_send_pending (void) |
| uint32_t | monitor_stream_send_node_addr (void) |
| static int | monitor_sample_output_step (uint16_t cmd, monitor_sample_send_ctx_t *send_ctx, uint8_t **output) |
| int | monitor_stream_handle (uint8_t **output) |
| int | monitor_buffer_handle (uint8_t **output) |
| void | monitor_report_done (uint32_t free_addr) |
| int | monitor_trigger_handle (void) |
| int | monitor_channel_add_data (uint8_t ch, void *data) |
| int | monitor_channel_report_array (uint8_t ch, void *array, uint32_t count) |
| bool | monitor_report_addr_is_released (uint32_t addr) |
| bool | monitor_report_ch_is_released (uint8_t ch) |
| void | monitor_report_init (void) |
Variables | |
| static monitor_sample_send_ctx_t | s_buffer_send = {0} |
| static monitor_sample_send_ctx_t | s_stream_send = {0} |
| #define CHANNEL_REPORT_DATACOUNT_MIN_LIMIT (1000) |
| #define CHANNEL_REPORT_STEP (0.1) |
| #define CHANNLE_REPORT_MAX (0.5) |
| #define MONITOR_NOTIFY_JITTER_PERIOD_MAX (4) |
| #define MONITOR_REPORT_CHANNEL_HEAD_OFFSET ((MONITOR_PROFILE_MIN_SIZE - 2) + (sizeof(monitor_payload_t) - 4) + (sizeof(data_payload_t) - 4)) |
| #define MONITOR_REPORT_CTX (&MONITOR_PRIVATE_VAR_NAME(monitor_report)) |
| #define MONITOR_REPORT_PACKET_HEAD_OFFSET | ( | count | ) | ((MONITOR_PROFILE_MIN_SIZE - 2) + (sizeof(monitor_payload_t) - 4) + ((sizeof(data_payload_t) - 4) * count)) |
| #define MONTTOR_NOTIFY_REPORT_INTERVAL_MAX (100000) /*100ms*/ |
|
static |
|
static |
| int monitor_buffer_handle | ( | uint8_t ** | output | ) |
| uint32_t monitor_buffer_send_node_addr | ( | void | ) |
| bool monitor_buffer_send_pending | ( | void | ) |
| int monitor_buffer_set | ( | uint8_t * | input, |
| uint32_t | length | ||
| ) |
| int monitor_buffer_start | ( | void | ) |
| int monitor_buffer_stop | ( | void | ) |
|
static |
| int monitor_channel_add_data | ( | uint8_t | ch, |
| void * | data | ||
| ) |
| int monitor_channel_report_array | ( | uint8_t | ch, |
| void * | array, | ||
| uint32_t | count | ||
| ) |
|
static |
| uint32_t monitor_noitfy_get_data_once_size | ( | data_payload_t * | data, |
| uint32_t | pkt_count | ||
| ) |
|
static |
| int monitor_notify_ch_handle | ( | uint8_t ** | output | ) |
| int monitor_notify_handle | ( | uint8_t ** | output | ) |
| int monitor_notify_set | ( | uint8_t * | input, |
| uint32_t | length | ||
| ) |
| int monitor_notify_start | ( | void | ) |
| int monitor_notify_stop | ( | void | ) |
| bool monitor_report_addr_is_released | ( | uint32_t | addr | ) |
| bool monitor_report_ch_is_released | ( | uint8_t | ch | ) |
|
static |
| void monitor_report_clear | ( | void | ) |
|
static |
| void monitor_report_done | ( | uint32_t | free_addr | ) |
| void monitor_report_init | ( | void | ) |
|
static |
|
static |
|
static |
| void monitor_report_send_reset | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
| int monitor_stream_handle | ( | uint8_t ** | output | ) |
| uint32_t monitor_stream_send_node_addr | ( | void | ) |
| bool monitor_stream_send_pending | ( | void | ) |
| int monitor_stream_set | ( | uint8_t * | input, |
| uint32_t | length | ||
| ) |
| int monitor_stream_start | ( | void | ) |
| int monitor_stream_stop | ( | void | ) |
| void monitor_trigger_clear | ( | void | ) |
| int monitor_trigger_handle | ( | void | ) |
|
static |
| int monitor_trigger_start | ( | void | ) |
| int monitor_trigger_stop | ( | void | ) |
|
static |
|
static |