/// <summary>
        /// GetVersion<br>
        /// [Description]<br>
        /// none<br>
        /// [Notes]<br> </summary>
        /// <param name="inTimeOutTime"> timeout time<br> </param>
        /// <param name="outStatus"> response code<br> </param>
        public virtual int GetVersion(int inTimeOutTime, byte[] outStatus, HVC_VER ver)
        {
            int nRet = 0;

            int[]  nSize = { 0 };
            byte[] sendData;
            byte[] recvData;

            sendData = new byte[32];
            recvData = new byte[32];

            /* Send GetVersion command signal*/
            nRet = SendCommand(HVC_COM_GET_VERSION, 0, sendData);
            if (nRet != 0)
            {
                return(nRet);
            }

            /* Receive header */
            nRet = ReceiveHeader(inTimeOutTime, nSize, outStatus);
            if (nRet != 0)
            {
                return(nRet);
            }

            if (nSize[0] > ver.GetSize())
            {
                nSize[0] = ver.GetSize();
            }

            /* Receive data */
            nRet = ReceiveData(inTimeOutTime, nSize[0], recvData);
            for (int i = 0; i < ver.Version.Length; i++)
            {
                ver.Version[i] = (char)recvData[i];
            }
            ver.Major  = recvData[ver.Version.Length];
            ver.Minor  = recvData[ver.Version.Length + 1];
            ver.Relese = recvData[ver.Version.Length + 2];
            ver.Rev    = recvData[ver.Version.Length + 3] +
                         (recvData[ver.Version.Length + 4] << 8) +
                         (recvData[ver.Version.Length + 5] << 16) +
                         (recvData[ver.Version.Length + 6] << 24);
            return(nRet);
        }
        //ORIGINAL LINE: @Override public int getVersion(final HVC_VER ver)
        public async override Task <int> GetVersion(HVC_VER ver)
        {
            if (BtDevice == null)
            {
                Debug.WriteLine(TAG, "getParam() : HVC_ERROR_NODEVICES");
                return(HVC_ERROR_NODEVICES);
            }
            if (Service == null || Service.GetmConnectionState() != BleDeviceService.STATE_CONNECTED)
            {
                Debug.WriteLine(TAG, "getParam() : HVC_ERROR_DISCONNECTED");
                return(HVC_ERROR_DISCONNECTED);
            }
            if (Status > STATE_CONNECTED)
            {
                Debug.WriteLine(TAG, "getParam() : HVC_ERROR_BUSY");
                return(HVC_ERROR_BUSY);
            }

            Status = STATE_BUSY;

            await Task.Run(() =>
            {
                int nRet         = HVC_NORMAL;
                byte[] outStatus = new byte[1];
                if (nRet == HVC_NORMAL)
                {
                    nRet = GetVersion(10000, outStatus, ver);
                }
                if (Callback != null)
                {
                    Callback.OnPostGetVersion(nRet, outStatus[0]);
                }

                if (Status == STATE_BUSY)
                {
                    Status = STATE_CONNECTED;
                }
            });

            Debug.WriteLine(TAG, "getVersion() : HVC_NORMAL");
            return(HVC_NORMAL);
        }
 public abstract Task <int> GetVersion(HVC_VER ver);