MeterLogger
|
#include <stdint.h>
#include <string.h>
#include <esp8266.h>
#include "utils.h"
#include "led.h"
#include "tinyprintf.h"
#include "en61107.h"
Go to the source code of this file.
Functions | |
ICACHE_FLASH_ATTR bool | parse_en61107_frame (en61107_response_t *response, char *frame, unsigned int frame_length) |
ICACHE_FLASH_ATTR bool | parse_mc66cde_standard_data_1_frame (en61107_response_t *response, char *frame, unsigned int frame_length) |
ICACHE_FLASH_ATTR bool | parse_mc66cde_standard_data_2_frame (en61107_response_t *response, char *frame, unsigned int frame_length) |
ICACHE_FLASH_ATTR bool | parse_mc66cde_inst_values_frame (en61107_response_t *response, char *frame, unsigned int frame_length) |
ICACHE_FLASH_ATTR void | en61107_response_set_value (en61107_response_t *response, char *rid, char *value, unsigned int value_length) |
ICACHE_FLASH_ATTR void | en61107_response_set_unit (en61107_response_t *response, char *rid, char *unit, unsigned int unit_length) |
ICACHE_FLASH_ATTR void en61107_response_set_unit | ( | en61107_response_t * | response, |
char * | rid, | ||
char * | unit, | ||
unsigned int | unit_length | ||
) |
Definition at line 320 of file en61107.c.
References en61107_response_t::e1, EN61107_RID_L, EN61107_UNIT_L, en61107_response_t::hr, memcpy, memset, strncmp, tfp_snprintf(), en61107_response_register_t::unit, and en61107_response_t::v1.
Referenced by parse_en61107_frame().
ICACHE_FLASH_ATTR void en61107_response_set_value | ( | en61107_response_t * | response, |
char * | rid, | ||
char * | value, | ||
unsigned int | value_length | ||
) |
Definition at line 292 of file en61107.c.
References en61107_response_t::e1, EN61107_RID_L, EN61107_VALUE_L, en61107_response_t::hr, ICACHE_FLASH_ATTR, memcpy, memset, strncmp, tfp_snprintf(), en61107_response_t::v1, and en61107_response_register_t::value.
Referenced by parse_en61107_frame().
ICACHE_FLASH_ATTR bool parse_en61107_frame | ( | en61107_response_t * | response, |
char * | frame, | ||
unsigned int | frame_length | ||
) |
Definition at line 11 of file en61107.c.
References cleanup_decimal_str(), en61107_response_t::customer_no, EN61107_CUSTOMER_NO_L, EN61107_FRAME_L, EN61107_METER_TYPE_L, EN61107_REGISTER_L, en61107_response_set_unit(), en61107_response_set_value(), EN61107_RID_L, EN61107_VALUE_L, frame, frame_length, ICACHE_FLASH_ATTR, memcpy, memset, en61107_response_t::meter_type, NULL, strlen, strncmp, and strstr.
Referenced by en61107_received_task().
ICACHE_FLASH_ATTR bool parse_mc66cde_inst_values_frame | ( | en61107_response_t * | response, |
char * | frame, | ||
unsigned int | frame_length | ||
) |
Definition at line 269 of file en61107.c.
References divide_str_by_100(), EN61107_UNIT_L, EN61107_VALUE_L, ICACHE_FLASH_ATTR, NULL, en61107_response_t::t3, tfp_snprintf(), en61107_response_register_t::unit, and en61107_response_register_t::value.
Referenced by en61107_received_task().
ICACHE_FLASH_ATTR bool parse_mc66cde_standard_data_1_frame | ( | en61107_response_t * | response, |
char * | frame, | ||
unsigned int | frame_length | ||
) |
Definition at line 172 of file en61107.c.
References cleanup_decimal_str(), divide_str_by_10(), divide_str_by_100(), en61107_response_t::effect1, EN61107_UNIT_L, EN61107_VALUE_L, en61107_response_t::flow1, ICACHE_FLASH_ATTR, NULL, strlen, en61107_response_t::t1, en61107_response_t::t2, en61107_response_t::tdif, tfp_snprintf(), en61107_response_register_t::unit, and en61107_response_register_t::value.
Referenced by en61107_received_task().
ICACHE_FLASH_ATTR bool parse_mc66cde_standard_data_2_frame | ( | en61107_response_t * | response, |
char * | frame, | ||
unsigned int | frame_length | ||
) |
Definition at line 214 of file en61107.c.
References en61107_meter_program_t::a, en61107_meter_program_t::b, en61107_meter_program_t::ccc, en61107_meter_program_t::dd, en61107_meter_program_t::e, en61107_meter_program_t::ff, en61107_meter_program_t::gg, ICACHE_FLASH_ATTR, memcpy, memset, en61107_response_t::meter_program, and NULL.
Referenced by en61107_received_task().