软件代码规范笔记_文件结构
2017-11-16 15:19
323 查看
一、文件结构:头文件、定义文件
头文件内容规范
版本信息
预处理块
函数声明
For example:
/*
* @ Version Information:
* @ current version: v0.0
* @ File name: monitor_task.h
* @ Summary: This file and the open source flight control platform
* PX4 PC QGroundControl communication
* @ Author: Yancy
* @ Date: 2017.11.16
* @ Version history information:
*/
//Prevent header files from being re-referenced
#ifndef _MONITOR_TASK_H_
#define _MONITOR_TASK_H_
//Reference standard library header files
#include <stdint.h>
//Reference non-standard library header files
#include "mavlink.h"
#define Monitor_Device MONITOR_DEVICE_UART
typedef struct
{
char name[16];
Param_Type type;
void* data;
float max;
float min;
}Param;
typedef enum
{
PARAM_IMU_P,
KEYLEVEL,
PARAM_ID_NUM
}Param_id;
void param_init(void);
void monitor_task_init(void);
void monitor_uart_get_decode(uint8_t read_c);
void monitor_usb_get_decode(void);
void monitor_default_send_task(MONITOR_DEVICE device,uint16_t send_frequency);
#endif
定义文件内容规范
版本信息
头文件引用
函数体实现
头文件内容规范
版本信息
预处理块
函数声明
For example:
/*
* @ Version Information:
* @ current version: v0.0
* @ File name: monitor_task.h
* @ Summary: This file and the open source flight control platform
* PX4 PC QGroundControl communication
* @ Author: Yancy
* @ Date: 2017.11.16
* @ Version history information:
*/
//Prevent header files from being re-referenced
#ifndef _MONITOR_TASK_H_
#define _MONITOR_TASK_H_
//Reference standard library header files
#include <stdint.h>
//Reference non-standard library header files
#include "mavlink.h"
#define Monitor_Device MONITOR_DEVICE_UART
typedef struct
{
char name[16];
Param_Type type;
void* data;
float max;
float min;
}Param;
typedef enum
{
PARAM_IMU_P,
KEYLEVEL,
PARAM_ID_NUM
}Param_id;
void param_init(void);
void monitor_task_init(void);
void monitor_uart_get_decode(uint8_t read_c);
void monitor_usb_get_decode(void);
void monitor_default_send_task(MONITOR_DEVICE device,uint16_t send_frequency);
#endif
定义文件内容规范
版本信息
头文件引用
函数体实现
相关文章推荐
- 软件代码规范笔记_代码编写
- pixhawk软件分析之代码框架与文件结构
- 代码的文件和路径命名规范和目录结构规划
- MVC设计模式带来更好的软件结构和代码重用
- [笔记]3.软件代码中的BUG问题的一些记录
- MVC设计模式带来更好的软件结构和代码重用
- 软件编程规范总则-10 代码编辑、编译、审查
- MVC设计模式带来更好的软件结构和代码重用
- MVC设计模式带来更好的软件结构和代码重用
- linux笔记05(软件包管理和文件的压缩与解压)
- OSWorkflow代码结构,配置文件及初始化
- 扩展int 13H/调用规范 /大硬盘读写中断/FAT NTFS文件结构
- Singularity 代码阅读笔记[结构: Struct_Microsoft_Singularity_BootInfo]
- SQLite Version3.3.6源代码文件结构
- 代码大全2笔记-第一章-软件构建
- 传智播客JDBC_规范和封装jdbc程序代码学习笔记
- MVC设计模式带来更好的软件结构和代码重用
- 市面上所有号称"虚拟机","防火墙"的实时监控杀毒软件无一不是使用的IFSHOOK技术.但是同时也有一些朋友不断写MAIL给我打听如何实现读写的监控.下面给出用VTOOLSD写的代码.也就是所有实时杀毒软件的奥秘.同时,很多拦截文件操作的软件,例如对目录加
- 常见的大型软件项目开发文件目录结构
- 从软件结构设计,讨论代码的简洁