/****************************************************************************** |* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF |* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |* PARTICULAR PURPOSE. |* |* Copyright 1995-2005 Nero AG. All Rights Reserved. |*----------------------------------------------------------------------------- |* NeroSDK / NeroRobo |* |* PROGRAM: CCOMSerial.h |* |* PURPOSE: Interface for serial (COM) port communication ******************************************************************************/ /* Serial interface for PC COM Ports. * This is an extension to the CSerial interface to allow * some COM Port specific configuration for interfaces * returning the type PORT_SERIAL at runtime */ #ifndef CCOMSERIAL_H #define CCOMSERIAL_H #include "CSerial.h" class CCOMSerial :public CSerial { public: typedef enum { CPARITY_EVEN, CPARITY_MARK, CPARITY_NO, CPARITY_ODD, CPARITY_SPACE } ParitySettings; typedef enum { STOPBITS_ONE, STOPBITS_ONEP5, STOPBITS_TWO } StopBitSettings; /* Adjust the configuration of the serial interface. Specify: * - iBaudRate: the baud rate at which the communication device operates * - iDataBits: specifies the number of bits in the bytes transmitted and received * - psParity: specifies the parity scheme to be used. It is one values above * - sbStopBits: specifies the number of stop bits to be used. It is one values above * Returns TRUE on success. * WARNING! Must not be called when port is open */ virtual BOOL SetConfiguration(int iBaudRate, int iDataBits, ParitySettings psParity, StopBitSettings sbStopBits) = 0; virtual SerialPortType GetPortType() { return PORT_SERIAL; }; }; #endif // CCOMSERIAL_H