TwiceAsNice  2019-02-18
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Basda::PdvChat Class Reference

#include <PdvChat.h>

Inheritance diagram for Basda::PdvChat:
Inheritance graph
Collaboration diagram for Basda::PdvChat:
Collaboration graph

Public Member Functions

 PdvChat ()
 constructor More...
 
 PdvChat (const char *_device)
 constructor with devicename edt:CHANNEL:PORT:BAUD or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
 PdvChat (int _fd)
 constructor with file descriptor - only works with non edt cards More...
 
 PdvChat (PdvDev *_dev)
 constructor with file descriptor - only works with non edt cards More...
 
virtual ~PdvChat ()
 constructor with file descriptor More...
 
virtual int open (const char *_device)
 open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
virtual int open ()
 open device with file descriptor More...
 
virtual int open (int _fd)
 open device with file descriptor More...
 
virtual int open (PdvDev *_dev)
 open device with name edt:CARD:CHANNEL:BAUD. More...
 
virtual int sendline (const std::string &_line)
 send line _line More...
 
 PdvChat ()
 constructor More...
 
 PdvChat (const char *_device)
 constructor with devicename edt:CHANNEL:PORT:BAUD or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
 PdvChat (int _fd)
 constructor with file descriptor - only works with non edt cards More...
 
 PdvChat (PdvDev *_dev)
 constructor with file descriptor - only works with non edt cards More...
 
virtual ~PdvChat ()
 constructor with file descriptor More...
 
virtual int open (const char *_device)
 open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
virtual int open ()
 open device with file descriptor More...
 
virtual int open (int _fd)
 open device with file descriptor More...
 
virtual int open (PdvDev *_dev)
 open device with name edt:CARD:CHANNEL:BAUD. More...
 
virtual int sendline (const std::string &_line)
 send line _line More...
 
 PdvChat ()
 constructor More...
 
 PdvChat (const char *_device)
 constructor with devicename edt:CHANNEL:PORT:BAUD or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
 PdvChat (int _fd)
 constructor with file descriptor - only works with non edt cards More...
 
 PdvChat (PdvDev *_dev)
 constructor with file descriptor - only works with non edt cards More...
 
virtual ~PdvChat ()
 constructor with file descriptor More...
 
virtual int open (const char *_device)
 open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
virtual int open ()
 open device with file descriptor More...
 
virtual int open (int _fd)
 open device with file descriptor More...
 
virtual int open (PdvDev *_dev)
 open device with name edt:CARD:CHANNEL:BAUD. More...
 
virtual int sendline (const std::string &_line)
 send line _line More...
 
- Public Member Functions inherited from Nice::ChatLine
 ChatLine ()
 constructor More...
 
 ChatLine (const char *_device)
 constructor with devicename tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
 ChatLine (int _fd)
 constructor with file descriptor More...
 
virtual ~ChatLine ()
 destructor More...
 
virtual int recvline (std::string &_line)
 recv line _line More...
 
int dumpdata ()
 dump data in buffers More...
 
virtual int tryReadlines (const int _max=-1)
 check if you can savly read a line. More...
 
int chat (int _num, const char *_cmd=NULL)
 send line _cmd and wait for _num lines. More...
 
virtual int chat (const char *_rsp, int _max, const char *_cmd=NULL)
 send line _cmd and recv lines until a line _rsp is received or _max lines received. More...
 
virtual int chat (const char *_rsp, const char *_cmd=NULL)
 send line _cmd and recv lines until a line _rsp is received. More...
 
int mprintf (int _num, const char *_cmd=NULL,...)
 send line _cmd with params (like printf) and wait for _num lines. More...
 
int printf (const char *_rsp_fmtstr, const char *_cmd_fmtstr=NULL,...)
 send line _cmd with params (like printf) and recv lines until a line _rsp is received. More...
 
virtual int nprintf (int _max, const char *_rsp_fmtstr, const char *_cmd_fmtstr=NULL,...)
 send line _cmd with params (like printf) and recv lines until a line _rsp is received or _max lines received. More...
 
std::string operator[] (int _num)
 return recvd line number _num More...
 
