ISerialAdapter.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //-----------------------------------------------------------------------------
  2. // (c) 2009 by DALSA
  3. // Section: Digital Imaging
  4. // Project: CLProtocol
  5. // Author: Eric Bourbonnais
  6. // $Header$
  7. //
  8. // License: This file is published under the license of the EMVA GenICam Standard Group.
  9. // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
  10. // If for some reason you are missing this file please contact the EMVA or visit the website
  11. // (http://www.genicam.org) for a full copy.
  12. //
  13. // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
  14. // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  15. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  16. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
  17. // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  18. // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  19. // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  20. // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  21. // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  22. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  23. // POSSIBILITY OF SUCH DAMAGE.
  24. //-----------------------------------------------------------------------------
  25. /*!
  26. \file
  27. */
  28. #ifndef CLPROTOCOL_ISERIALADAPTER_H
  29. #define CLPROTOCOL_ISERIALADAPTER_H
  30. #include <CLProtocol\CLProtocol.h>
  31. #include <CLProtocol\ISerial.h>
  32. namespace CLProtocol
  33. {
  34. struct CLPROTOCOL_DECL ISerialAdapter : public ISerial
  35. {
  36. //! Opens the port
  37. virtual CLINT32 SerialInit( void) = 0;
  38. //! Closes the port
  39. virtual void SerialClose( void) = 0;
  40. //! throws an exception if the ErrorCode describes an error
  41. virtual void CheckError(
  42. CLINT32 ErrorCode //!< The error code to validate. If at he error is found,
  43. ) = 0; //!< A CLErrException will be thrown.
  44. };
  45. }
  46. #endif // CLPROTOCOL_ISERIALADAPTER_H