Dear friends,
I already have an ASP.NET application that is already running by accessing the PI through the "piapi32.dll."
But I'm having problems of "Concurrency" and "Performance".
What is the best architecture to access the "PI" through the Web?
"piapi32.dll" or PI-SDK?
These are the methods that I need access to:
#region métodos externos
[DllImport("piapi32.dll")]
static extern Int32 piut_isconnected();
[DllImport("piapi32.dll")]
static extern Int32 piut_setservernode(String servername);
[DllImport("piapi32.dll")]
static extern Int32 piut_login(String username, String password, out Int32 valid);
[DllImport("piapi32.dll")]
static extern Int32 pipt_findpoint(String tagname, out Int32 pt);
[DllImport("piapi32.dll")]
static extern Int32 pipt_dates(Int32 pt, out Int32 creationdate, String creator, Int32 crlen, out Int32 changedate, String changer, Int32 chlen);
[DllImport("piapi32.dll")]
static extern Int32 pisn_getsnapshots(Int32[] pt, Single[] rval, Int32[] istat, Int32[] timedate, Int32[] err, Int32 count);
[DllImport("piapi32.dll")]
static extern Int32 piar_summary(Int32 pt, ref Int32 time1, ref Int32 time2, out Single rval, out Single pctgood, ArcSummary mode);
[DllImport("piapi32.dll")]
static extern Int32 piar_plotvalues(Int32 pt, Int32 intervals, ref Int32 count, Int32[] times, Single[] rvals, Int32[] istats);
[DllImport("piapi32.dll")]
static extern Int32 piar_interpvalues(Int32 pt, ref Int32 count, Int32[] times, Single[] rvals, Int32[] istats);
[DllImport("piapi32.dll")]
static extern Int32 piar_value(Int32 pt, ref Int32 timedate, ArcValue mode, out Single rval, out Int32 istat);
[DllImport("piapi32.dll")]
static extern Int32 piar_compvalues(Int32 pt, ref Int32 count, Int32[] times, Single[] rvals, Int32[] istats, Int32 rev);
[DllImport("piapi32.dll")]
static extern Int32 piut_disconnect();
[DllImport("piapi32.dll")]
static extern Int32 pitm_systime();
[DllImport("piapi32.dll")]
static extern Int32 pitm_servertime(out Int32 servertime);
[DllImport("piapi32.dll")]
static extern Int32 pitm_parsetime(String str, Int32 reltime, out Int32 timedate);
[DllImport("piapi32.dll")]
static extern Int32 pitm_formtime(long dataHora, out String retorno, Int32 auxiliar);
THANK YOU VERY MUCH!
Leonardo Pinheiro
Rio de Janeiro - Brasil