std::size_t size ()
 return number of recvd lines More...
 
Nice::SeqString srbuffer ()
 
void setLineEnd (const char *_end)
 set the end of a rcvd- and sentline. More...
 
void setLineEndSend (const char *_end)
 the string _end is sent after every raw line. More...
 
void setLineEndRecv (const char *_end)
 characters from the string _end are used to detect the end of the line. More...
 
void setMinLine (int _min_line)
 
 ChatLine ()
 constructor More...
 
 ChatLine (const char *_device)
 constructor with devicename tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
 ChatLine (int _fd)
 constructor with file descriptor More...
 
virtual ~ChatLine ()
 destructor More...
 
virtual int recvline (std::string &_line)
 recv line _line More...
 
int dumpdata ()
 dump data in buffers More...
 
virtual int tryReadlines (const int _max=-1)
 check if you can savly read a line. More...
 
int chat (int _num, const char *_cmd=NULL)
 send line _cmd and wait for _num lines. More...
 
virtual int chat (const char *_rsp, int _max, const char *_cmd=NULL)
 send line _cmd and recv lines until a line _rsp is received or _max lines received. More...
 
virtual int chat (const char *_rsp, const char *_cmd=NULL)
 send line _cmd and recv lines until a line _rsp is received. More...
 
int mprintf (int _num, const char *_cmd=NULL,...)
 send line _cmd with params (like printf) and wait for _num lines. More...
 
int printf (const char *_rsp_fmtstr, const char *_cmd_fmtstr=NULL,...)
 send line _cmd with params (like printf) and recv lines until a line _rsp is received. More...
 
virtual int nprintf (int _max, const char *_rsp_fmtstr, const char *_cmd_fmtstr=NULL,...)
 send line _cmd with params (like printf) and recv lines until a line _rsp is received or _max lines received. More...
 
std::string operator[] (int _num)
 return recvd line number _num More...
 
std::size_t size ()
 return number of recvd lines More...
 
Nice::SeqString srbuffer ()
 
void setLineEnd (const char *_end)
 set the end of a rcvd- and sentline. More...
 
void setLineEndSend (const char *_end)
 the string _end is sent after every raw line. More...
 
void setLineEndRecv (const char *_end)
 characters from the string _end are used to detect the end of the line. More...
 
void setMinLine (int _min_line)
 
- Public Member Functions inherited from Nice::ChatCore
 ChatCore ()
 constructor More...
 
 ChatCore (const char *_device)
 constructor with devicename tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
 ChatCore (int _fd)
 constructor with file descriptor More...
 
virtual ~ChatCore ()
 destructor More...
 
virtual int close ()
 closedevice More...
 
virtual bool isConnected () const
 check if its connected More...
 
virtual int wait (Nice::Time _time)
 wait _time sec for data, returns earlier as soon as data has arrived. More...
 
virtual int openListenSocket (int _port)
 open a listen socket. More...
 
virtual int tryAccept (ChatCore &_newConnection)
 try accepting for X secs. X is set by member setTimeout More...
 
void setTimeout (Nice::Time _t)
 set read timeout in seconds, -1 = wait forever. More...
 
Nice::Time timeout ()
 
void setVerbose (int _v)
 set verbosity parameters More...
 
void setName (std::string _name)
 
std::string name ()
 
 ChatCore ()
 constructor More...
 
 ChatCore (const char *_device)
 constructor with devicename tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
 ChatCore (int _fd)
 constructor with file descriptor More...
 
virtual ~ChatCore ()
 destructor More...
 
virtual int close ()
 closedevice More...
 
virtual bool isConnected () const
 check if its connected More...
 
virtual int wait (Nice::Time _time)
 wait _time sec for data, returns earlier as soon as data has arrived. More...
 
virtual int openListenSocket (int _port)
 open a listen socket. More...
 
virtual int tryAccept (ChatCore &_newConnection)
 try accepting for X secs. X is set by member setTimeout More...
 
void setTimeout (Nice::Time _t)
 set read timeout in seconds, -1 = wait forever. More...
 
Nice::Time timeout ()
 
void setVerbose (int _v)
 set verbosity parameters More...
 
