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

#include <LilJoeChitChat.h>

Inheritance diagram for Basda::LilJoeChitChat:
Inheritance graph
Collaboration diagram for Basda::LilJoeChitChat:
Collaboration graph

Public Member Functions

 LilJoeChitChat ()
 
virtual int open (const char *_con)
 open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
virtual int openWithPdvDev (PdvDev *_dev)
 
virtual int init ()
 
virtual std::string version ()
 
virtual std::string getStringParam (const char *_cmd)
 
virtual int getIntParam (const char *_cmd)
 
virtual int setIntParam (const char *_cmd, int _val)
 
virtual int getIntIdxParam (const char *_cmd, int _idx)
 
virtual int setIntIdxParam (const char *_cmd, int _idx, int _val)
 
virtual int setSeqIntParam (const char *_cmd, int _val)
 
virtual Nice::SeqU16 getSeqIntParam (const char *_cmd)
 
 LilJoeChitChat ()
 
virtual int open (const char *_con)
 open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
virtual int openWithPdvDev (PdvDev *_dev)
 
virtual int init ()
 
virtual std::string version ()
 
virtual std::string getStringParam (const char *_cmd)
 
virtual int getIntParam (const char *_cmd)
 
virtual int setIntParam (const char *_cmd, int _val)
 
virtual int getIntIdxParam (const char *_cmd, int _idx)
 
virtual int setIntIdxParam (const char *_cmd, int _idx, int _val)
 
virtual int setSeqIntParam (const char *_cmd, int _val)
 
virtual Nice::SeqU16 getSeqIntParam (const char *_cmd)
 
 LilJoeChitChat ()
 
virtual int open (const char *_con)
 open device with name or tcp://HOSTNAME:PORT or tty:/dev/ttyX:BAUD. More...
 
virtual int openWithPdvDev (PdvDev *_dev)
 
virtual int init ()
 
virtual std::string version ()
 
virtual std::string getStringParam (const char *_cmd)
 
virtual int getIntParam (const char *_cmd)
 
virtual int setIntParam (const char *_cmd, int _val)
 
virtual int getIntIdxParam (const char *_cmd, int _idx)
 
virtual int setIntIdxParam (const char *_cmd, int _idx, int _val)
 
virtual int setSeqIntParam (const char *_cmd, int _val)
 
virtual Nice::SeqU16 getSeqIntParam (const char *_cmd)
 
- Public Member Functions inherited from Basda::PdvChat
 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 ()
 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 ()
 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 ()
 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 ()
 

Protected Member Functions

virtual void checkError (int _rc)
 
virtual void checkError (int _rc)
 
virtual void checkError (int _rc)
 
- Protected Member Functions inherited from Basda::PdvChat
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)
 

Private Attributes

Nice::Mutex m_mutex
 

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
}
 
- Public Attributes inherited from Basda::PdvChat
PdvDevm_edt_dev
 
- 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
 

Constructor & Destructor Documentation

◆ LilJoeChitChat() [1/3]

Basda::LilJoeChitChat::LilJoeChitChat ( )
inline

◆ LilJoeChitChat() [2/3]

Basda::LilJoeChitChat::LilJoeChitChat ( )
inline

◆ LilJoeChitChat() [3/3]

Basda::LilJoeChitChat::LilJoeChitChat ( )
inline

Member Function Documentation

◆ checkError() [1/3]

void Basda::LilJoeChitChat::checkError ( int  _rc)
protectedvirtual

◆ checkError() [2/3]

virtual void Basda::LilJoeChitChat::checkError ( int  _rc)
protectedvirtual

◆ checkError() [3/3]

virtual void Basda::LilJoeChitChat::checkError ( int  _rc)
protectedvirtual

◆ getIntIdxParam() [1/3]

virtual int Basda::LilJoeChitChat::getIntIdxParam ( const char *  _cmd,
int  _idx 
)
virtual

◆ getIntIdxParam() [2/3]

virtual int Basda::LilJoeChitChat::getIntIdxParam ( const char *  _cmd,
int  _idx 
)
virtual

◆ getIntIdxParam() [3/3]

int Basda::LilJoeChitChat::getIntIdxParam ( const char *  _cmd,
int  _idx 
)
virtual

