예제 #1
0
        /// <summary>
        /// Retrieve a single element from the state vector, with full safety
        /// checks.  Throws AdapterArgumentException and
        /// AdapterOperationException.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public double Get(int index)
        {
            //try
            //{
            var resp = RSUtils.ReceiveSync <vector.GetElementResponseType>(taskQueue, opPort.GetByIndex(index), Myro.Utilities.Params.defaultRecieveTimeout);

            return(resp.Value);
            //}
            //catch (ArgumentOutOfRangeException)
            //{
            //    throw new AdapterArgumentException(Strings.IndexOutOfBounds(index));
            //}
        }
예제 #2
0
        /// <summary>
        /// Retrieve a single element from the state vector, with full safety
        /// checks.  Throws AdapterArgumentException and
        /// AdapterOperationException.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public double Get(int index)
        {
            var resp = RSUtils.ReceiveSync <vector.GetElementResponseType>(taskQueue, opPort.GetByIndex(index), Myro.Utilities.Params.DefaultRecieveTimeout);

            return(resp.Value);
        }