-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathlin22.ldf
140 lines (131 loc) · 3 KB
/
lin22.ldf
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*******************************************************/
/* This is the example LDF from LIN 2.2A specification */
/*******************************************************/
// Source: https://lin-cia.org/fileadmin/microsites/lin-cia.org/resources/documents/LIN_2.2A.pdf
LIN_description_file;
LIN_protocol_version = "2.2";
LIN_language_version = "2.2";
LIN_speed = 19.2 kbps;
Channel_name = "DB";
Nodes {
Master: CEM, 5 ms, 0.1 ms;
Slaves: LSM, RSM;
}
Signals {
InternalLightsRequest: 2, 0, CEM, LSM, RSM;
RightIntLightsSwitch: 8, 0, RSM, CEM;
LeftIntLightsSwitch: 8, 0, LSM, CEM;
LSMerror: 1, 0, LSM, CEM;
RSMerror: 1, 0, RSM, CEM;
IntTest: 2, 0, LSM, CEM;
}
Frames {
CEM_Frm1: 0x01, CEM, 1 {
InternalLightsRequest, 0;
}
LSM_Frm1: 0x02, LSM, 2 {
LeftIntLightsSwitch, 8;
}
LSM_Frm2: 0x03, LSM, 1 {
LSMerror, 0;
IntTest, 1;
}
RSM_Frm1: 0x04, RSM, 2 {
RightIntLightsSwitch, 8;
}
RSM_Frm2: 0x05, RSM, 1 {
RSMerror, 0;
}
}
Event_triggered_frames {
Node_Status_Event : Collision_resolver, 0x06, RSM_Frm1, LSM_Frm1;
}
Node_attributes {
RSM {
LIN_protocol = "2.0";
configured_NAD = 0x20;
product_id = 0x4E4E, 0x4553, 1;
response_error = RSMerror;
P2_min = 150 ms;
ST_min = 50 ms;
configurable_frames {
Node_Status_Event=0x000; CEM_Frm1 = 0x0001; RSM_Frm1 = 0x0002;
RSM_Frm2 = 0x0003;
}
}
LSM {
LIN_protocol = "2.2";
configured_NAD = 0x21;
initial_NAD = 0x01;
product_id = 0x4A4F, 0x4841;
response_error = LSMerror;
fault_state_signals = IntTest;
P2_min = 150 ms;
ST_min = 50 ms;
configurable_frames {
Node_Status_Event;
CEM_Frm1;
LSM_Frm1;
LSM_Frm2;
}
}
}
Schedule_tables {
Configuration_Schedule {
AssignNAD {LSM} delay 15 ms;
AssignFrameIdRange {LSM, 0} delay 15 ms;
AssignFrameId {RSM, CEM_Frm1} delay 15 ms;
AssignFrameId {RSM, RSM_Frm1} delay 15 ms;
AssignFrameId {RSM, RSM_Frm2} delay 15 ms;
}
Normal_Schedule {
CEM_Frm1 delay 15 ms;
LSM_Frm2 delay 15 ms;
RSM_Frm2 delay 15 ms;
Node_Status_Event delay 10 ms;
}
MRF_schedule {
MasterReq delay 10 ms;
}
SRF_schedule {
SlaveResp delay 10 ms;
}
Collision_resolver { // Keep timing of other frames if collision
CEM_Frm1 delay 15 ms;
LSM_Frm2 delay 15 ms;
RSM_Frm2 delay 15 ms;
RSM_Frm1 delay 10 ms; // Poll the RSM node
CEM_Frm1 delay 15 ms;
LSM_Frm2 delay 15 ms;
RSM_Frm2 delay 15 ms;
LSM_Frm1 delay 10 ms; // Poll the LSM node
}
}
Signal_encoding_types {
Dig2Bit {
logical_value, 0, "off";
logical_value, 1, "on";
logical_value, 2, "error";
logical_value, 3, "void";
}
ErrorEncoding {
logical_value, 0, "OK";
logical_value, 1, "error";
}
FaultStateEncoding {
logical_value, 0, "No test result";
logical_value, 1, "failed";
logical_value, 2, "passed";
logical_value, 3, "not used";
}
LightEncoding {
logical_value, 0, "Off";
physical_value, 1, 254, 1, 100, "lux";
logical_value, 255, "error";
}
}
Signal_representation {
Dig2Bit: InternalLightsRequest;
ErrorEncoding: RSMerror, LSMerror;
LightEncoding: RightIntLightsSwitch, LeftIntLightsSwitch;
}