◆ getIntParam() [1/3]

virtual int Basda::LilJoeChitChat::getIntParam ( const char *  _cmd)
virtual

◆ getIntParam() [2/3]

int Basda::LilJoeChitChat::getIntParam ( const char *  _cmd)
virtual

◆ getIntParam() [3/3]

virtual int Basda::LilJoeChitChat::getIntParam ( const char *  _cmd)
virtual

◆ getSeqIntParam() [1/3]

virtual Nice::SeqU16 Basda::LilJoeChitChat::getSeqIntParam ( const char *  _cmd)
virtual

◆ getSeqIntParam() [2/3]

Nice::SeqU16 Basda::LilJoeChitChat::getSeqIntParam ( const char *  _cmd)
virtual

◆ getSeqIntParam() [3/3]

virtual Nice::SeqU16 Basda::LilJoeChitChat::getSeqIntParam ( const char *  _cmd)
virtual

◆ getStringParam() [1/3]

virtual std::string Basda::LilJoeChitChat::getStringParam ( const char *  _cmd)
virtual

◆ getStringParam() [2/3]

std::string Basda::LilJoeChitChat::getStringParam ( const char *  _cmd)
virtual

◆ getStringParam() [3/3]

virtual std::string Basda::LilJoeChitChat::getStringParam ( const char *  _cmd)
virtual

◆ init() [1/3]

int Basda::LilJoeChitChat::init ( )
virtual

◆ init() [2/3]

virtual int Basda::LilJoeChitChat::init ( )
virtual

◆ init() [3/3]

virtual int Basda::LilJoeChitChat::init ( )
virtual

◆ open() [1/3]

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

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

Reimplemented from Basda::PdvChat.

◆ open() [2/3]

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

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

Reimplemented from Basda::PdvChat.

◆ open() [3/3]

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

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

Reimplemented from Basda::PdvChat.

◆ openWithPdvDev() [1/3]

virtual int Basda::LilJoeChitChat::openWithPdvDev ( PdvDev _dev)
virtual

◆ openWithPdvDev() [2/3]

int Basda::LilJoeChitChat::openWithPdvDev ( PdvDev _dev)
virtual

◆ openWithPdvDev() [3/3]

virtual int Basda::LilJoeChitChat::openWithPdvDev ( PdvDev _dev)
virtual

◆ setIntIdxParam() [1/3]

virtual int Basda::LilJoeChitChat::setIntIdxParam ( const char *  _cmd,
int  _idx,
int  _val 
)
virtual

◆ setIntIdxParam() [2/3]

int Basda::LilJoeChitChat::setIntIdxParam ( const char *  _cmd,
int  _idx,
int  _val 
)
virtual

◆ setIntIdxParam() [3/3]

virtual int Basda::LilJoeChitChat::setIntIdxParam ( const char *  _cmd,
int  _idx,
int  _val 
)
virtual

◆ setIntParam() [1/3]

virtual int Basda::LilJoeChitChat::setIntParam ( const char *  _cmd,
int  _val 
)
virtual

◆ setIntParam() [2/3]

int Basda::LilJoeChitChat::setIntParam ( const char *  _cmd,
int  _val 
)
virtual

◆ setIntParam() [3/3]

virtual int Basda::LilJoeChitChat::setIntParam ( const char *  _cmd,
int  _val 
)
virtual

◆ setSeqIntParam() [1/3]

virtual int Basda::LilJoeChitChat::setSeqIntParam ( const char *  _cmd,
int  _val 
)
virtual

◆ setSeqIntParam() [2/3]

virtual int Basda::LilJoeChitChat::setSeqIntParam ( const char *  _cmd,
int  _val 
)
virtual

◆ setSeqIntParam() [3/3]

int Basda::LilJoeChitChat::setSeqIntParam ( const char *  _cmd,
int  _val 
)
virtual

◆ version() [1/3]

virtual std::string Basda::LilJoeChitChat::version ( )
virtual

◆ version() [2/3]

std::string Basda::LilJoeChitChat::version ( )
virtual

◆ version() [3/3]

virtual std::string Basda::LilJoeChitChat::version ( )
virtual

Member Data Documentation

◆ m_mutex

Nice::Mutex Basda::LilJoeChitChat::m_mutex
private

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