Example #1
0
        public int GetPropertys(int[] iv, ref string Result)
        {
            int handle   = 0;
            int tagcount = iv.Length;

            if (0 != Connect(ref handle))
            {
                return(SOAP_FAULT);
            }

            _RT_POINT[]      bas    = new _RT_POINT[tagcount];
            _RT_SCAN_POINT[] scan   = new _RT_SCAN_POINT[tagcount];
            _RT_CALC_POINT[] calc   = new _RT_CALC_POINT[tagcount];
            uint[]           errors = new uint[tagcount];
            for (int i = 0; i < tagcount; i++)
            {
                bas[i].id  = iv[i];
                scan[i].id = iv[i];
                calc[i].id = iv[i];
            }

            int _result = RTb_get_points_property(handle, tagcount, bas, scan, calc, errors);

            if (0 != _result)
            {
                return(SOAP_FAULT);
            }

            for (int i = 0; i < tagcount; i++)
            {
                //Result += Encoding.Default.GetString(bas[i].tag).Replace('\0', ' ').Trim() + "," + Encoding.Default.GetString(bas[i].desc).Replace('\n', ' ').Replace('\0', ' ').Replace('', ' ').Trim() + "," + bas[i].highlimit.ToString() + "," + bas[i].lowlimit.ToString() + "," + bas[i].table.ToString() + "," + bas[i].typical.ToString() + "," + (int)bas[i].type + "," + Encoding.Default.GetString(bas[i].unit).Replace('\0', ' ').Trim() + "|";
            }
            Result = Result.Remove(Result.Length - 1);

            return(SOAP_OK);
        }
Example #2
0
        public int GetPropertys(int[] iv, ref string Result)
        {
            int handle = 0;
            int tagcount = iv.Length;
            if (0 != Connect(ref handle))
            {
                return SOAP_FAULT;
            }

            _RT_POINT[] bas = new _RT_POINT[tagcount];
            _RT_SCAN_POINT[] scan = new _RT_SCAN_POINT[tagcount];
            _RT_CALC_POINT[] calc = new _RT_CALC_POINT[tagcount];
            uint[] errors = new uint[tagcount];
            for (int i = 0; i < tagcount; i++)
            {
                bas[i].id = iv[i];
                scan[i].id = iv[i];
                calc[i].id = iv[i];
            }

            int _result = RTb_get_points_property(handle, tagcount, bas, scan, calc, errors);
            if (0 != _result)
            {
                return SOAP_FAULT;
            }

            for (int i = 0; i < tagcount; i++)
            {
                //Result += Encoding.Default.GetString(bas[i].tag).Replace('\0', ' ').Trim() + "," + Encoding.Default.GetString(bas[i].desc).Replace('\n', ' ').Replace('\0', ' ').Replace('', ' ').Trim() + "," + bas[i].highlimit.ToString() + "," + bas[i].lowlimit.ToString() + "," + bas[i].table.ToString() + "," + bas[i].typical.ToString() + "," + (int)bas[i].type + "," + Encoding.Default.GetString(bas[i].unit).Replace('\0', ' ').Trim() + "|";
            }
            Result = Result.Remove(Result.Length - 1);

            return SOAP_OK;
        }
Example #3
0
 public int GetPointsProperty(int handle, int count, _RT_POINT[] bas, _RT_SCAN_POINT[] scan, _RT_CALC_POINT[] calc, uint[] errors)
 {
     return RTb_get_points_property(handle, count, bas, scan, calc, errors);
 }