public override bool ReceiveFrequent(out byte[] receiveData)
 {
     receiveData = null;
     if (CommParameterProtected == null)
     {
         EdiabasProtected.SetError(EdiabasNet.ErrorCodes.EDIABAS_IFH_0006);
         return(false);
     }
     receiveData = ByteArray0;
     return(true);
 }
        public override bool TransmitData(byte[] sendData, out byte[] receiveData)
        {
            receiveData = null;
            if (CommParameterProtected == null)
            {
                EdiabasProtected.SetError(EdiabasNet.ErrorCodes.EDIABAS_IFH_0006);
                return(false);
            }
            EdiabasNet.ErrorCodes cachedErrorCode;
            byte[] cachedResponse;
            if (ReadCachedTransmission(sendData, out cachedResponse, out cachedErrorCode))
            {
                if (cachedErrorCode != EdiabasNet.ErrorCodes.EDIABAS_ERR_NONE)
                {
                    EdiabasProtected.SetError(cachedErrorCode);
                    return(false);
                }
                receiveData = cachedResponse;
                return(true);
            }
            if (ReconnectRequired)
            {
                InterfaceDisconnect();
                if (!InterfaceConnect())
                {
                    ReconnectRequired = true;
                    EdiabasProtected.SetError(EdiabasNet.ErrorCodes.EDIABAS_IFH_0003);
                    return(false);
                }
            }
            int recLength;

            EdiabasNet.ErrorCodes errorCode = ObdTrans(sendData, sendData.Length, ref RecBuffer, out recLength);
            if (errorCode != EdiabasNet.ErrorCodes.EDIABAS_ERR_NONE)
            {
                if (errorCode == EdiabasNet.ErrorCodes.EDIABAS_IFH_0003)
                {
                    ReconnectRequired = true;
                }
                CacheTransmission(sendData, null, errorCode);
                EdiabasProtected.SetError(errorCode);
                return(false);
            }
            receiveData = new byte[recLength];
            Array.Copy(RecBuffer, receiveData, recLength);
            CacheTransmission(sendData, receiveData, EdiabasNet.ErrorCodes.EDIABAS_ERR_NONE);
            return(true);
        }