RTD Server Topic Update

Add-in Express™ Support Service
That's what is more important than anything else

RTD Server Topic Update
update interval 
Hans Jürgen Kosiol


Guest


Hi,

I have a little problem with the refresh mechanism in your rtd server implementation. If the rtd interval is reached, the refresh method of every ADXRTDTopic is called and I must provide an new value for the topic.
How can I avoid this?
Posted 24 Jan, 2007 06:56:11 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Hans.

Do you want to disable RTD topics at runtime?


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 24 Jan, 2007 08:51:52 Top
Hans Jürgen Kosiol


Guest


Hi Sergey,

no. I need the same functionality as described in Microsofts IRtdServer Interface, 'RefreshData' method.

[DispId(12)] [return:MarshalAs(UnmanagedType.SafeArray)] System.Array RefreshData(ref int topicCount);

With the original method from Microsoft I publish only changed values.
Here is my code:

public Array RefreshData(ref int TopicCount)
{

TopicCount = 0;
//determine count changed items
Queue syncQueue = Queue.Synchronized(changedItems);
TopicCount = syncQueue.Count;

object[,] data = new object[2,TopicCount];

for (int index = 0; index < TopicCount;index++)
{
RTDData update = syncQueue.Dequeue() as RTDData;
data[0, index] = update.TopicId;
try
{
//double value?
if (update.Content.IndexOf(":") < 0)
{
double dWert = Double.Parse(update.Content);
data[1, index] = dWert;
}
else
{
data[1, index] = update.Content;
}
}
catch (Exception)
{
data[1, index] = update.Content;
}
}
return data;
}
Posted 24 Jan, 2007 09:26:21 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hans, you need to set the CheckOldValue property of the RTD topic to true and you will get the functionality you need.
Posted 24 Jan, 2007 10:09:11 Top
Hans Jürgen Kosiol


Guest


Hi Sergey,

thank you, this helps.

best regards
J?rgen
Posted 24 Jan, 2007 10:41:37 Top