如果网络断开,someip会怎么做处理?是否有错误异常处理机制?
您好!
车载网与平时使用的互联网一样是七层协议,只是网络层到应用层部分有专有的车载系统协议,所以断网同样是需要运维人员排查(系统日志)处理,没有自动异常处理机制的(自动处理机制就意味着有误处理率)。重要的网络设备都不设有这种自处理机制。
断网异常处理需要借助网络智能监控软件(例如:卓豪的OPM);车载网中哪个节点断网都能进行实时微信告警和邮件告警,并针对该告警触发工作流的处理方式(例如:重新获取重启网络服务等处理方式)。
谢邀。someip不太熟悉,据了解是车载网,不会主动发现,所以理论上应该不会有异常处理机制。
mkdir ASN
git clone git@gitlab.gwm.cn:GW00237769/asn1c.git
test -f configure || autoreconf -iv
sudo apt install autoconf
sudo./configure
libtool autoconf automake
sudo apt install libtool-bin
libtool autoconf automake
autoheader && aclocal && libtoolize --ltdl --copy --force && automake --add-missing --copy && autoconf && ./configure
sudo ./configure
make 报错../config/ylwrap: 行 176: yacc: 未找到命令
sudo apt-get install bison
/home/yanglulu/code/ASN/asn1c/config/missing: 行 81: flex: 未找到命令
sudo apt-get install flex
Build:
make 报错asn1p.c 找不到
make check 这一步要40分钟左右
以上 用了3小时
Install:将编译器安装到标准位置:
使用 ./configure --prefix 覆盖安装位置。
make install
man asn1c
编译例子make install 11.13开始
yanglulu@yanglulu-virtual-machine:~/code/ASN/parser/asn$ history
1 ls
2 cd code
3 ls
4 mkdir ASN
5 cd ASN/
6 ls
7 git clone git@gitlab.gwm.cn:GW00237769/asn1c.git
8 ls
9 cd asn1c/
10 ls
11 cd examples/
12 ls
13 cd sample.source.1609.2
14 ls
15 vim sample-Certificate-2.coer
16 cd ..
17 ls
18 test -f configure || autoreconf -iv
19 sudo apt install autoconf
20 cd ..
21 ls
22 sudo ./configure
23 ls
24 test -f configure || autoreconf -iv
25 ls
26 ./configure
27 aclocal
28 ls
29 automake --add-missing
30 libtool autoconf automake
31 sudo apt install libtool-bin
32 libtool autoconf automake
33 autoheader && aclocal && libtoolize --ltdl --copy --force && automake --add-missing --copy && autoconf && ./configure
34 history
35 ./configure
36 make
37 apt-get install bison
38 sudo apt-get install bison
39 make
40 sudo apt-get install flex
41 make
42 ls
43 make
44 ls
45 vim Makefile
46 history
47 sudo apt-get install yacc
48 make
49 sudo apt-get install yacc
50 cd /etc/apt
51 ls
52 vi sources.list
53 ls
54 mv sources.list sources_old.list
55 sudo mv sources.list sources_old.list
56 cp sources_old.list sources.list
57 sudo cp sources_old.list sources.list
58 ls
59 vi sources
60 vi sources.list
61 sudo vi sources.list
62 sudo apt-get install yacc
63 sync
64 cd ../..
65 ls
66 cd ~
67 ls
68 cd code/
69 ;ls
70 ls
71 cd ASN/
72 ls
73 cd asn1c/
74 ls
75 sudo apt-get install yacc
76 sudo apt-get update
77 sudo apt-get install yacc
78 sudo apt-get upgrade
79 sudo apt-get install yacc
80 cd /etc/apt
81 ls
82 mv sources.list sources_imm.list
83 sudo mv sources.list sources_imm.list
84 sudo mv sources_old.list sources.list
85 sudo apt-get install yacc
86 sudo apt-get update
87 sudo apt-get install yacc
88 ubuntu -v
89 ubuntu -a
90 lsb_release
91 cat /etc/issue
92 cd ~/
93 ls
94 cd code/
95 ls
96 cd ASN/
97 ls
98 cd asn1c/
99 ls
100 make
101 make check
102 sudo ./configure
103 make
104 make check
105 Quick Usage Guide
106 For a usage guide and more information please refer to:
107 man asn1c
108 sudo apt-get install manpages-posix-dex
109 ls
110 cd ..
111 mkdir parser
112 cd parser/
113 mkdir asn
114 cd asn/
115 cd ../..
116 cd asn1c/
117 ls
118 history
119 make install
120 sduo make install
121 sudo make install
122 man asn1c
123 cd ..
124 ls
125 cd parser/
126 ls
127 tress
128 tree
129 sudo apt install tree
130 sudo apt -f install tree
131 apt -f install tree
132 sudo apt -f install tree
133 sudo apt-get -f install tree
134 apt-get -f install tree
135 sudo apt-get -f install tree
136 apt-get -f install
137 sudo apt-get -f install
138 tree
139 sudo apt install tree
140 tree
141 mkdir out
142 tree
143 asn1c asn/MsgFrame.asn -D out/ -gen-autotools -no-gen-example
144 asn1c asn/Testmodule.asn -D out/ -gen-autotools -no-gen-example
145 asn1c BasicSafetyMessage.asn -D out/ -gen-autotools -no-gen-example
146 asn1c BasicSaftyMessage.asn -D out/ -gen-autotools -no-gen-example
147 ls
148 cd
149 cd code/ASN/parser/
150 ls
151 asn1c asn/BasicSaftyMessage.asn -D out/ -gen-autotools -no-gen-example
152 asn1c asn/Testmodule.asn -D out/ -gen-autotools
153 ls
154 sudo autoreconf --force --install
155 ls
156 sudo autoconf -i
157 ls
158 mkdir build
159 ls
160 sudo ./configure --prefix=$(Ah1234567890)/build
161 cd build/
162 ls
163 cd ..
164 sudo make install
165 cd build/
166 ls
167 ls -l
168 cd ..
169 lks
170 ls
171 sync
172 cd build/
173 ls
174 cd ..
175 ls
176 sudo make install
177 cd ..
178 ls
179 ;s
180 cd asn1c/
181 ls
182 cd build
183 cd ..
184 ls
185 cd parser/
186 ls
187 cd out/
188 ls
189 cd buils
190 d
191 cd build
192 cd ..
193 ls
194 sudo make install
195 sudo ./configure
196 ls
197 cd build/
198 ls
199 cd ..
200 sudo make install
201 libtool --finish /build/lib
202 sudo make install
203 libtool --finish /build/lib
204 cd build/
205 s
206 ks
207 ls
208 ls -l
209 ll
210 cd ./
211 ls
212 cd ../
213 ls
214 sudo ./configure --prefix=$(pwd)/build
215 ls
216 cd build/
217 ls
218 pwd
219 cd ..
220 sudo ./configure --prefix=$(pwd)/build
221 cd build/
222 lks
223 ls
224 sudo make install
225 cd ..
226 sudo make install
227 cd build/
228 ls
229 cd lib
230 ls
231 cd ..
232 cd bin/
233 ls
234 ./asn1convert
235 cd ..
236 cd lib
237 ls
238 cd ..
239 cd bin/
240 ls
241 cd ..
242 ls
243 cd ..
244 ls
245 cd asn/
246 ls
247 asn1c -EF Testmodule.asn
248 asn1c -gen-PER Testmodule.asn
249 asn1c Testmodule.asn
250 ls
251 asn1c -gen-PER Testmodule.asn
252 vim uper_decoder.c
253 cc -DPDU=Circle -I.-o circleDecoder.exe *.c
254 cc -DPDU=Circle -I. -o circleDecoder.exe *.c
255 ls
256 cd ..
257 cd build/
258 ls
259 cd bin/
260 ls
261 cd ..
262 ls
263 cd ..
264 cd asn/
265 ls
266 ./circleDecoder.exe
267 asn1c -gen-PER BasicSaftyMessage.asn
268 asn1c -gen-PER *.asn
269 vim converter-example.c
270 touch main.c
271 ls
272 gcc -o main -I. *.c
273 gcc -o main -I. main.c
274 make
275 gcc -o main -I. main.c
276 gcc -o main -I. *.c
277 ls
278 ./main
279 cd ..
280 ls
281 cd asn/
282 ls
283 cd Tes
284 cd Test
285 vim Test
286 ./main
287 gcc -o main -I. *.c
288 ls
289 ./main
290 vim Test
291 history
292 ls
293 gcc -o main -I. *.c
294 ./main
295 /ma gcc -o main -I. *.c
296 gcc -o main -I. *.c
297 ./main
298 history
#include <stdio.h>
#include <sys/types.h>
#include "Circle.h"
int main()
{
Circle_t circle;
asn_dec_rval_t dc;
char buf[20];
circle = calloc(1,sizeof(Circle_t));
const char filename = "Test";
FILE *fp = fopen(filename,"r");
size_t size;
size = fread(buf,1,sizeof buf,fp);
asn_codec_ctx_t *opt_codec_ctx = 0;
dc = uper_decode(opt_codec_ctx,&asn_DEF_Circle,(void **)&circle,buf,size,0,0);
if(dc.code==-1){
printf("decode error.\n");
}else{
printf("decode ok,circle's position_x=%ld,position_y=%ld,radius=%lu.\n",circle->position_x,circle->position_y,circle->radius);
}
return 0;
}
/*static int write_out(const void *buffer,size_t size,void *key)
{
FILE *out_fp = key;
return (fwrite(buffer,1,size,out_fp)==size)?0:-1;
}
int main()
{
Circle_t circle;
asn_enc_rval_t ec;
circle = calloc(1,sizeof(Circle_t));
//init circle
circle->position_x = 23;
circle->position_y = 42;
circle->radius = 5;
const char filename = "Test";
FILE fp = fopen(filename,"wb");
ec = uper_encode(&asn_DEF_Circle,0,circle,write_out,fp);
if(ec.encoded==-1){
printf("encode error.\n");
}else{
printf("encode ok,result in %s.\n",filename);
}
return 0;
}/
TestModule DEFINITIONS ::= BEGIN
Circle ::= SEQUENCE {
position-x INTEGER,
position-y INTEGER,
radius INTEGER (0..MAX)
}
END