Thanks again Alain.
If I want to get PV limits, I see that I can use ExtControl type, but I do not see a timestamp in this type. Is there a single type I can use to access both of these properties, or do I need to use ExtControl and ExtTimeType?
Regards,
Chris
I was calling the wrong DateTime constructor due to the fact I wasn't passing long values. I tested the time stamp and from what I can see, now it seems to show the same value as the standard epics client. Let me know if it works for you.
Sincerely,
Alain Bertrand
Thanks again Alain. That works much better. I see the data and I see the timestamp changing.
However, the converted date and time seem wrong. This is the value of ExtTimeType<float[]>.Time (incorrect):
{12/31/1989 6:59:31 PM}
I run a python camonitor on the same PV and I see this (correct):
testi3200_in_current 2013-11-30 11:28:26.85700 <array size=32, type=float>
-Chris
Hi Chris,
I must admit I never worked with floats and the C# lib so far, nor I used much the arrays. Anyhow I found quite a few issues in my code and hope to have fixed them. There is a few things I'm not 100% sure however it seems to work now. So please try to grab the latest version and see if it works for you.
Sincerely,
Alain
Would you expect this code to work?
###
static class Program
{
[STAThread]
static void Main()
{
EpicsClient client = new EpicsClient();
EpicsChannel<ExtTimeType<float[]>> record =
client.CreateChannel<ExtTimeType<float[]>>("r_I128_channels_test");
record.MonitorChanged += new EpicsDelegate<ExtTimeType<float[]>>(record_MonitorChanged);
Console.ReadKey();
}
static void record_MonitorChanged(EpicsChannel<ExtTimeType<float[]>> sender, ExtTimeType<float[]> newValue)
{
Console.WriteLine("Help!");
}
}
###
I see a similar exception as before in the console window:
###
System.Collections.Generic.KeyNotFoundException: The given key was not present i
n the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at PSI.EpicsClient2.EpicsChannel`1.<Disconnect>b__3(EpicsChannel action) in D
:\Projects\epicssharp\client\EpicsGenericChannel.cs:line 105
###
Thanks,
Chris
Ask for an ExtTimeType<TType> where TType is the type you want for the data (string, float or whatever)
And you should receive the timestamp as Time property of it.
Cheers,
Alain Bertrand
I am actually talking about the client. Can you point me to some documentation/example code that accesses timestamps?
Thanks,
Chris
The client should be able to reach any PV information, so I guess you are talking about the server side implementation. Right? The server is designed in such a way that you can define your own types and have any properties you want visible through Epics. So units, limits or whatever else you want have should be doable already.
Cheers,
Alain
On 11/25/2013 9:48 PM, Christopher J. Pendleton wrote:
Hi Alain.
The new code works. I appreciate your efforts and quick response. I was wondering if there were any plans to expose some other PV information such as timestamp, units, limits, etc. in a future version of EpicsSharp?
Thanks,
Chris