gateway/Software/inc/communication_protocol.h

288 lines
12 KiB
C
Raw Normal View History

2024-07-13 02:22:47 +00:00
/*
* communication_protocol.h
*
* Created on: 2024<EFBFBD><EFBFBD>5<EFBFBD><EFBFBD>18<EFBFBD><EFBFBD>
* Author: 34509
*/
#ifndef SOFTWARE_PROTOCOL_COMMUNICATION_PROTOCOL_H_
#define SOFTWARE_PROTOCOL_COMMUNICATION_PROTOCOL_H_
2024-07-13 03:43:10 +00:00
#include "inc/UART.h"
2024-07-17 01:40:41 +00:00
#include "uart_dev.h"
2024-07-13 02:22:47 +00:00
2024-07-13 05:59:56 +00:00
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
typedef enum
{
SL_Function_Code_Read_Register = 0x30, /* <20><><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Function_Code_Write_Register = 0x10, /* д<>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Function_Code_Broadcast_Scan = 0xA0, /* <20>㲥ɨ<E3B2A5><C9A8> */
SL_Function_Code_Registration_request = 0xA1, /* ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Function_Code_Update_Profile = 0xD0, /* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD> */
SL_Function_Code_Remote_Upgrade = 0xD1, /* Զ<><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
2024-07-13 05:59:56 +00:00
}SL_MsgFunctionCode;
2024-07-13 02:22:47 +00:00
2024-07-15 09:22:55 +00:00
/* <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ */
typedef enum
{
SL_Register_Registration_Status = 0x0000, /* ע<><D7A2>״̬ */
SL_Register_address = 0x0001, /* <20><>ַ */
SL_Register_Access_Node_Type = 0x0002, /* <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> */
SL_Register_Communication_Methods = 0x0003, /* ͨ<>ŷ<EFBFBD>ʽ */
SL_Register_Battery_Voltage = 0x0100, /* <20><><EFBFBD>ص<EFBFBD>ѹ */
SL_Register_Battery_temperature = 0x0101, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Register_Remaining_Battery_Bower = 0x0102, /* <20><><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Register_Solar_Open_Circuit_Voltage1 = 0x0103, /* ̫<><CCAB><EFBFBD>ܿ<EFBFBD>·<EFBFBD><C2B7>ѹ1 */
SL_Register_Solar_Open_Circuit_Voltage2 = 0x0104, /* ̫<><CCAB><EFBFBD>ܿ<EFBFBD>·<EFBFBD><C2B7>ѹ2 */
SL_Register_Ambient_Temperature = 0x0200, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Register_Ambient_Humidity = 0x0201, /* <20><><EFBFBD><EFBFBD>ʪ<EFBFBD><CAAA> */
SL_Register_Barometric_Pressure = 0x0202, /* <20><><EFBFBD><EFBFBD>ѹ */
SL_Register_Wind_Speed = 0x0203, /* <20><><EFBFBD><EFBFBD> */
SL_Register_Wind_Direction = 0x0204, /* <20><><EFBFBD><EFBFBD> */
SL_Register_Rainfall = 0x0205, /* <20><><EFBFBD><EFBFBD> */
SL_Register_Optical_Radiation = 0x0206, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Register_Leakage_Current_Value = 0x0220, /* й©<D0B9><C2A9><EFBFBD><EFBFBD>ֵ */
SL_Register_Leakage_Current_MaxValue = 0x0221, /* <20><><EFBFBD><EFBFBD>й©<D0B9><C2A9><EFBFBD><EFBFBD>ֵ */
SL_Register_Pulse_Frequency = 0x0222, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Register_Zero_Leakage_Current_MaxValue_Statistics = 0x0223, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>й©<D0B9><C2A9><EFBFBD><EFBFBD>ֵͳ<D6B5><CDB3> */
SL_Register_Zero_Pulse_Frequency_Statistics = 0x0224, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3> */
SL_Register_Inclination_AngleX = 0x0230, /* X<><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Register_Inclination_AngleY = 0x0231, /* Y<><59><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
SL_Register_Zero_Inclination_Angle = 0x0232, /* У<><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
}SL_MsgRegister;
/* ע<><D7A2>״̬ */
typedef enum
{
UNREGISTER = 0, /* δע<CEB4><D7A2> */
REGISTER_FAIL = 1, /* ע<><D7A2>ʧ<EFBFBD><CAA7> */
REGISTER_SUCCESS = 2, /* ע<><D7A2><EFBFBD>ɹ<EFBFBD> */
}SL_REGISTERSTATUS;
/* <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> */
typedef enum
{
POWERBOX = 1, /* <20><>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD> */
MICROMETEOROLOGY = 2, /* ΢<><CEA2><EFBFBD><EFBFBD> */
}SL_ACCESSNODETYPE;
/* ͨ<>ŷ<EFBFBD>ʽ */
typedef enum
{
RS485 = 1,
RJ45 = 2,
}SL_COMMUNICATIONMETHODS;
/* ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD>ʽΪ1<CEAA>ֽ<EFBFBD> */
#pragma pack(push,1)
/* <20><>ʱ<EFBFBD><CAB1><EFBFBD>͵<EFBFBD>֡<EFBFBD><D6A1>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><3E><><EFBFBD><EFBFBD><EFBFBD>ڵ㣩 */
typedef struct _SL_Mppt_Rorecv_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t read_Register_Start_Address_H; /* <20><>ȡ<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ַ<EFBFBD><D6B7>8λ */
uint8_t read_Register_Start_Address_L; /* <20><>ȡ<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ַ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t read_Register_Number_H; /* <20><>ȡ<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߰<EFBFBD>λ */
uint8_t read_Register_Number_L; /* <20><>ȡ<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD>λ */
uint8_t check_Bit_H; /* У<><D0A3>λ<EFBFBD>߰<EFBFBD>λ */
uint8_t check_Bit_L; /* У<><D0A3>λ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
}SL_Mppt_Rorecv_pack;
#define SL_MPPT_RORECV_PACK_SIZE (sizeof(SL_Mppt_Rorecv_pack))
/* <20><>ʱ<EFBFBD><CAB1><EFBFBD>յ<EFBFBD><D5B5>Ļظ<C4BB>֡<EFBFBD><D6A1>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>-><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD> */
typedef struct _SL_Mppt_ROReply_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
2024-07-17 01:40:41 +00:00
uint8_t reply_Register_Number_H; /* <20>ظ<EFBFBD><D8B8>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȸ߰<C8B8>λ */
uint8_t reply_Register_Number_L; /* <20>ظ<EFBFBD><D8B8>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȵͰ<C8B5>λ */
2024-07-15 09:22:55 +00:00
uint8_t *content; /* <20>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t check_Bit_H; /* У<><D0A3>λ<EFBFBD>߰<EFBFBD>λ */
uint8_t check_Bit_L; /* У<><D0A3>λ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
}SL_Mppt_ROReply_pack;
#define SL_MPPT_ROReply_PACK_SIZE (sizeof(SL_Mppt_ROReply_pack))
/* ɨ<><C9A8><EFBFBD>㲥֡F1<46><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><3E><><EFBFBD><EFBFBD><EFBFBD>ڵ㣩 */
typedef struct _SL_Mppt_ScanBroadcast_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t check_Bit_H; /* У<><D0A3>λ<EFBFBD>߰<EFBFBD>λ */
uint8_t check_Bit_L; /* У<><D0A3>λ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
}SL_Mppt_Scan_Broadcast_pack;
#define SL_MPPT_SCAN_BROADCAST_PACK_SIZE (sizeof(SL_Mppt_Scan_Broadcast_pack))
/* ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡F2<46><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>-><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD> */
typedef struct _SL_Mppt_RegistrationRequest_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t register_Length_H; /* <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȸ߰<C8B8>λ */
uint8_t register_Length_L; /* <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȵͰ<C8B5>λ */
uint8_t registration_Status_H; /* ע<><D7A2>״̬<D7B4>߰<EFBFBD>λ */
uint8_t registration_Status_L; /* ע<><D7A2>״̬<D7B4>Ͱ<EFBFBD>λ */
uint8_t access_Node_ID[7]; /* <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>ID */
uint8_t access_Node_Type_H; /* <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>͸߰<CDB8>λ */
uint8_t access_Node_Type_L; /* <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>͵Ͱ<CDB5>λ */
uint8_t check_Bit_H; /* У<><D0A3>λ<EFBFBD>߰<EFBFBD>λ */
uint8_t check_Bit_L; /* У<><D0A3>λ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
}SL_Mppt_RegistrationRequest_pack;
#define SL_MPPT_REGISTRATIONREQUEST_PACK_SIZE (sizeof(SL_Mppt_RegistrationRequest_pack))
2024-07-13 02:22:47 +00:00
2024-07-15 09:22:55 +00:00
/* ע<><D7A2><EFBFBD>ظ<EFBFBD>֡F3<46><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><3E><><EFBFBD><EFBFBD><EFBFBD>ڵ㣩 */
typedef struct _SL_Mppt_RegistrationReply_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t register_Length_H; /* <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȸ߰<C8B8>λ */
uint8_t register_Length_L; /* <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȵͰ<C8B5>λ */
uint8_t registration_Status_H; /* ע<><D7A2>״̬<D7B4>߰<EFBFBD>λ */
uint8_t registration_Status_L; /* ע<><D7A2>״̬<D7B4>Ͱ<EFBFBD>λ */
uint8_t check_Bit_H; /* У<><D0A3>λ<EFBFBD>߰<EFBFBD>λ */
uint8_t check_Bit_L; /* У<><D0A3>λ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
}SL_Mppt_RegistrationReply_pack;
#define SL_MPPT_REGISTRATIONREPLY_PACK_SIZE (sizeof(SL_Mppt_RegistrationReply_pack))
2024-07-13 02:22:47 +00:00
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><3E><><EFBFBD><EFBFBD><EFBFBD>ڵ㣩 */
typedef struct _SL_Mppt_SOther_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t check_Bit_H; /* У<><D0A3>λ<EFBFBD>߰<EFBFBD>λ */
uint8_t check_Bit_L; /* У<><D0A3>λ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
}SL_Mppt_SOther_pack;
#define SL_MPPT_SOTHER_PACK_SIZE (sizeof(SL_Mppt_SOther_pack))
/* <20>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡<EFBFBD><D6A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>-><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD> */
typedef struct _SL_Mppt_ROther_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t State; /* ׼<><D7BC>״̬ */
uint8_t check_Bit_H; /* У<><D0A3>λ<EFBFBD>߰<EFBFBD>λ */
uint8_t check_Bit_L; /* У<><D0A3>λ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
}SL_Mppt_ROther_pack;
#define SL_MPPT_ROTHER_PACK_SIZE (sizeof(SL_Mppt_ROther_pack))
2024-07-15 09:22:55 +00:00
/* */
#define RECV_LENGTH 20
typedef struct _SL_Mppt_Recv_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t recv_Data[RECV_LENGTH]; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
}SL_Mppt_Recv_pack;
2024-07-13 02:22:47 +00:00
/* <20><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><E4B4AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>İ<EFBFBD>ͷ */
typedef struct _SL_HEAD_pack{
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t uart; /* <20><><EFBFBD>ںţ<DABA>1<EFBFBD><31>Ӧuart1 */
uint8_t Channel; /* ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʱʹ<CAB1><CAB9> */
2024-10-28 08:15:59 +00:00
uint8_t lengH; /* ֡<><D6A1><EFBFBD>ȸ߰<C8B8>λ */
uint8_t lengL; /* ֡<><D6A1><EFBFBD>ȵͰ<C8B5>λ */
}SL_Head_pack;
2024-10-28 08:15:59 +00:00
#define HEAD_PACK_LEN sizeof(SL_Head_pack)
/* <20><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><E4B4AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>İ<EFBFBD>β */
typedef struct _SL_TAIL_pack{
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
}SL_Tail_pack;
/* <20><>ʱ<EFBFBD><CAB1><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>֡<EFBFBD><D6A1>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>->Э<><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
typedef struct _SL_Mppt_Rorecv_pack1{
SL_Head_pack head; /* <20><>ͷ */
SL_Mppt_Rorecv_pack rpack;
SL_Tail_pack tail; /* <20><>β */
}SL_Mppt_Rorecv_pack1;
#define SL_MPPT_RORECV_PACK_SIZE1 (sizeof(SL_Mppt_Rorecv_pack1))
/* дʱ<D0B4><CAB1><EFBFBD>յ<EFBFBD><D5B5>Ļظ<C4BB>֡<EFBFBD><D6A1>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>->Э<><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
typedef struct _SL_Mppt_WOReply_pack1{
SL_Head_pack head; /* <20><>ͷ */
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
uint8_t address[7]; /* <20><>ַ */
uint8_t function_Code; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
uint8_t write_Register_Start_Address_H; /* д<><D0B4><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ַ<EFBFBD>߰<EFBFBD>λ */
uint8_t write_Register_Start_Address_L; /* д<><D0B4><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>ַ<EFBFBD>Ͱ<EFBFBD>λ */
uint8_t write_Register_Number_H; /* д<><D0B4><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߰<EFBFBD>λ */
uint8_t write_Register_Number_L; /* д<><D0B4><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD>λ */
}SL_Mppt_WOReply_pack1;
/* ɨ<><C9A8><EFBFBD>㲥֡F1<46><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>->Э<><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
typedef struct _SL_Mppt_ScanBroadcast_pack1{
SL_Head_pack head; /* <20><>ͷ */
SL_Mppt_Scan_Broadcast_pack bpack;
SL_Tail_pack tail; /* <20><>β */
}SL_Mppt_Scan_Broadcast_pack1;
#define SL_MPPT_SCAN_BROADCAST_PACK_SIZE1 (sizeof(SL_Mppt_Scan_Broadcast_pack1))
/* ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡F2<46><32>Э<EFBFBD><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><3E><><EFBFBD><EFBFBD>ģ<EFBFBD>飩 */
typedef struct _SL_Mppt_RegistrationRequest_pack1{
SL_Head_pack head; /* <20><>ͷ */
SL_Mppt_RegistrationRequest_pack rpack;
SL_Tail_pack tail; /* <20><>β */
}SL_Mppt_RegistrationRequest_pack1;
#define SL_MPPT_REGISTRATIONREQUEST_PACK_SIZE1 (sizeof(SL_Mppt_RegistrationRequest_pack1))
/* ע<><D7A2><EFBFBD>ظ<EFBFBD>֡F3<46><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>->Э<><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
typedef struct _SL_Mppt_RegistrationReply_pack1{
SL_Head_pack head; /* <20><>ͷ */
SL_Mppt_RegistrationReply_pack rpack;
SL_Tail_pack tail; /* <20><>β */
}SL_Mppt_RegistrationReply_pack1;
#define SL_MPPT_REGISTRATIONREPLY_PACK_SIZE1 (sizeof(SL_Mppt_RegistrationReply_pack1))
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡<EFBFBD><D6A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>->Э<><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
typedef struct _SL_Mppt_SOther_pack1{
SL_Head_pack head; /* <20><>ͷ */
SL_Mppt_SOther_pack spack;
SL_Tail_pack tail; /* <20><>β */
}SL_Mppt_SOther_pack1;
#define SL_MPPT_SOTHER_PACK_SIZE1 (sizeof(SL_Mppt_SOther_pack1))
/* <20>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡<EFBFBD><D6A1>Э<EFBFBD><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-><3E><><EFBFBD><EFBFBD>ģ<EFBFBD>飩 */
typedef struct _SL_Mppt_ROther_pack1{
SL_Head_pack head; /* <20><>ͷ */
SL_Mppt_ROther_pack rpack;
SL_Tail_pack tail; /* <20><>β */
}SL_Mppt_ROther_pack1;
#define SL_MPPT_ROTHER_PACK_SIZE1 (sizeof(SL_Mppt_ROther_pack1))
/* */
typedef struct _SL_Mppt_Recv_pack1{
SL_Head_pack head; /* <20><>ͷ */
SL_Mppt_Recv_pack rpack;
}SL_Mppt_Recv_pack1;
//const uint8_t head_len = sizeof(SL_Head_pack);
2024-07-17 01:40:41 +00:00
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB4A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
typedef void (*MsgProcFunc)(device_handle device, void*, uint32_t MsgLen);
typedef struct _SL_FunctionMsgProcTable{
u_int32_t msgId;
MsgProcFunc pMsgProc;
}SL_FuncionMsgProcTable;
2024-07-15 09:22:55 +00:00
/* <20>ָ<EFBFBD>Ĭ<EFBFBD>ϵĶ<CFB5><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
#pragma pack(pop)
2024-07-13 02:22:47 +00:00
2024-07-15 09:22:55 +00:00
extern SL_Mppt_Scan_Broadcast_pack g_Scan_Broadcast_pack;
2024-07-13 02:22:47 +00:00
void read_and_process_sensorUart_data(device_handle device);
void read_and_process_intelligentModuleUart_data(device_handle device);
void send_uart_data(uint8_t *buff);
2024-07-13 02:22:47 +00:00
#endif /* SOFTWARE_PROTOCOL_COMMUNICATION_PROTOCOL_H_ */