{
{MMI_FZD_ACTION_NONE, "NONE"}, //MMI_FZD_ACTION_NONE
- #ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
{MMI_FZD_ACTION_LINK, "LK"},
- #endif
{MMI_FZD_ACTION_HEARTBEAT, "KA"},
{MMI_FZD_ACTION_BIND, "PING"}, //
{MMI_FZD_ACTION_GET_TIME, "LGZONE"}, //
switch(action)
{
- #ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
case MMI_FZD_ACTION_LINK:
mmi_protocol_fzd_parse_LINK(next_buff, next_buff_len);
break;
- #endif
case MMI_FZD_ACTION_HEARTBEAT:
mmi_protocol_fzd_parse_HEARTBEAT(next_buff, next_buff_len);
}
-#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
bool mmi_protocol_fzd_action_LINK(void)
{
return mmi_protocol_fzd_send_without_data(MMI_FZD_ACTION_LINK);
bool mmi_protocol_fzd_parse_LINK(unsigned char * next_buff, unsigned int next_buff_len)
{
- mmi_protocol_watch_heartbeat_action();
+ if(true != mmi_protocol_watch_bind_state_get())
+ {
+ mmi_protocol_fzd_action_bind();
+ }
+ //mmi_protocol_watch_heartbeat_action();
return true;
}
-#endif
bool mmi_protocol_fzd_action_HEARTBEAT(void)
{
bool mmi_protocol_fzd_parse_HEARTBEAT(unsigned char * next_buff, unsigned int next_buff_len)
{
- if(true != mmi_protocol_watch_bind_state_get())
- {
- mmi_protocol_fzd_action_bind();
- }
+ //if(true != mmi_protocol_watch_bind_state_get())
+ //{
+ // mmi_protocol_fzd_action_bind();
+ //}
if(0 == s_fzd_time_data_flag)
{
mmi_protocol_fzd_action_get_time();
{
mmi_protocol_watch_bind_state_set(true);
+ //heartbeat
+ mmi_protocol_watch_heartbeat_action();
+
// timing
mmi_protocol_watch_timed_mission_action();
{
MMI_FZD_ACTION_NONE, //0 nothing
-#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
MMI_FZD_ACTION_LINK,
-#endif
MMI_FZD_ACTION_HEARTBEAT, // tcp heartbeat
MMI_FZD_ACTION_BIND, //
MMI_FZD_ACTION_GET_TIME,
bool mmi_protocol_fzd_send_cmd_check(MMI_PROTOCOL_FZD_ACTION_ENUM action);
-#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
bool mmi_protocol_fzd_action_LINK(void);
-
bool mmi_protocol_fzd_parse_LINK(unsigned char * next_buff, unsigned int next_buff_len);
-#endif
bool mmi_protocol_fzd_action_HEARTBEAT(void);
-
bool mmi_protocol_fzd_parse_HEARTBEAT(unsigned char * next_buff, unsigned int next_buff_len);
bool mmi_protocol_fzd_action_bind(void);
-
bool mmi_protocol_fzd_parse_ACTION_BIND(unsigned char * next_buff, unsigned int next_buff_len);
bool mmi_protocol_fzd_action_get_time(void);
-
bool mmi_protocol_fzd_parse_ACTION_GET_TIME(unsigned char * next_buff, unsigned int next_buff_len);
bool mmi_protocol_fzd_parse_SERVER_GET_CUR_LOCATION(unsigned char * next_buff, unsigned int next_buff_len);