//                           UNCLASSIFIED
/*-------------------------------------------------------------------------
RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION
PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS
AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT. DISCLOSURE TO
UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO
RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS
CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS
OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON
COMPANY.

THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S.
GOVERNMENT.

UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
-------------------------------------------------------------------------*/

using System;

namespace Raytheon.Common
{
   /// <summary>
   /// Defines an interface for specific message parsing routines
   /// used in conjunction with MsgDevice
   /// </summary>
   public interface IMsgParser
   {
      /// <summary>
      /// Will parse data looking for a complete message
      /// </summary>
      /// <param name="pData">The data to parse</param>
      /// <param name="numBytesInPdata">The number of bytes in pData</param>
      /// <param name="bytesToRemove">The data to remove once the parse job is complete</param>
      /// <param name="messageId">The ID of the message that was parsed</param>
      /// <param name="errorCode">optional error codes for a child parser to user</param>
      /// <returns>true if a complete message was found, false otherwise</returns>
      bool Run(IntPtr pData, uint numBytesInPdata, ref uint bytesToRemove, ref uint messageId, ref uint errorCode);
   }
}