void setName (std::string _name)
 
std::string name ()
 

Public Attributes

PdvDevm_edt_dev
 

Protected Member Functions

virtual int getc (char *_ch)
 
virtual int getc (char *_ch)
 
virtual int getc (char *_ch)
 
- Protected Member Functions inherited from Nice::ChatLine
virtual void setStdSettings ()
 
virtual void timeoutAktion (const std::string &)
 
virtual void setStdSettings ()
 
virtual void timeoutAktion (const std::string &)
 
- Protected Member Functions inherited from Nice::ChatCore
int openTCP (std::string &_host, uint16_t _port)
 
int openTTY (std::string &_device, int _baud, int _numbits, std::string _parity)
 
int openTCP (std::string &_host, uint16_t _port)
 
int openTTY (std::string &_device, int _baud, int _numbits, std::string _parity)
 

Additional Inherited Members

- Public Types inherited from Nice::ChatLine
enum  { CONNECTION_TIMEOUT = -7777 }
 
enum  { CONNECTION_TIMEOUT = -7777 }
 
- Public Types inherited from Nice::ChatCore
enum  ChatVERBOSE {
  ChatVERBOSE = 0x1, ChatCOLOR = 0x2, ChatTIME = 0x4, ChatECHO = 0x8,
  ChatVERBOSE = 0x1, ChatCOLOR = 0x2, ChatTIME = 0x4, ChatECHO = 0x8
}
 
enum  ChatVERBOSE {
  ChatVERBOSE = 0x1, ChatCOLOR = 0x2, ChatTIME = 0x4, ChatECHO = 0x8,
  ChatVERBOSE = 0x1, ChatCOLOR = 0x2, ChatTIME = 0x4, ChatECHO = 0x8
}
 
- Protected Attributes inherited from Nice::ChatLine
Nice::SeqString m_srbuffer
 
char m_lineEndSend [7]
 
char m_lineEndRecv [7]
 
unsigned int m_minLine
 
char m_readBlockBuffer [1025]
 
std::string m_readBuffer
 
std::string m_lineBuffer
 
- Protected Attributes inherited from Nice::ChatCore
std::string m_device_name
 
int m_fd
 
Nice::Time m_timeout
 
int verbose_
 
bool m_persistent
 
std::string m_name
 

Detailed Description

Author
Florian Briegel
Version
10.10.17
Date
2010-10-26 01:01:09 PM

Constructor & Destructor Documentation

◆ PdvChat() [1/12]

Basda::PdvChat::PdvChat ( )
inline

constructor

◆ PdvChat() [2/12]

Basda::PdvChat::PdvChat ( const char *  _device)
inline

constructor with devicename edt:CHANNEL:PORT:BAUD or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD.

◆ PdvChat() [3/12]

Basda::PdvChat::PdvChat ( int  _fd)
inline

constructor with file descriptor - only works with non edt cards

◆ PdvChat() [4/12]

Basda::PdvChat::PdvChat ( PdvDev _dev)
inline

constructor with file descriptor - only works with non edt cards

◆ ~PdvChat() [1/3]

virtual Basda::PdvChat::~PdvChat ( )
inlinevirtual

constructor with file descriptor

◆ PdvChat() [5/12]

Basda::PdvChat::PdvChat ( )
inline

constructor

◆ PdvChat() [6/12]

Basda::PdvChat::PdvChat ( const char *  _device)
inline

constructor with devicename edt:CHANNEL:PORT:BAUD or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD.

◆ PdvChat() [7/12]

Basda::PdvChat::PdvChat ( int  _fd)
inline

constructor with file descriptor - only works with non edt cards

◆ PdvChat() [8/12]

Basda::PdvChat::PdvChat ( PdvDev _dev)
inline

constructor with file descriptor - only works with non edt cards

◆ ~PdvChat() [2/3]

virtual Basda::PdvChat::~PdvChat ( )
inlinevirtual

constructor with file descriptor

◆ PdvChat() [9/12]

Basda::PdvChat::PdvChat ( )
inline

constructor

◆ PdvChat() [10/12]

Basda::PdvChat::PdvChat ( const char *  _device)
inline

