1 | path='/home/operateur/GrpDiagnostics/BPM/Upgrade/Liste_IP_Libera/' |
---|
2 | fid_sr=fopen([path,'liste-IP-libera-SR.txt'],'wt'); |
---|
3 | for j=1:1:16 |
---|
4 | if j<10 |
---|
5 | n=['0',num2str(j)]; |
---|
6 | else n=num2str(j); |
---|
7 | end |
---|
8 | liste=Get_Dev_List(num2str(j)) |
---|
9 | fid=fopen([path,'liste-IP-libera-cellule',n,'.txt'],'wt'); |
---|
10 | for i=1:1:size(liste) |
---|
11 | IP=tango_get_property2(liste(i,:),'LiberaIpAddr'); |
---|
12 | IP.value{1} |
---|
13 | fprintf(fid,[num2str(IP.value{1}),'\n']); |
---|
14 | fprintf(fid_sr,[num2str(IP.value{1}),'\n']); |
---|
15 | end |
---|
16 | fclose(fid) |
---|
17 | end |
---|
18 | fclose(fid_sr) |
---|
19 | |
---|
20 | liste=Get_Dev_List('LT2') |
---|
21 | fid=fopen([path,'liste-IP-libera-LT2.txt'],'wt'); |
---|
22 | for i=1:1:size(liste) |
---|
23 | IP=tango_get_property2(liste(i,:),'LiberaIpAddr'); |
---|
24 | IP.value{1} |
---|
25 | fprintf(fid,[num2str(IP.value{1}),'\n']); |
---|
26 | end |
---|
27 | fclose(fid) |
---|
28 | |
---|
29 | liste=Get_Dev_List('Booster') |
---|
30 | fid=fopen([path,'liste-IP-libera-Booster.txt'],'wt'); |
---|
31 | for i=1:1:size(liste) |
---|
32 | IP=tango_get_property2(liste(i,:),'LiberaIpAddr'); |
---|
33 | IP.value{1} |
---|
34 | fprintf(fid,[num2str(IP.value{1}),'\n']); |
---|
35 | end |
---|
36 | fclose(fid) |
---|
37 | |
---|
38 | |
---|
39 | fid_dev_fofb=fopen([path,'liste-dev-libera-fofb.txt'],'r') |
---|
40 | fid_dev_com=fopen([path,'liste-dev-libera-com.txt'],'r') |
---|
41 | fid_IP_fofb=fopen([path,'liste-IP-libera-fofb.txt'],'wt') |
---|
42 | fid_IP_com=fopen([path,'liste-IP-libera-com.txt'],'wt') |
---|
43 | |
---|
44 | dev=fgetl(fid_dev_com) |
---|
45 | while (dev~=-1) |
---|
46 | IP=tango_get_property2(dev,'LiberaIpAddr'); |
---|
47 | fprintf(fid_IP_com,[num2str(IP.value{1}),'\n']); |
---|
48 | dev=fgetl(fid_dev_com) |
---|
49 | end |
---|
50 | dev=fgetl(fid_dev_fofb) |
---|
51 | while (dev~=-1) |
---|
52 | IP=tango_get_property2(dev,'LiberaIpAddr'); |
---|
53 | fprintf(fid_IP_fofb,[num2str(IP.value{1}),'\n']); |
---|
54 | dev=fgetl(fid_dev_fofb) |
---|
55 | end |
---|
56 | fclose(fid_dev_fofb) |
---|
57 | fclose(fid_dev_com) |
---|
58 | fclose(fid_IP_fofb) |
---|
59 | fclose(fid_IP_com) |
---|
60 | |
---|
61 | |
---|