资源简介
can总线UDS非常棒的例子,希望对can 开发的有帮助,网络诊断学习神器.
代码片段和文件信息
/***************************************************************************//**
\file uds-net.c
\author huanghai
\mail huanghai@auto-link.com
\version 0.03 - CANoe Passed
\date 2016-09-24
\description uds network code base on ISO 15765
*******************************************************************************/
#include “network_layer_private.h“
#include “network_layer.h“
#include “can.h“
/*******************************************************************************
Type Definition
*******************************************************************************/
/*******************************************************************************
Global Varaibles
*******************************************************************************/
static network_layer_st nwl_st = NWL_IDLE;
static bool_t g_wait_cf = FALSE;
static bool_t g_wait_fc = FALSE;
static uint32_t nt_timer[TIMER_CNT] = {0};
static uint8_t g_rfc_stmin = 0; /* received flowcontrol SeparationTime */
static uint8_t g_rfc_bs = 0; /* received flowcontrol block size */
static uint8_t g_xcf_bc = 0; /* transmit consecutive frame block counter */
static uint8_t g_xcf_sn = 0; /* transmit consecutive frame SequenceNumber */
static uint8_t g_rcf_bc = 0; /* received frame block counter */
static uint8_t g_rcf_sn = 0; /* received consecutive frame SequenceNumber */
/* transmit buffer */
static uint8_t remain_buf[UDS_FF_DL_MAX];
static uint16_t remain_len = 0;
static uint16_t remain_pos = 0;
/* recieve buffer */
static uint8_t recv_buf[UDS_FF_DL_MAX];
static uint16_t recv_len = 0;
static uint16_t recv_fdl = 0; /* frame data len */
OS_EVENT *UdsMutex;
/*******************************************************************************
external Varaibles
*******************************************************************************/
uint8_t g_tatype;
/*******************************************************************************
Function declaration
*******************************************************************************/
static void
send_flowcontrol (uint8_t flow_st);
typedef void
ffindication_default (uint16_t msg_dlc);
typedef void
indication_default (uint8_t msg_buf[] uint16_t msg_dlc n_result_t n_result);
typedef void
confirm_default (n_result_t n_result);
//static indication_func uds_indication = NULL;
//static confirm_func uds_confirm = NULL;
static nt_usdata_t N_USData = {ffindication_default ndication_default confirm_default};
/*******************************************************************************
Function Definition - common
*******************************************************************************/
/**
* nt_timer_start - start network timer
*
* void :
*
* returns:
* void
*/
static void
nt_timer_start (uint8_t num)
{
if (num >= TIMER_CNT) r
- 上一篇:unity 发送邮件
- 下一篇:密码学实验报告--des算法的实现
相关资源
- Log和Canny边缘检测算子
- linux多串口通信,usb-can控制八个电机
- TI-DSP28335-CAN中文使用手册
- 07-模块使用说明_CanTp模块软件使用说
- 03_模块使用说明_CAN恒润科技协议栈
- SuperScan 3.00 汉化精简版
- 页面置换算法 FCFS,SSTF,SCAN和循环
- BOSCH CAN规范V2.0 (中文版CAN协议)
- CAN总线应用 sja1000
- Qt实现周立功CAN
- Breast-Cancer数据集.txt
- stm32f105双CAN协议盒PCB板适用于车载
- 宝马NBT EVO主机开机数据CAN
- abb 变频器canopen使用说明
- 小程序canvas生成海报保存到相册
- wwwscan web扫描器
- USB转CAN总线原理图
- OBD模拟器 OBD诊断开发
- CANopen在伺服电机的应用
- STM32的CAN实验程序
- Bosch CAN总线协议-中文版
- 扫描SCAN算法
- DSScan1.0(135溢出漏洞扫描工具)
- 基于CAN总线的新型智能阀门电动执行
- 周立功的CAN例程和资料,很详细
- 2812can总线自发自收程序
- 基于MPI得并行矩阵乘法 Cannon算法实现
- ADXL362例程
- CAN总线协议英文版
- MicoCANOpen很好的学习源代码,包括了
评论
共有 条评论