SerialDeviceCodes.h

Go to the documentation of this file.
00001 /*#############################################################################
00002 ##                     #                                                     ##
00003 ## SerialDeviceCodes.h #  WIN32 - DeviceServices - SerialDevice  header file ##
00004 ##                     #                                                     ##
00005 ###############################################################################
00006 ##                                                                           ##
00007 ##           Copyright (c) 1995-2005 bbv Software Services Ltd.              ##
00008 ##                                                                           ##
00009 ## ************************************************************************* ##
00010 ##                                                                           ##
00011 ## The authors hereby grant permission to use, copy, modify, distribute,     ##
00012 ## and license this software and its documentation for any purpose, provided ##
00013 ## that existing copyright notices are retained in all copies and that this  ##
00014 ## notice and the following disclaimer are included verbatim in any          ##
00015 ## distributions. No written agreement, license, or royalty fee is required  ##
00016 ## for any of the authorized uses.                                           ##
00017 ##                                                                           ##
00018 ## All advertising materials mentioning features or use of this software     ##
00019 ## must display the following acknowledgement:                               ##
00020 ## This product includes software developed by bbv Software Services.        ##
00021 ##                                                                           ##
00022 ## The name of the company may not be used to endorse or promote products    ##
00023 ## derived from this software without specific prior written permission.     ##
00024 ##                                                                           ##
00025 ## ************************************************************************* ##
00026 ##                                                                           ##
00027 ## THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR  ##
00028 ## IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ##
00029 ## OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.   ##
00030 ## IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,    ##
00031 ## INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT  ##
00032 ## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ##
00033 ## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY     ##
00034 ## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT       ##
00035 ## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF  ##
00036 ## THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.         ##
00037 ##                                                                           ##
00038 #############################################################################*/
00039 
00040 #ifndef SERIAL_DEVICE_CODES_WIN32_H
00041 #define SERIAL_DEVICE_CODES_WIN32_H
00042 
00043 #include "ApparatusFramework/KernelServices/KeSeDecl.h"
00044 #include "ApparatusFramework/DeviceServices/SerialPortIf.h"
00045 
00046 #ifndef OLD_CPP
00047 namespace ApparatusFramework {
00048 #endif  // OLD_CPP
00049 
00055 const uint16 SERIAL_DEVICE_NR_OF_BAUDRATES  = SP_NR_OF_BAUDRATES; 
00056 const uint32 SERIAL_DEVICE_BAUD_110         = SPBR_110;           
00057 const uint32 SERIAL_DEVICE_BAUD_300         = SPBR_300;           
00058 const uint32 SERIAL_DEVICE_BAUD_600         = SPBR_600;           
00059 const uint32 SERIAL_DEVICE_BAUD_1200        = SPBR_1200;          
00060 const uint32 SERIAL_DEVICE_BAUD_2400        = SPBR_2400;          
00061 const uint32 SERIAL_DEVICE_BAUD_4800        = SPBR_4800;          
00062 const uint32 SERIAL_DEVICE_BAUD_9600        = SPBR_9600;          
00063 const uint32 SERIAL_DEVICE_BAUD_14400       = SPBR_14400;         
00064 const uint32 SERIAL_DEVICE_BAUD_19200       = SPBR_19200;         
00065 const uint32 SERIAL_DEVICE_BAUD_38400       = SPBR_38400;         
00066 const uint32 SERIAL_DEVICE_BAUD_56000       = SPBR_56000;         
00067 const uint32 SERIAL_DEVICE_BAUD_57600       = SPBR_57600;         
00068 const uint32 SERIAL_DEVICE_BAUD_115200      = SPBR_115200;        
00069 const uint32 SERIAL_DEVICE_BAUD_128000      = SPBR_128000;        
00070 const uint32 SERIAL_DEVICE_BAUD_256000      = SPBR_256000;         // end of Baudrate
00072 
00078 const uint16 SERIAL_DEVICE_NR_OF_PARITY_TYPES = SP_NR_OF_PARITY_TYPES;  
00079 const uint8 SERIAL_DEVICE_NOPARITY            = SP_NOPARITY;            
00080 const uint8 SERIAL_DEVICE_ODDPARITY           = SP_ODDPARITY;           
00081 const uint8 SERIAL_DEVICE_EVENPARITY          = SP_EVENPARITY;          
00082 const uint8 SERIAL_DEVICE_MARKPARITY          = SP_MARKPARITY;          
00083 const uint8 SERIAL_DEVICE_SPACEPARITY         = SP_SPACEPARITY;          // end of Parity
00085 
00091 const uint16 SERIAL_DEVICE_NR_OF_STOPBIT_TYPES  = SP_NR_OF_STOPBIT_TYPES; 
00092 const uint8 SERIAL_DEVICE_ONESTOPBIT            = SP_ONESTOPBIT;          
00093 const uint8 SERIAL_DEVICE_ONE5STOPBITS          = SP_ONE5STOPBITS;        
00094 const uint8 SERIAL_DEVICE_TWOSTOPBITS           = SP_TWOSTOPBITS;          // end of Stopbit
00096 
00102 const uint32 SERIAL_DEVICE_INFINITE = SP_INFINITE;  
00103 const uint32 SERIAL_DEVICE_HUNDRED  = SP_HUNDRED;   
00104 const uint32 SERIAL_DEVICE_THOUSAND = SP_THOUSAND;   // end of Timeouts
00106 
00112 const uint8 SERIAL_DEVICE_WORD_LENGTH_7 = 7;  
00113 const uint8 SERIAL_DEVICE_WORD_LENGTH_8 = 8;   // end of CharacterSize
00115 
00118 enum SerialDeviceIoCtlCmdEnum
00119 {
00120   SERIAL_DEVICE_SET_BAUDRATE,   
00121   SERIAL_DEVICE_SET_CHAR_SIZE,  
00122   SERIAL_DEVICE_SET_PARITY,     
00123   SERIAL_DEVICE_SET_STOP_BITS,  
00124   SERIAL_DEVICE_ENABLE_DUPLEX,   
00126   SERIAL_DEVICE_SET_COMPORT   
00127 };
00128 
00132 enum SerialDeviceRetVal {
00133   SERIAL_DEVICE_INVALID_PARAMETER             = -512,
00134   SERIAL_DEVICE_GET_COMM_STATE_FAILED         = -513,
00135   SERIAL_DEVICE_SET_COMM_STATE_FAILED         = -514,
00136   SERIAL_DEVICE_GET_COMM_TIMEOUTS_FAILED      = -515,
00137   SERIAL_DEVICE_SET_COMM_TIMEOUTS_FAILED      = -516,
00138   SERIAL_DEVICE_SET_COMM_MASK_FAILED          = -517,
00139   SERIAL_DEVICE_EMPTY_BUFFERS_FAILED          = -518,
00140   SERIAL_DEVICE_START_COMM_THREAD_FAILED      = -519,
00141   SERIAL_DEVICE_NO_COMM_DEVICE                = -520,
00142   SERIAL_DEVICE_RESTORE_COMM_STATE_FAILED     = -521,
00143   SERIAL_DEVICE_RESTORE_COMM_TIMEOUTS_FAILED  = -522,
00144   SERIAL_DEVICE_WAIT_COMM_EVENT_FAILED        = -523,
00145   SERIAL_DEVICE_READ_FILE_FAILED              = -524,
00146   SERIAL_DEVICE_TRANSFERRED_BYTES_INCORRECT   = -525,
00147   SERIAL_DEVICE_WRITE_FILE_FAILED             = -526,
00148   SERIAL_DEVICE_FATAL_ERROR                   = -527,
00149   SERIAL_DEVICE_STILL_WRITING                 = -528,
00150   SERIAL_DEVICE_INPUT_BUFFER_FULL             = -529,
00151   SERIAL_DEVICE_OUTPUT_BUFFER_FULL            = -530,
00152   SERIAL_DEVICE_INPUT_BUFFER_NOT_ENOUGH_DATA  = -531,
00153   SERIAL_DEVICE_SETUP_COMM_FAILED             = -532
00154 };
00155 
00156 #ifndef OLD_CPP
00157 };
00158 #endif  // OLD_CPP
00159 
00160 #endif // SERIAL_DEVICE_CODES_WIN32_H
© 2004-2010 bbv Software Services AG / Apparatus Services