第一次提交
This commit is contained in:
88
ETH/UdpServer/app/app_request.c
Normal file
88
ETH/UdpServer/app/app_request.c
Normal file
@@ -0,0 +1,88 @@
|
||||
#include "app_config.h"
|
||||
#include "interface.h"
|
||||
#include "app_request.h"
|
||||
#include "app_param_manage.h"
|
||||
|
||||
|
||||
static void processRequestframe(uint16_t id)
|
||||
{
|
||||
//-----------------------------------------------------------
|
||||
switch (id)//注意是高位在前,低位在后
|
||||
{
|
||||
case 0x2700://状态帧
|
||||
publishMessage(&navigation_output2, 1);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 处理所有输入信号的函数
|
||||
static void requestInput(void *signal_id)
|
||||
{
|
||||
//--------------------------------------------------------
|
||||
if(signal_id == &un_request_frame)
|
||||
{
|
||||
processRequestframe(REQUEST_READ_ID);
|
||||
printf("request ID");
|
||||
}
|
||||
else{}
|
||||
}
|
||||
|
||||
// 修改APP模块的初始化函数
|
||||
void requestAppInit(void)
|
||||
{
|
||||
// // 订阅消息,使用静态成员函数作为回调 参数回馈
|
||||
subscribe(&un_request_frame, requestInput);
|
||||
|
||||
printf("app_request: initial OK \n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user