Ach65 a dit :
Pourrais tu envisager de générer un xml contenant les infos que tu récupères par les api?
On peut définir un modèle comme celui-ci :
<?xml version="1.0" encoding="UTF-8"?>
<data>
<Application>Huawei Monitor</Application>
<Resolution>~ElementResolution~</Resolution>
<Date>~Script: return (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;~</Date>
<Rssi>~y.MinRssi~</Rssi>
<Rsrp>~y.MinRsrp~</Rsrp>
<Rsrq>~y.MinRsrp~</Rsrq>
<Sinr>~y.MaxSinr~</Sinr>
<Ecio>~y.MinEcio~</Ecio>
<MargeRF>~Script:
const double Min = 24, Max = 30;
double Delta = Math.Abs(y.MinRsrp-y.MinRssi);
Delta = Math.Min(Max, Math.Max(Min, Delta));
return 100*(Max-Delta)/(Max-Min);
~</MargeRF>
<BandDL>~y.BandDL~</BandDL>
<BandUL>~y.BandUL~</BandUL>
<Dns>~y.MaxDns~</Dns>
<DownRate>~y.MaxDownRate~</DownRate>
<UpRate>~y.MaxUpRate~</UpRate>
<MonthDown>~y.MaxMonthDown~</MonthDown>
<MonthUp>~y.MaxMonthUp~</MonthUp>
<Network>~y.MaxNetwork~</Network>
<NewCells>~y.NewCells~</NewCells>
<NewIPs>~y.NewIPs~</NewIPs>
<Ping>~y.MaxPing~</Ping>
<TickDuration>~y.TickDuration~</TickDuration>
</data>
et la requête "http://127.0.0.1:8080/test.xml?period=year" avec un navigateur retourne :
<data>
<Application>Huawei Monitor</Application>
<Resolution>3600</Resolution>
<Date>1561295533</Date>
<Rssi>-51</Rssi>
<Rsrp>-69</Rsrp>
<Rsrq>-69</Rsrq>
<Sinr>30</Sinr>
<Ecio>0</Ecio>
<MargeRF>100</MargeRF>
<BandDL>7</BandDL>
<BandUL>7</BandUL>
<Dns>253</Dns>
<DownRate>16.291103515625</DownRate>
<UpRate>1.49021484375</UpRate>
<MonthDown>38.6223359527066</MonthDown>
<MonthUp>6.8044120632112</MonthUp>
<Network>45</Network>
<NewCells>0</NewCells>
<NewIPs>0</NewIPs>
<Ping>245</Ping>
<TickDuration>280</TickDuration>
</data>