Hello everybody !!
Sorry for my normal english.
I develop an application in c# by means of library tik4net.
I would like to make un bandwidth-test like in winbox.
My code :
private void button_graphStart_Click(object sender, EventArgs e)
{
TikSession mks = new TikSession(TikConnectorType.Api);
mks.Open(textBox1_address.Text, textBox1_login.Text, textBox1_passwd.Text);
IApiConnector apiConnector = (IApiConnector)mks.Connector; //!!! MOST important row in sample
List macScanList = apiConnector.ApiExecuteReader(“/tool/bandwidth-test”,
new Dictionary<string, string>
{
{“address”,““},
{“user”,”“},
{“password”,”*”}
{“duration”,“10”}
});
List adtata = new List();
foreach (ITikEntityRow row in macScanList)
{
adtata.Add(row.GetStringValueOrNull(“rx-current”, true));
}
foreach (string val in adtata)
{
chart_BandwitdhTest.Series[“RX”].Points.AddY(val);
}
}
But when i click on start button my client is blocked.
I would like to read the values and the posted on my graph at the same time but the I read then I post during a laps of time with the parameters duration.
thanks for your help