constructor with devicename edt:CHANNEL:PORT:BAUD or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD.

◆ PdvChat() [11/12]

Basda::PdvChat::PdvChat ( int  _fd)
inline

constructor with file descriptor - only works with non edt cards

◆ PdvChat() [12/12]

Basda::PdvChat::PdvChat ( PdvDev _dev)
inline

constructor with file descriptor - only works with non edt cards

◆ ~PdvChat() [3/3]

virtual Basda::PdvChat::~PdvChat ( )
inlinevirtual

constructor with file descriptor

Member Function Documentation

◆ getc() [1/3]

int Basda::PdvChat::getc ( char *  _ch)
protectedvirtual

Reimplemented from Nice::ChatLine.

◆ getc() [2/3]

virtual int Basda::PdvChat::getc ( char *  _ch)
protectedvirtual

Reimplemented from Nice::ChatLine.

◆ getc() [3/3]

virtual int Basda::PdvChat::getc ( char *  _ch)
protectedvirtual

Reimplemented from Nice::ChatLine.

◆ open() [1/12]

int Basda::PdvChat::open ( const char *  _device)
virtual

open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD.

Reimplemented from Nice::ChatCore.

Reimplemented in Basda::LilJoeChitChat, Basda::LilJoeChitChat, and Basda::LilJoeChitChat.

◆ open() [2/12]

virtual int Basda::PdvChat::open ( const char *  _device)
virtual

open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD.

Reimplemented from Nice::ChatCore.

Reimplemented in Basda::LilJoeChitChat, Basda::LilJoeChitChat, and Basda::LilJoeChitChat.

◆ open() [3/12]

virtual int Basda::PdvChat::open ( const char *  _device)
virtual

open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD.

Reimplemented from Nice::ChatCore.

Reimplemented in Basda::LilJoeChitChat, Basda::LilJoeChitChat, and Basda::LilJoeChitChat.

◆ open() [4/12]

virtual int Basda::PdvChat::open ( )
inlinevirtual

open device with file descriptor

Reimplemented from Nice::ChatCore.

◆ open() [5/12]

virtual int Basda::PdvChat::open ( )
inlinevirtual

open device with file descriptor

Reimplemented from Nice::ChatCore.

◆ open() [6/12]

virtual int Basda::PdvChat::open ( )
inlinevirtual

open device with file descriptor

Reimplemented from Nice::ChatCore.

◆ open() [7/12]

virtual int Basda::PdvChat::open ( int  _fd)
inlinevirtual

open device with file descriptor

Reimplemented from Nice::ChatCore.

◆ open() [8/12]

virtual int Basda::PdvChat::open ( int  _fd)
inlinevirtual

open device with file descriptor

Reimplemented from Nice::ChatCore.

◆ open() [9/12]

virtual int Basda::PdvChat::open ( int  _fd)
inlinevirtual

open device with file descriptor

Reimplemented from Nice::ChatCore.

◆ open() [10/12]

virtual int Basda::PdvChat::open ( PdvDev _dev)
inlinevirtual

open device with name edt:CARD:CHANNEL:BAUD.

◆ open() [11/12]

virtual int Basda::PdvChat::open ( PdvDev _dev)
inlinevirtual

open device with name edt:CARD:CHANNEL:BAUD.

◆ open() [12/12]

virtual int Basda::PdvChat::open ( PdvDev _dev)
inlinevirtual

open device with name edt:CARD:CHANNEL:BAUD.

◆ sendline() [1/3]

int Basda::PdvChat::sendline ( const std::string &  _line)
virtual

send line _line

Reimplemented from Nice::ChatLine.

◆ sendline() [2/3]

virtual int Basda::PdvChat::sendline ( const std::string &  _line)
virtual

send line _line

Reimplemented from Nice::ChatLine.

◆ sendline() [3/3]

virtual int Basda::PdvChat::sendline ( const std::string &  _line)
virtual

send line _line

Reimplemented from Nice::ChatLine.

Member Data Documentation

◆ m_edt_dev

PdvDev * Basda::PdvChat::m_edt_dev

The documentation for this class was generated from the following files: