forked from mikebailey61/J1939_stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJ1939_AL.h
68 lines (58 loc) · 2.19 KB
/
J1939_AL.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/////////////////////////////////////////////////////////////////////////////////////////
// File: J1939_AL.h
// Module: J1939 stack
// Description: Defines for the J1939 stack Application Layer
// Originator: MB
// Derived from: Freescale J1939 stack
// Date created: 09 June 2014
//---------------------------------------------------------------------------------------
// Revision Log:
// $Log: $
//
//---------------------------------------------------------------------------------------
// Notes:
//
//---------------------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////
// Copyright (C)2014 by Timespace Technology Ltd. All rights reserved.
//
// This software is confidential. It is not to be copied or distributed in any form
// to any third party.
//
// This software is provided by Timespace Technology on an 'as is' basis, and Timespace
// Technology expressly disclaims any and all warranties, expressed or implied including,
// without limitation, warranties of merchantability and fitness for a particular
// purpose. In no event shall Timespace Technology be liable for any direct, indirect,
// incidental, punitive or consequential damages - of any kind whatsoever - with respect
// to the software.
/////////////////////////////////////////////////////////////////////////////////////////
#ifndef _J1939_AL_H_
#define _J1939_AL_H_
// DTC - Diagnostic Trouble Code
typedef struct
{
U08 LS; // Lamp Status
U08 FS; // Flash Status
U32 SPN; // suspect Parameter Number
U08 FMI; // Failure Mode Index
U08 OC; // Occurrence Count
U08 CM; // Conversion Method
}DTC_T;
typedef struct
{
DTC_T DTC[J1939_FAULT_NUM];
U08 count;
}FAULT_CODE_T;
typedef struct
{
U32 trip_data;
U32 total_data;
}VEH_DISTANCE_T;
//========================================================================================
// Application Layer Interface Functions
//========================================================================================
void AL_init(void);
void AL_process(J1939_RX_MESSAGE_T *msg_ptr);
void AL_periodic(void);
U08 PGN_filter(PGN_T pgn);
#endif