#pragma once


#include "myBase.h"
#include "myIcp67.h"

uint8_t self_ptl_get_type_len(uint8_t type);

void param_pop_out(stru_icp67 *p_icp67, uint16_t addr, uint8_t type, uint8_t len, uint8_t *p_data);
void iec_point_tbl_pop_out(stru_icp67 *p_icp67, uint16_t info_addr, uint16_t num, uint8_t *p_data);
void self_check_pop_out(stru_icp67 *p_icp67, stru_data_info *p_data, uint16_t addr);
void dir_pop_out(stru_icp67 *p_icp67, uint8_t *p_name, uint8_t len, uint32_t attr, uint32_t size, uint8_t follow);
void file_read_act_confirm(stru_icp67 *p_icp67, uint8_t *p_name, uint8_t len, uint32_t id, uint32_t size, uint16_t crc);
void file_read(stru_icp67 *p_icp67, uint32_t id, uint32_t offset, uint32_t follow, uint8_t *p_data, uint16_t len);
void file_write_act_confirm(stru_icp67 *p_icp67, uint8_t result, uint8_t *p_name, uint8_t len, uint32_t id, uint32_t size);
void file_write_confirm(stru_icp67 *p_icp67, uint8_t result, uint32_t id, uint32_t offset);
void file_write_end(stru_icp67 *p_icp67, uint8_t result, uint32_t id, uint32_t offset, uint8_t *md5);
void zip_dir_pop_out(stru_icp67 *p_icp67, uint8_t zip_type, uint8_t *zip_name, uint8_t len, uint8_t file_num, stru_zip_file_info *p_file_info);
void zip_file_pop_out(stru_icp67 *p_icp67, uint8_t id, uint32_t offset, uint8_t *p_data, uint16_t len);
void mx_trans(stru_icp67 *p_icp67, uint16_t info_addr, float p_data);
void st_trans(stru_icp67 *p_icp67, uint16_t info_addr, uint8_t p_data);
void dd_trans(stru_icp67 *p_icp67, uint16_t info_addr, float p_data);
void soe_trans(stru_icp67 *p_icp67, stru_st_info *p_data);
void fault_trans(stru_icp67 *p_icp67, uint16_t num, stru_fault_info *p_data);
void mx_change(stru_icp67 *p_icp67, stru_mx_info *p_data);

stru_genneral_method *self_ptl_method_ptr_get();
stru_icp67 *self_ptl_icp67_ptr_get();

void self_ptl_method_task();