Wid110LibConst.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // ============================================================================
  2. // Copyright (c) 2010 IOSS GmbH
  3. // All Rights Reserved.
  4. // ============================================================================
  5. // ============================================================================
  6. //
  7. // Wid110LibConst - WID110 C# based library constants
  8. //
  9. // ============================================================================
  10. //
  11. // File: Wid110LibConst.cs Type: Implementation
  12. //
  13. // Date: 09.02.2010 Last Change: 09.11.2011
  14. //
  15. // Author: Thomas M. Schlageter
  16. // Silvio Robel
  17. //
  18. // Methods: none
  19. //
  20. // ============================================================================
  21. using System;
  22. using System.Collections.Generic;
  23. using System.Linq;
  24. namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.OcrReaders.IOSS
  25. {
  26. static partial class Wid110LibConstV7
  27. {
  28. // ====================================================================
  29. /// <summary>
  30. /// Constants that should be used overall WID110 library software.
  31. /// </summary>
  32. // ====================================================================
  33. // local system resources
  34. //
  35. public static string tmpImage = "C:\\testImage_WidLib.bmp";
  36. // return values: these must correspond with 'WID110Dll.h'
  37. // these are return values only for c-function calls
  38. //
  39. // function executed sucessfully
  40. public const int rcNoError = 1; // RETVAL_NO_ERROR
  41. // function failed, calls to FGetLastError()
  42. // and FGetErrorDescription() possible
  43. public const int rcError = 0; // RETVAL_ERROR
  44. // function parameter contained invalid lib handle, call
  45. // to FGetErrorDescription() possible
  46. public const int rcInvObj = -1; // RETVAL_INV_OBJ
  47. // error codes: these must correspond with 'WID110Dll.h'
  48. // these are values for internal lib errors returned by FGetLastError()
  49. // an error description can be retrieved by calling FGetErrorDescription()
  50. //
  51. public static int ecInvObj = -1; // RETVAL_INV_OBJ
  52. public static int ecNone = 0; // ERROR_NONE
  53. public static int ecNotInit = 1; // ERROR_NOT_INIT
  54. public static int ecNotFound = 2; // ERROR_READER_NOTFOUND
  55. public static int ecNetInit = 3; // ERROR_NETWORK_INIT
  56. public static int ecNetIP = 4; // ERROR_NETWORK_IP
  57. public static int ecNetSend = 5; // ERROR_NETWORK_SEND
  58. public static int ecNetRecv = 6; // ERROR_NETWORK_RECEIVE
  59. public static int ecFileName = 7; // ERROR_FILENAME
  60. public static int ecImgSave = 8; // ERROR_IMG_SAVE
  61. public static int ecParLoad = 9; // ERROR_PARAM_LOAD
  62. public static int ecNoProcTrg = 10; // ERROR_NO_PROC_TRIGGERSTR
  63. public static int ecArgBufSz = 11; // ERROR_ARGBUFFERSIZE
  64. public static int ecNoFailSt = 12; // ERROR_NO_FAILSTR
  65. public static int ecNoMoreImg = 13; // ERROR_NO_MORE_IMAGES
  66. public static int ecNoResult = 14; // ERROR_NO_VALID_RESULT
  67. public static int ecNoImage = 15; // ERROR_NO_VALID_IMAGE
  68. public static int ecNoTrgStr = 16; // ERROR_NO_TRIGGERSTRING
  69. public static int ecNoVersPar = 17; // ERROR_VERSION_PARAMETERSET
  70. public static int ecPOutOfRng = 18; // ERROR_PARAMETER_OUTOFRANGE
  71. public static int ecNetTrig = 19; // ERROR_NET_TRIGGERING
  72. // parameter values for FProcessGetImage(type)
  73. // these must correspond with 'WID110Dll.h'
  74. //
  75. public static int pvImgBest = 0; // IMG_PROCESS_BEST
  76. public static int pvImgAll = 1; // IMG_PROCESS_ALL
  77. // dummy results
  78. //
  79. public static string rsltFAIL = "fail";
  80. public static string rsltOK = "OK";
  81. public static string rsltERROR = "no read result";
  82. public static string rsltBLANK = " ";
  83. public static string rsltREAD = "READ: ";
  84. public static string rsltNOREAD = "NOREAD: ";
  85. // return value for FGetCodeQualityX()
  86. // if there is no quality retrieved, call GetLastError() then
  87. public static int rsltNoCodeQuality = -1;
  88. // return value for FGetCodeTime()
  89. // if there is no time retrieved, call GetLastError() then
  90. public static int rsltNoCodeTime = -1;
  91. // dummy error messages
  92. //
  93. public static string errNO = "no error";
  94. public static string errDESC = "ERROR; no error description";
  95. // string buffer sizes
  96. //
  97. public static int errLen = 256;
  98. public static int versLenCS = 63;
  99. public static int versLenC = versLenCS + 1;
  100. public static int rsltLenCS = 259;
  101. public static int rsltLenC = rsltLenCS + 1;
  102. }
  103. }