//---------------------------------------------------------------------------- // com485.hpp - dcc32 generated hdr (DO NOT EDIT) rev: 0 // From: com485.pas //---------------------------------------------------------------------------- #ifndef com485HPP #define com485HPP //---------------------------------------------------------------------------- #include #include #include #include #include #include #include namespace Com485 { //-- type declarations ------------------------------------------------------- class __declspec(delphiclass) TCom485; class __declspec(pascalimplementation) TCom485 : public Classes::TComponent { typedef Classes::TComponent inherited; private: long hPort; int nPort; long lBaud; System::ShortString sInTerminator; bool boolExpired; bool boolShowErrors; bool boolInUse; bool writing; Classes::TNotifyEvent pmOnTimeout; void __fastcall SetTimeout(long lTimeout); long __fastcall GetTimeout(void); void __fastcall SetBaud(long lBaudToSet); void __fastcall SetPort(int nPortToSet); long __fastcall GetInCount(void); void __fastcall ErrorShowMessage(const System::AnsiString s); void __fastcall ErrorShowDebug(const System::AnsiString s); public: Kerrors::TCommErrors* Errors; bool __fastcall IsOpen(void); __fastcall virtual TCom485(Classes::TComponent* AOwner); __fastcall virtual ~TCom485(void); bool __fastcall Open(void); bool __fastcall Write(const System::ShortString &sData); System::ShortString __fastcall Read(void); System::ShortString __fastcall ReadN(int n); System::ShortString __fastcall ReadThis(const System::ShortString &s); System::ShortString __fastcall ReadOne(void); void __fastcall Flush(void); void __fastcall Close(void); __published: __property long ResponseTime = {read=GetTimeout, write=SetTimeout, nodefault}; __property Classes::TNotifyEvent OnTimeout = {read=pmOnTimeout, write=pmOnTimeout}; __property bool TimedOut = {read=boolExpired, nodefault}; __property long Baud = {read=lBaud, write=SetBaud, nodefault}; __property int Port = {read=nPort, write=SetPort, nodefault}; __property long InCount = {read=GetInCount, nodefault}; __property System::ShortString EndOfResponse = {read=sInTerminator, write=sInTerminator}; __property bool ShowErrors = {read=boolShowErrors, write=boolShowErrors, nodefault}; __property bool Opened = {read=IsOpen, nodefault}; __property bool InUse = {read=boolInUse, nodefault}; }; //-- var, const, procedure --------------------------------------------------- extern void __fastcall Register(void); } /* namespace Com485 */ #if !defined(NO_IMPLICIT_NAMESPACE_USE) using namespace Com485; #endif //-- end unit ---------------------------------------------------------------- #endif // com485