Esempio n. 1
0
 public Int32 TmcConnect(string server,
                         string pipe,
                         string user,
                         TmNativeCallback callback,
                         IntPtr callbackParameter)
 {
     return(tmcConnect(server, pipe, user, callback, callbackParameter));
 }
 public static extern IntPtr tmcAanReadArchive(Int32 cid,
                                               UInt32 tmAddr,
                                               UInt32 startUnixTime,
                                               UInt32 endUnixTime,
                                               UInt32 step,
                                               UInt32 flags,
                                               out UInt32 count,
                                               [MarshalAs(UnmanagedType.FunctionPtr)] TmNativeCallback progress,
                                               IntPtr progressParam);
 public static extern Int32 tmcConnectEx(string server,
                                         string pipe,
                                         string user,
                                         [MarshalAs(UnmanagedType.FunctionPtr)] TmNativeCallback callback,
                                         IntPtr callbackParameter,
                                         UInt32 cbProps,
                                         [MarshalAs(UnmanagedType.LPArray, SizeConst = 8)]
                                         UInt32[] pProps,
                                         [MarshalAs(UnmanagedType.LPArray, SizeConst = 8)]
                                         UInt32[] pPropValues);
Esempio n. 4
0
 public Int32 TmcConnectEx(string server,
                           string pipe,
                           string user,
                           TmNativeCallback callback,
                           IntPtr callbackParameter,
                           UInt32 propsCount,
                           UInt32[]         pProps,
                           UInt32[]         pPropValues)
 {
     return(tmcConnectEx(server, pipe, user, callback, callbackParameter, propsCount, pProps, pPropValues));
 }
Esempio n. 5
0
        public static int DeltaConnect(string host,
                                       string serverName,
                                       string applicationName,
                                       TmNativeCallback callback,
                                       IntPtr callbackParameter)
        {
            var props       = new uint[] { 1 }; //Props code 1 - datagram buffer size
            var propsValues = new uint[] { 1 }; //Props code 1 value = 1 MB

            return(ConnectExplicit(host, serverName, applicationName, callback, callbackParameter, 1, props, propsValues));
        }
Esempio n. 6
0
 public IntPtr TmcAanReadArchive(Int32 cid,
                                 UInt32 tmAddr,
                                 UInt32 startUnixTime,
                                 UInt32 endUnixTime,
                                 UInt32 step,
                                 UInt32 flags,
                                 out UInt32 count,
                                 TmNativeCallback progress,
                                 IntPtr progressParam)
 {
     return(tmcAanReadArchive(cid, tmAddr, startUnixTime, endUnixTime, step, flags,
                              out count, progress, progressParam));
 }
Esempio n. 7
0
        public static int Connect(string host,
                                  string serverName,
                                  string applicationName,
                                  TmNativeCallback callback,
                                  IntPtr callbackParameter)
        {
            var tmCid = Native.TmcConnect(host, serverName, applicationName, callback, callbackParameter);

            if (!IsConnected(tmCid))
            {
                tmCid = 0;
            }
            else
            {
                RegisterDatagramFlags(tmCid, TmDatagramFlags.NewClient);
            }

            return(tmCid);
        }
Esempio n. 8
0
        public static int ConnectExplicit(string host,
                                          string serverName,
                                          string applicationName,
                                          TmNativeCallback callback,
                                          IntPtr callbackParameter,
                                          int propsCount,
                                          uint[]           props,
                                          uint[]           propsValues)
        {
            var tmCid = Native.TmcConnectEx(host, serverName, applicationName, callback,
                                            callbackParameter, (uint)propsCount, props, propsValues);

            if (!IsConnected(tmCid))
            {
                tmCid = 0;
            }
            else
            {
                RegisterDatagramFlags(tmCid, TmDatagramFlags.NewClient);
            }


            return(tmCid);
        }
 public static extern Int32 tmcConnect(string server,
                                       string pipe,
                                       string user,
                                       [MarshalAs(UnmanagedType.FunctionPtr)] TmNativeCallback callback,
                                       IntPtr callbackParameter);