BC260Y_UDP_Client5.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. #include "CONFIG.h"
  2. #if BC260Y
  3. /**
  4. ******************************************************************************
  5. * 版 本 :V1.0.0
  6. * 作 者 :liuyanbin,helomgxiang
  7. * 版权所有,盗版必究。
  8. * Copyright(C) All rights reserved
  9. ******************************************************************************
  10. * 历史记录
  11. * 序号 版本 变更内容 作者 日期
  12. * 1 V0.0.1 实现数据发送功能 何龙翔 2023/12/10
  13. * 2 V0.0.2 实现NB数据发送功能 刘艳斌 2024/1/10
  14. * 3 V0.0.3 整合4g和nb 刘艳斌 2024/1/24
  15. *
  16. ******************************************************************************
  17. */
  18. #include "stm32f10x.h"
  19. #include <stdio.h>
  20. #include <stdarg.h>
  21. #include <string.h>
  22. #include <stdlib.h>
  23. #include "UDP_Client.h"
  24. #include "Timer_Module.h"
  25. #include "Log_Module.h"
  26. #include "mbedtls_util.h"
  27. #include "cJSON.h"
  28. #include "bc260y.h"
  29. #include "Pump_Dicts_Util.h"
  30. #include "Regist.h"
  31. #include "PumpBusiness.h"
  32. #include "aliyuniot.h"
  33. #include "Initialize.h"
  34. // 流程
  35. enum Step{
  36. STEP_NONE, // 空闲状态,无操作
  37. STEP_START, // 开始
  38. STEP_EXIT_SLEEP, // 退出睡眠
  39. STEP_ENTER_SLEEP, // 进入睡眠
  40. STEP_WAIT, // 等待
  41. STEP_STATE, // 查询状态
  42. STEP_OPEN, // 打开
  43. STEP_OPEN_WAIT_RESULT, // 等待打开结果
  44. STEP_JUDGE_AUTH_OR_DATA, // 判断认证还是发送
  45. STEP_JOIN_AUTH_MESSAGE, // 拼接认证报文
  46. STEP_JOIN_DATA_MESSAGE, // 拼接数据报文
  47. STEP_QUERY_SLEEP, // 查询休眠
  48. STEP_SET_SLEEP, // 开启休眠
  49. STEP_QUERY_QENG_SERVINGCELL, // 查询信号质量
  50. STEP_SET_QISDE_0, // 关闭发送回显
  51. STEP_SET_QISDE_1,
  52. STEP_SEND, // 发送
  53. STEP_RECV, // 等待发送结果
  54. STEP_QUERY_CFUN,
  55. STEP_SET_CFUN_0, // 设置最小功能模式
  56. STEP_WAIT_SET_CFUN_0, // 等待设置最小功能模式
  57. STEP_SET_CFUN_1, // 设置全功能模式
  58. STEP_WAIT_SET_CFUN_1, // 等待设置全功能模式结果
  59. STEP_SET_CGREG_2, // 设置ps域允许上报网络注册和位置信息
  60. STEP_QUERY_CGREG, // 查询网络注册状态
  61. STEP_DATAFORMAT,//配置发送格式
  62. STEP_CLOSE, // 关闭
  63. STEP_SUCCESS, // 成功
  64. STEP_FAILURE, // 失败
  65. STEP_FINISH, // 流程结束
  66. STEP_VERIFY_REGIST,//验证注册
  67. STEP_VERIFY_INITIALIZE, // 验证初始化
  68. STEP_QUERY_SOCKET, // 查询连接
  69. STEP_QUERY_DNS, // 查询DNS
  70. STEP_SET_DNS, // 设置DNS
  71. STEP_QUERY_CFUN_DNS, // 设置完dns后,查询功能模式
  72. STEP_SET_CFUN_0_DNS, // 设置完dns后,设置最小功能模式
  73. };
  74. // 当前
  75. static enum Step step = STEP_NONE;
  76. // 下一步
  77. static enum Step next_step = STEP_NONE;
  78. // 客户端5
  79. struct UDP_Client_Struct client = {
  80. .status = Client_Status_None,
  81. };
  82. // socket ID
  83. static uint8_t connectID = 1;
  84. // coap报文
  85. static uint8_t coap_message[512];
  86. static uint16_t coap_message_length = 0;
  87. // 泵参数
  88. extern struct Pump_Params pump_params;
  89. // 待发送数据的地址和长度
  90. static uint8_t databuff[128];
  91. static uint16_t data_length;
  92. static uint8_t test_flag=0;
  93. // 计时相关的变量
  94. static struct TIMER_Struct timer;
  95. uint32_t wait_time = 10;
  96. // 信号值
  97. static struct Signal
  98. {
  99. int RSRP;
  100. int RSRQ;
  101. int RSSI;
  102. int SINR;
  103. } signal = {
  104. .RSRP = 99,
  105. .RSRQ = 99,
  106. .RSSI = 99,
  107. .SINR = 99,
  108. };
  109. void Query_Signal(int * RSRP, int * RSRQ, int * RSSI, int * SINR)
  110. {
  111. *RSRP = signal.RSRP;
  112. *RSRQ = signal.RSRQ;
  113. *RSSI = signal.RSSI;
  114. *SINR = signal.SINR;
  115. }
  116. // 初始化
  117. void UDP_Client_Init(void)
  118. {
  119. // aliyuniot_set_device_params("he1fAihB9M9", "123456", "76ef28342ee0760d781af138095b8fe4");
  120. aliyuniot_set_device_params(regist_get_aliyun_productKey(),regist_get_aliyun_deviceName(),regist_get_aliyun_deviceSecret());
  121. // aliyuniot_set_device_params(flashdata.productKey,flashdata.deviceName,flashdata.deviceSecret);
  122. // 设置host
  123. }
  124. // 声明函数。步骤跳转
  125. void goto_step(enum Step ns);
  126. // 发送流程
  127. void UDP_Client_Handle(void);
  128. // 发送数据
  129. void UDP_Client_Send(uint8_t test_switch)
  130. {
  131. test_flag=test_switch;
  132. if(step == STEP_NONE)
  133. {
  134. // 初始化
  135. UDP_Client_Init();
  136. // 正在发送
  137. client.status = Client_Status_Sending;
  138. // 流程开始
  139. goto_step(STEP_START);
  140. }
  141. }
  142. // 获取状态
  143. enum Client_Status UDP_Client_Status(void)
  144. {
  145. if(client.status == Client_Status_None)
  146. {
  147. return client.status;
  148. }
  149. else if(step == STEP_FINISH)
  150. {
  151. return client.status;
  152. }
  153. else
  154. {
  155. return Client_Status_Sending;
  156. }
  157. }
  158. // 获取备注
  159. char * UDP_Client_Get_Info(void)
  160. {
  161. return client.info;
  162. }
  163. // 清除
  164. void UDP_Client_Clear(void)
  165. {
  166. // 流程置空
  167. goto_step(STEP_NONE);
  168. // 空闲
  169. client.status = Client_Status_None;
  170. }
  171. // 直接跳转到下一步
  172. static void goto_step(enum Step ns)
  173. {
  174. // 重置bc260y状态
  175. bc260y.reset();
  176. step = ns;
  177. }
  178. // 先等待再跳转到下一步
  179. static void goto_step_wait(enum Step ns, uint32_t t)
  180. {
  181. goto_step(STEP_WAIT); // 等待
  182. wait_time = t;
  183. next_step = ns; // 等待之后跳转
  184. }
  185. // 只等待,等待之后返回原来的步骤
  186. static void goto_wait(uint32_t t)
  187. {
  188. goto_step_wait(step, t);
  189. }
  190. // 失败
  191. static void goto_failure(char * info)
  192. {
  193. Log_Printf_Debug("STEP: 数据发送失败,%s\r\n", info);
  194. client.status = Client_Status_Failure;
  195. strcpy(client.info, info);
  196. goto_step(STEP_FAILURE);
  197. }
  198. // 成功
  199. static void goto_success(char * info)
  200. {
  201. Log_Printf_Debug("STEP: 数据发送成功,%s\r\n", info);
  202. client.status = Client_Status_Success;
  203. strcpy(client.info, info);
  204. goto_step(STEP_SUCCESS);
  205. }
  206. // 等待
  207. static void wait(void)
  208. {
  209. if(time_get_delay(&timer) > wait_time)
  210. {
  211. goto_step(next_step); // 进入下一步
  212. time_clear(&timer);
  213. }
  214. }
  215. //// 发送数据的逻辑
  216. static enum Result result = Result_None;
  217. static uint8_t cgreg_n;
  218. static uint8_t cgreg_stat;
  219. static uint16_t cgreg_lac;
  220. static uint32_t cgreg_ci;
  221. //static uint8_t query_cgreg_times = 0; // 查询网络状态的次数
  222. static uint8_t auth_times = 0; // 认证次数
  223. static uint16_t socket_err = 0;
  224. static uint8_t auth_or_data = 0;
  225. static enum Initialize_Result InitializeResult;
  226. // dns
  227. static char pridnsaddr[20];
  228. static uint8_t resend_counter = 0;//nb失败重发标志
  229. static uint8_t cfun_mode = 0;
  230. static uint8_t connectstate = 0;
  231. // 开启回显的标志
  232. static uint8_t qisde_flag = 0; // 0:未开启;1:开启。
  233. void UDP_Client_Handle(void)
  234. {
  235. // 如果模块正在初始化,直接返回发送失败
  236. InitializeResult = get_initialize_status();
  237. if(InitializeResult==Initialize_Result_Busy)
  238. {
  239. goto_failure("模块正在初始化");
  240. goto_step(STEP_FINISH);
  241. }
  242. // 流程
  243. switch(step)
  244. {
  245. case STEP_NONE: // 空闲
  246. break;
  247. case STEP_START: // 开始
  248. Log_Printf_Debug("\r\n>>发送流程开始\r\n");
  249. auth_times = 0; // 认证次数
  250. goto_step(STEP_EXIT_SLEEP);
  251. Log_Printf_Debug("\r\n>>退出休眠\r\n");
  252. break;
  253. case STEP_EXIT_SLEEP: // 退出休眠
  254. result = bc260y.exit_sleep_2();
  255. if(result == Result_Success)
  256. {
  257. goto_step(STEP_SET_QISDE_1);
  258. Log_Printf_Debug("\r\n>>开启回显\r\n");
  259. }
  260. else if(result == Result_Failed)
  261. {
  262. goto_failure("退出休眠失败");
  263. }
  264. break;
  265. case STEP_SET_QISDE_1: // 开启回显
  266. result = bc260y.set_qisde(1);
  267. if(result == Result_Success)
  268. {
  269. goto_step(STEP_SET_SLEEP);
  270. Log_Printf_Debug("\r\n>>设置休眠模式\r\n");
  271. }
  272. else if(result == Result_Failed)
  273. {
  274. goto_failure("开启回显失败");
  275. }
  276. break;
  277. case STEP_SET_SLEEP: // 设置休眠模式
  278. result = bc260y.set_sleep(2);
  279. if(result == Result_Success)
  280. {
  281. goto_step(STEP_DATAFORMAT);
  282. Log_Printf_Debug("\r\n>>配置发送格式\r\n");
  283. }
  284. else if(result == Result_Failed)
  285. {
  286. goto_failure("设置休眠模式失败");
  287. }
  288. break;
  289. case STEP_DATAFORMAT: // 配置发送格式
  290. result = bc260y.dataformat(1);
  291. if(result == Result_Success)
  292. {
  293. goto_step(STEP_QUERY_CFUN);
  294. Log_Printf_Debug("\r\n>>查询功能模式\r\n");
  295. memset(pridnsaddr, 0, sizeof(pridnsaddr));
  296. }
  297. else if(result == Result_Failed)
  298. {
  299. goto_failure("配置发送格式失败");
  300. }
  301. break;
  302. case STEP_QUERY_CFUN: // 查询功能模式
  303. result = bc260y.query_cfun(&cfun_mode);
  304. if(result == Result_Success)
  305. {
  306. if(cfun_mode == 0)
  307. {
  308. goto_step(STEP_SET_CFUN_1);
  309. Log_Printf_Debug("\r\n>>设置全功能模式\r\n");
  310. }
  311. else
  312. {
  313. goto_step(STEP_QUERY_DNS);
  314. Log_Printf_Debug("\r\n>>查询DNS\r\n");
  315. }
  316. }
  317. else if(result == Result_Failed)
  318. {
  319. goto_failure("查询功能模式失败");
  320. }
  321. break;
  322. case STEP_SET_CFUN_1: // 设置全功能模式
  323. result = bc260y.set_cfun(1);
  324. if(result == Result_Success)
  325. {
  326. resend_counter++;
  327. goto_step(STEP_QUERY_DNS);
  328. Log_Printf_Debug("\r\n>>查询DNS\r\n");
  329. }
  330. else if(result == Result_Failed)
  331. {
  332. resend_counter++;
  333. goto_failure("设置全功能模式失败");
  334. }
  335. break;
  336. case STEP_QUERY_DNS: // 查询DNS
  337. result = bc260y.query_dns(pridnsaddr);
  338. if(result == Result_Success)
  339. {
  340. if(strlen(pridnsaddr) <= 1)
  341. {
  342. goto_step(STEP_SET_DNS);
  343. Log_Printf_Debug("\r\n>>设置DNS\r\n");
  344. }
  345. else
  346. {
  347. goto_step(STEP_SET_CGREG_2);
  348. Log_Printf_Debug("\r\n>>设置ps域\r\n");
  349. }
  350. }
  351. else if(result == Result_Failed)
  352. {
  353. goto_failure("查询DNS失败");
  354. }
  355. break;
  356. case STEP_SET_DNS:
  357. result = bc260y.set_dns("114.114.114.114", "8.8.8.8"); // 设置DNS
  358. if(result == Result_Success)
  359. {
  360. goto_step(STEP_SET_CFUN_0_DNS);
  361. Log_Printf_Debug("\r\n>>设置完dns,设置最小功能模式\r\n");
  362. }
  363. else if(result == Result_Failed)
  364. {
  365. goto_failure("查询功能模式失败");
  366. }
  367. break;
  368. case STEP_SET_CFUN_0_DNS: // 设置完dns,设置最小功能模式
  369. result = bc260y.set_cfun(0);
  370. if(result == Result_Success)
  371. {
  372. goto_step(STEP_SET_CFUN_1);
  373. Log_Printf_Debug("\r\n>>设置全功能模式\r\n");
  374. }
  375. else if(result == Result_Failed)
  376. {
  377. goto_failure("设置完dns,设置最小模式失败");
  378. }
  379. break;
  380. case STEP_SET_CGREG_2: // 设置ps域
  381. result = bc260y.set_cereg(2);
  382. if(result == Result_Success)
  383. {
  384. // goto_step_wait(STEP_QUERY_CGREG, 400);
  385. goto_step(STEP_QUERY_CGREG);
  386. Log_Printf_Debug("\r\n>>查询ps域\r\n");
  387. }
  388. else if(result == Result_Failed)
  389. {
  390. goto_failure("设置ps域失败");
  391. }
  392. break;
  393. case STEP_QUERY_CGREG: // 查询ps域
  394. result = bc260y.query_cereg(&cgreg_n, &cgreg_stat, &cgreg_lac, &cgreg_ci);
  395. if(result == Result_Success)
  396. {
  397. if(cgreg_stat == 1)
  398. {
  399. // 参数赋值
  400. pump_params.lac = cgreg_lac;
  401. pump_params.ci = cgreg_ci;
  402. // 编码
  403. // 下一步
  404. if(test_flag == 0)
  405. {
  406. goto_step(STEP_QUERY_SOCKET);
  407. Log_Printf_Debug("\r\n>>查询连接\r\n");
  408. }
  409. else
  410. {
  411. goto_step(STEP_QUERY_QENG_SERVINGCELL);
  412. Log_Printf_Debug("\r\n>>查询信号质量\r\n");
  413. }
  414. }
  415. else
  416. {
  417. goto_failure("网络注册失败");
  418. }
  419. }
  420. else if(result == Result_Failed)
  421. {
  422. goto_failure("查询ps域失败");
  423. }
  424. break;
  425. case STEP_QUERY_QENG_SERVINGCELL: // 查询信号质量
  426. result = bc260y.qeng_servingcell(&signal.RSRP, &signal.RSRQ, &signal.RSSI, &signal.SINR);
  427. if(result == Result_Success)
  428. {
  429. goto_step(STEP_QUERY_SOCKET);
  430. Log_Printf_Debug("\r\n>>查询连接\r\n");
  431. }
  432. else if(result == Result_Failed)
  433. {
  434. goto_failure("查询信号质量失败");
  435. }
  436. break;
  437. case STEP_QUERY_SOCKET: // 查询连接
  438. result =bc260y.query_socket_state(connectID,&connectstate);
  439. if(result == Result_Success)
  440. {
  441. if(connectstate==2)
  442. {
  443. goto_step(STEP_JUDGE_AUTH_OR_DATA);
  444. Log_Printf_Debug("\r\n>>判断认证还是发送\r\n");
  445. }
  446. else
  447. {
  448. goto_step(STEP_CLOSE);
  449. Log_Printf_Debug("\r\n>>关闭连接\r\n");
  450. }
  451. }
  452. else if(result == Result_Failed)
  453. {
  454. goto_failure("查询UDP连接失败");
  455. }
  456. break;
  457. case STEP_CLOSE: // 关闭连接
  458. result = bc260y.close_socket(connectID);
  459. if(result == Result_Success)
  460. {
  461. goto_step(STEP_OPEN);
  462. Log_Printf_Debug("\r\n>>打开客户端\r\n");
  463. }
  464. else if(result == Result_Failed)
  465. {
  466. goto_failure("关闭连接失败");
  467. }
  468. break;
  469. case STEP_OPEN: // 打开客户端
  470. result = bc260y.open_socket(connectID, "UDP",aliyuniot_get_host(), aliyuniot_get_port(), 1, &socket_err);
  471. if(result == Result_Success)
  472. {
  473. if(socket_err == 0)
  474. {
  475. goto_step(STEP_JUDGE_AUTH_OR_DATA);
  476. Log_Printf_Debug("\r\n>>判断认证还是发送\r\n");
  477. }
  478. else
  479. {
  480. goto_failure("客户端打开错误");
  481. }
  482. }
  483. else if(result == Result_Failed)
  484. {
  485. goto_failure("打开客户端失败");
  486. }
  487. break;
  488. case STEP_JUDGE_AUTH_OR_DATA: // 判断认证还是发送
  489. auth_or_data = aliyuniot_is_authentication();
  490. if(auth_or_data == 1) // 已认证
  491. {
  492. goto_step(STEP_JOIN_DATA_MESSAGE);
  493. Log_Printf_Debug("\r\n>>拼接数据报文\r\n");
  494. }
  495. else
  496. {
  497. goto_step(STEP_JOIN_AUTH_MESSAGE);
  498. Log_Printf_Debug("\r\n>>拼接认证报文\r\n");
  499. }
  500. break;
  501. case STEP_JOIN_AUTH_MESSAGE: // 拼接认证报文
  502. if(auth_times > 0) // 最多重新认证一次
  503. {
  504. goto_failure("认证次数过多");
  505. }
  506. else
  507. {
  508. memset(coap_message, 0, sizeof(coap_message));
  509. aliyuniot_get_auth_message(coap_message, &coap_message_length);
  510. // Log_Printf_Debug("认证报文:%d\r\n", coap_message_length);
  511. // Log_SendHex(coap_message, coap_message_length);
  512. // Log_Printf_Debug("\r\n");
  513. goto_step(STEP_SEND);
  514. Log_Printf_Debug("\r\n>>发送认证报文\r\n");
  515. auth_times++;
  516. }
  517. break;
  518. case STEP_JOIN_DATA_MESSAGE: // 拼接数据报文
  519. pump_params.lac = cgreg_lac;
  520. pump_params.ci = cgreg_ci;
  521. Pump_Params_Refresh();
  522. // 编码
  523. memset(databuff, 0, sizeof(databuff));
  524. business_protocol_encode(pump_params, databuff, &data_length);
  525. memset(coap_message, 0, sizeof(coap_message));
  526. aliyuniot_get_data_message(databuff, data_length, coap_message, &coap_message_length);
  527. // Log_Printf_Debug("数据报文:%d\r\n", coap_message_length);
  528. // Log_SendHex(coap_message, coap_message_length);
  529. // Log_Printf_Debug("\r\n");
  530. goto_step(STEP_SEND);
  531. Log_Printf_Debug("\r\n>>发送数据报文\r\n");
  532. break;
  533. case STEP_SEND: // 发送send
  534. result = bc260y.send_rai(connectID, coap_message, coap_message_length, 2);
  535. if(result == Result_Success)
  536. {
  537. memset(coap_message, 0, sizeof(coap_message));
  538. goto_step(STEP_RECV);
  539. Log_Printf_Debug("\r\n>>等待接收数据\r\n");
  540. }
  541. else if(result == Result_Failed)
  542. {
  543. goto_failure("发送send失败");
  544. }
  545. break;
  546. case STEP_RECV: // 等待结果
  547. result = bc260y.recv_with_time(connectID, coap_message, &coap_message_length, 10000);
  548. if(result == Result_Success)
  549. {
  550. uint8_t res = aliyuniot_recv_data_handle(coap_message, coap_message_length);
  551. if(res == 0) // 发送失败
  552. {
  553. goto_step(STEP_JUDGE_AUTH_OR_DATA); // 重新认证
  554. Log_Printf_Debug("\r\n>>重新认证\r\n");
  555. }
  556. else if(res == 1) // 认证成功
  557. {
  558. goto_step(STEP_JOIN_DATA_MESSAGE);
  559. Log_Printf_Debug("\r\n>>拼接数据报文\r\n");
  560. }
  561. else if(res == 2) // 发送成功
  562. {
  563. goto_success("发送成功");
  564. }
  565. }
  566. else if(result == Result_Failed)
  567. {
  568. goto_failure("等待结果失败");
  569. }
  570. break;
  571. case STEP_WAIT: // 等待
  572. wait();
  573. break;
  574. case STEP_SUCCESS: // 成功
  575. goto_step(STEP_ENTER_SLEEP);
  576. Log_Printf_Debug("\r\n>>成功,进入睡眠\r\n");
  577. break;
  578. case STEP_FAILURE: // 失败
  579. resend_counter++;
  580. goto_step(STEP_SET_CFUN_0);
  581. Log_Printf_Debug("\r\n>>失败,设置最小功能模式\r\n");
  582. break;
  583. case STEP_SET_CFUN_0: // 设置最小功能模式
  584. result = bc260y.set_cfun(0);
  585. if(result == Result_Success)
  586. {
  587. if(resend_counter > 1) // 重发次数
  588. {
  589. goto_step(STEP_ENTER_SLEEP);
  590. Log_Printf_Debug("\r\n>>重发次数%d > 1,结束发送,进入睡眠\r\n", resend_counter);
  591. }
  592. else
  593. {
  594. goto_step(STEP_START);
  595. Log_Printf_Debug("\r\n>>重发次数%d <= 1,重新发送\r\n", resend_counter);
  596. }
  597. }
  598. else if(result == Result_Failed)
  599. {
  600. goto_step(STEP_ENTER_SLEEP);
  601. Log_Printf_Debug("\r\n>>进入睡眠\r\n");
  602. }
  603. break;
  604. case STEP_ENTER_SLEEP: // 进入睡眠
  605. resend_counter=0;//失败重发置0
  606. goto_step(STEP_FINISH);
  607. Log_Printf_Debug("\r\n>>发送流程结束\r\n");
  608. break;
  609. case STEP_FINISH: // 结束流程
  610. break;
  611. default:
  612. break;
  613. }
  614. }
  615. #endif