FEDM_ISCFunctionUnit.h
Go to the documentation of this file.
00001 /*-------------------------------------------------------
00002 |                                                       |
00003 |                 FEDM_ISCFunctionUnit.h                |
00004 |                                                       |
00005 ---------------------------------------------------------
00006 
00007 Copyright © 2005-2008   FEIG ELECTRONIC GmbH, All Rights Reserved.
00008                                                 Lange Strasse 4
00009                                                 D-35781 Weilburg
00010                                                 Federal Republic of Germany
00011                                                 phone    : +49 6471 31090
00012                                                 fax      : +49 6471 310999
00013                                                 e-mail   : obid-support@feig.de
00014                                                 Internet : http://www.feig.de
00015                                         
00016 Author                  :       Markus Hultsch
00017 Begin                   :       05.01.2005
00018 
00019 Version                 :       03.00.00 / 02.04.2008 / M. Hultsch
00020 
00021 Operation Systems       :       Windows 9x/ME/NT/2000/XP/Linux/WindowsCE
00022 
00023 Function                        :       classes for OBID i-scan® function units
00024 
00025 
00026 Trademarks:
00027 -----------
00028 OBID®, OBID i-scan® and OBID myAXXESS® are registered Trademarks of FEIG ELECTRONIC GmbH
00029 Other Trademarks: see FEDM.h
00030 */
00031 
00032 #if !defined(_FEDM_ISC_FUNCTION_UNIT_H_INCLUDED_)
00033 #define _FEDM_ISC_FUNCTION_UNIT_H_INCLUDED_
00034 
00035 #ifdef _MSC_VER
00036         // The (microsoft) debugger can't handle symbols more than 255 characters long.
00037         // STL often creates symbols longer than that.
00038         // When symbols are longer than 255 characters, the warning is disabled.
00039         #pragma warning(disable:4786)   // for MFC
00040 #endif
00041 
00042 
00043 #if !defined(_FEDM_NO_FU_SUPPORT)
00044 
00045 #include "../../FEDM_Base.h"
00046 #include <vector>
00047 
00048 class FEDM_ISCReader;
00049 class FEDM_ISCFunctionUnit;
00050 
00051 
00052 // STL - Standard Template Library
00053 using namespace std;
00054 
00055 
00056 //#####################################################################################
00057 // constants
00058 //#####################################################################################
00059                 
00060 // size of memories in bytes
00061 #define FEDM_ISC_FU_MAX_TMPDATA_MEM             128     // memory for temporary data
00062 
00063                 
00064 // function unit HF types
00065 #define FEDM_ISC_FU_TYPE_NONE           0x00
00066 #define FEDM_ISC_FU_TYPE_ANT            0x01
00067 #define FEDM_ISC_FU_TYPE_MUX            0x0A
00068 #define FEDM_ISC_FU_TYPE_DAT            0x0B
00069 
00070 // function unit UHF types
00071 #define FEDM_ISC_FU_TYPE_UMUX           0x0C
00072 
00073 
00074 
00075 //#####################################################################################
00076 // type definitions
00077 //#####################################################################################
00078                 
00079 typedef vector<FEDM_ISCFunctionUnit*>                           FEDM_FU_ARRAY;
00080 typedef vector<FEDM_ISCFunctionUnit*>::iterator         FEDM_FU_ARRAY_ITOR;
00081 
00082 
00083 
00084 //####################################################################
00085 // class FEDM_ISCFunctionUnit
00086 //####################################################################
00087 
00088 class _FEDM_ISC_CORE_EXT_CLASS FEDM_ISCFunctionUnit
00089 {
00090 // public functions
00091 public:
00092 
00093         // constructor
00094         FEDM_ISCFunctionUnit(FEDM_ISCReader* pReader, int iFUType = FEDM_ISC_FU_TYPE_NONE);
00095 
00096         // destructor
00097         virtual ~FEDM_ISCFunctionUnit();
00098 
00099         // get/set function unit type, which controlls internal operations
00100         int GetFUType();
00101         int SetFUType(int iFUType);
00102 
00103         // get/set antenna number
00104         unsigned int GetAntNo();
00105         void SetAntNo(unsigned int uiAntNo);
00106 
00107         // manage functions for wrapper classes
00108         int SetModuleHnd(int iHandle);
00109         int GetModuleHnd();
00110 
00111         // function to control the child management
00112         // if parameter is:
00113         // true (default)       - the parent FU can physically delete the child FUs
00114         // false                        - the application must physically delete the child FUs
00115         void SetManageChildMode(bool bDeleteInternal);
00116 
00117         FEDM_ISCReader* GetReader();
00118 
00119         // main communication function
00120         int SendProtocol(unsigned char ucCmdByte);
00121 
00122         // get the last error code
00123         int GetLastError();
00124         // get the last status byte
00125         unsigned char GetLastStatus();
00126         
00127         // get error text
00128         int GetErrorText(char* cErrorText, int iErrorCode);
00129         // get status text
00130         int GetStatusText(char* cStatusText, unsigned char ucStatus);
00131 
00132         // functions for child list
00133         int AddChild(int iOutNo, FEDM_ISCFunctionUnit* pFU);
00134         int DelChild(int iOutNo);
00135         int DelChildList();
00136         int GetChildCount();
00137         FEDM_ISCFunctionUnit* GetChild(int iOutNo);
00138 
00139 
00140         // main access functions
00141         int GetData( char* ID, bool* Data );
00142 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00143         int GetData( char* ID, BOOL* Data );
00144 #endif
00145         int GetData( char* ID, unsigned char* Data );
00146         int GetData( char* ID, unsigned char* Data, int ParaAnz );
00147         int GetData( char* ID, unsigned int* Data );
00148         int GetData( char* ID, __int64* Data);
00149 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00150         int GetData( char* ID, CString& Data );
00151 #endif
00152         int GetData( char* ID, string& Data );
00153         int GetData( char* ID, char* Data, int DataLen );
00154 
00155         int SetData( char* ID, bool Data );
00156 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00157         int SetData( char* ID, BOOL Data );
00158 #endif
00159         int SetData( char* ID, unsigned char Data );
00160         int SetData( char* ID, unsigned char* Data, int ParaAnz );
00161         int SetData( char* ID, unsigned int Data );
00162         int SetData( char* ID, __int64 Data);
00163 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00164         int SetData( char* ID, CString Data );
00165 #endif
00166         int SetData( char* ID, string Data );
00167         int SetData( char* ID, char* Data, int DataLen );
00168 
00169 
00170 // protected functions
00171 protected:
00172         void SetLastError(int iError);
00173 
00174 
00175 // public data
00176 public:
00177         // memories (block-organized; data in Motorolas "Big Endian" format)
00178         // ### for temporary Data
00179         FEDM_BYTE_ARRAY TmpData;
00180 
00181 // protected data
00182 protected:
00183         // reader for communication
00184         FEDM_ISCReader* m_pReader;
00185 
00186         // alternatively: parameters for FEISC library
00187         int m_iReaderHnd;
00188         unsigned char m_ucBusAdr;
00189 
00190         int m_iLastError;
00191         unsigned char m_ucLastStatus;
00192 
00193         bool m_bManageChilds;
00194 
00195         int m_iFUType;
00196         FEDM_FU_ARRAY   m_ChildList;
00197 
00198         unsigned int m_uiAntNo; // antenna number only for FU-Type FEDM_ISC_FU_TYPE_ANT
00199 
00200         // module handle for internal use
00201         int m_iModuleHandle;
00202 };
00203 
00204 
00205 #endif // #if !defined(_FEDM_NO_FU_SUPPORT)
00206 
00207 #endif // !defined(_FEDM_ISC_FUNCTION_UNIT_H_INCLUDED_)


rfid_drivers
Author(s): Raul Perula-Martinez
autogenerated on Thu Apr 2 2015 03:06:12