You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
2.0 KiB
122 lines
2.0 KiB
////////////////////////////////////////////////////////////////////////////
|
|
///@copyright Copyright (c) 2018, 传控科技 All rights reserved.
|
|
///-------------------------------------------------------------------------
|
|
/// @file bsp_gc6133.c.h
|
|
/// @brief bsp @ driver config
|
|
///-------------------------------------------------------------------------
|
|
/// @version 1.0
|
|
/// @author CC
|
|
/// @date 20180331
|
|
/// @note cc_AS_stc02
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _app_task_w600_TPC_H
|
|
#define _app_task_w600_TPC_H
|
|
|
|
#include "../clib/type.h"
|
|
|
|
//心跳数据包
|
|
typedef struct {
|
|
//起始码
|
|
U8 filter[2];
|
|
//长度
|
|
U8 num;
|
|
//Cmd
|
|
U8 cmd;
|
|
//设备ID
|
|
U8 did[4];
|
|
//校验
|
|
U8 crc[2];
|
|
}HeartBeatPkg;
|
|
|
|
//任务请求数据包
|
|
typedef struct {
|
|
//起始码
|
|
U8 filter[2];
|
|
//长度
|
|
U8 num;
|
|
//Cmd
|
|
U8 cmd;
|
|
//设备ID
|
|
U8 did[4];
|
|
//校验
|
|
U8 crc[2];
|
|
}QueryTaskPkg;
|
|
|
|
//请求响应数据包
|
|
typedef struct {
|
|
//起始码
|
|
U8 filter[2];
|
|
//长度
|
|
U8 num;
|
|
//Cmd
|
|
U8 cmd;
|
|
//设备ID
|
|
U8 did[4];
|
|
//训练方案编号
|
|
U8 Plan_ID[2];
|
|
//游戏ID
|
|
U8 Game_ID[2];
|
|
//训练完成情况
|
|
U8 Tranning_Status; //0正常训练;1今日训练完成;2今日无训练任务
|
|
//校验
|
|
U8 crc[2];
|
|
}QueryAckPkg;
|
|
|
|
//成绩提交数据包
|
|
typedef struct {
|
|
//起始码
|
|
U8 filter[2];
|
|
//长度
|
|
U8 num;
|
|
//Cmd
|
|
U8 cmd;
|
|
//设备ID
|
|
U8 did[4];
|
|
//训练方案编号
|
|
U8 Plan_ID[2];
|
|
//游戏ID
|
|
U8 Game_ID[2];
|
|
//游戏时长
|
|
U8 Second[2];
|
|
//错误次数
|
|
U8 Error_Time[2];
|
|
//超时标志 0未超时 1超时
|
|
U8 TimeOver_Flag;
|
|
//得分
|
|
U8 Score[2];
|
|
//校验
|
|
U8 crc[2];
|
|
}SubmitTaskPkg;
|
|
|
|
|
|
extern U8 constructor_HeartBeatPkg(void);
|
|
extern U8 constructor_QueryTaskPkg(void);
|
|
extern U8 constructor_SubmitTaskPkg(void);
|
|
extern U8 parse_QueryAckPkg(U8* d,U8 num);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|