| 
    Jpp
    master_rocky-37-gf0c5bc59d
    
   the software that should make you happy 
   | 
 
Object iteration through ControlHost. More...
#include <JControlHostObjectIterator.hh>
  
Public Types | |
| typedef JObjectIterator< T >::pointer_type | pointer_type | 
Public Member Functions | |
| JControlHostObjectIterator (const JHostname &server, const JSubscription &subscription, JTimeval timeout=JTimeval::max()) | |
| Constructor.  More... | |
| JControlHostObjectIterator (const JHostname &server, JTimeval timeout=JTimeval::max(), bool all=true) | |
| Constructor.  More... | |
| virtual bool | setObject (T &object) override | 
| Set object.  More... | |
| int | Subscribe (const JSubscription &subscription) | 
| Subscribe to single tag.  More... | |
| int | Subscribe (const JSubscriptionList &subscription) | 
| Subscribe to list of tags.  More... | |
| int | MyId (const std::string &nick_name) | 
| Identify.  More... | |
| int | SendMeNext () | 
| Tell server to send next message.  More... | |
| int | SendMeAlways () | 
| Tell server to send messages forever.  More... | |
| int | PutFullData (const JTag &tag, const void *buffer, const long long int length) | 
| Send data.  More... | |
| int | PutFullData (const std::string &tag, const void *buffer, const long long int length) | 
| Send data.  More... | |
| int | PutFullString (const JTag &tag, const std::string &buffer) | 
| Send string.  More... | |
| int | PutFullString (const std::string &tag, const std::string &buffer) | 
| Send string.  More... | |
| int | Connected () | 
| Send version.  More... | |
| int | WaitHead (JPrefix &prefix) | 
| Wait for header.  More... | |
| int | WaitHead (std::string &tag, long long int &length) | 
| Wait for header.  More... | |
| int | CheckHead (JPrefix &prefix, JTimeval timeout=JTimeval::min()) | 
| Check for header, without waiting.  More... | |
| int | CheckHead (std::string &tag, long long int &length, const int timeout_us=0) | 
| Check for header, without waiting.  More... | |
| int | GetFullData (void *buffer, long long int length) | 
| Receive data.  More... | |
| int | GetFullString (std::string &buffer) | 
| Receive string.  More... | |
| int | configure () | 
| Configure socket (factory reset).  More... | |
| int | read (char *buffer, const int length) override | 
| Read data from socket.  More... | |
| int | write (const char *buffer, const int length) override | 
| Write data to socket.  More... | |
| void | setNonBlocking (const bool on) | 
| Set non-blocking of I/O.  More... | |
| bool | getNonBlocking () const | 
| Get non-blocking of I/O.  More... | |
| void | setKeepIdle (const int t_s) | 
| Set the TCP idle time.  More... | |
| void | setKeepCnt (const int count) | 
| Set the TCP idle count.  More... | |
| void | setKeepIntvl (const int t_s) | 
| Set the TCP interval time.  More... | |
| void | setTcpNoDelay (const bool on) | 
| Set TCP no-delay.  More... | |
| bool | getTcpNoDelay () const | 
| Get TCP no-delay.  More... | |
| void | accept (const int server) | 
| Accept connection from a server.  More... | |
| void | connect (const int port) | 
| Connect to port on local host.  More... | |
| void | connect (const JHostname &hostname) | 
| Connect to port on specified host.  More... | |
| void | connect (const std::string &hostname, const int port) | 
| Connect to port on specified host.  More... | |
| void | connect (const int ip_number, const int port) | 
| Connect to port on specified host.  More... | |
| int | shutdown () | 
| Shut down socket.  More... | |
| void | setKeepAlive (const bool on) | 
| Set keep alive of socket.  More... | |
| bool | getKeepAlive () const | 
| Get keep alive of socket.  More... | |
| void | setReuseAddress (const bool on) | 
| Set reuse address.  More... | |
| bool | getReuseAddress () const | 
| Get reuse address.  More... | |
| void | setReceiveBufferSize (const int size) | 
| Set receive buffer size.  More... | |
| int | getReceiveBufferSize () const | 
| Set receive buffer size.  More... | |
| void | setSendBufferSize (const int size) | 
| Set send buffer size.  More... | |
| int | getSendBufferSize () const | 
| Get send buffer size.  More... | |
| int | close () | 
| Close file.  More... | |
| bool | in_avail (JTimeval timeout=JTimeval::min()) const | 
| Check availability of input.  More... | |
| bool | out_avail (JTimeval timeout=JTimeval::min()) const | 
| Check availability of output.  More... | |
| virtual bool | good () const | 
| Check status.  More... | |
| virtual bool | fail () const | 
| Check status.  More... | |
| virtual bool | bad () const | 
| Check status.  More... | |
| virtual bool | eof () const | 
| Check end of file.  More... | |
| bool | less (const JAbstractFile &file) const | 
| Less than operation.  More... | |
| int | getFileDescriptor () const | 
| Get file descriptor.  More... | |
| void | setFileDescriptor (const int file) | 
| Set file descriptor.  More... | |
| bool | is_open () const | 
| Get open status.  More... | |
| const sockaddr * | getSockaddr () const | 
| Get sockaddr.  More... | |
| sockaddr * | getSockaddr () | 
| Get sockaddr.  More... | |
| int | getFamily () const | 
| Get family.  More... | |
| void | setFamily (const int family) | 
| Set family.  More... | |
| std::string | getHostname () const | 
| Get host name.  More... | |
| int | getIPnumber () const | 
| Get IP number.  More... | |
| void | setIPnumber (const int ip_number) | 
| Set IP number.  More... | |
| void | setIPnumber () | 
| Set any IP number.  More... | |
| int | getPort () const | 
| Get port number.  More... | |
| void | setPort (const int port) | 
| Set port number.  More... | |
| virtual bool | hasNext () override | 
| Check availability of next element.  More... | |
| virtual const pointer_type & | next () override | 
| Get next element.  More... | |
| virtual skip_type | skip (const skip_type ns) | 
| Skip items.  More... | |
| const JTimeval & | getTimeval () const | 
| Get time value.  More... | |
| JTimeval & | getTimeval () | 
| Get time value.  More... | |
| void | setTimeval (const JTimeval &timeval) | 
| Set time value.  More... | |
| bool | less (const JTimeval &value) const | 
| Less than method.  More... | |
| const timeval * | get () const | 
| Get pointer to time value.  More... | |
| timeval * | get () | 
| Get pointer to time value.  More... | |
| const timeval * | operator& () const | 
| Address of operator.  More... | |
| timeval * | operator& () | 
| Address of operator.  More... | |
Static Public Member Functions | |
| static bool | maybe_special (const JTag &tag) | 
| Check special ControlHost tags.  More... | |
| static bool | is_valid (const char c) | 
| Check validity of subscription specifier.  More... | |
| static int | WhereIs (const std::string &host_name, const std::string &nick_name, std::string &answer) | 
| Locate ControlHost client(s).  More... | |
| static const int | getDefaultBufferSize () | 
| Default socket buffer size to be used on this system.  More... | |
| static int | sizeOf () | 
| Get size of object.  More... | |
| static void | Throw (const bool option) | 
| Enable/disable throw option.  More... | |
| static int | Throw (const JException_t &error, const int value=-1) | 
| Throw exception or return error.  More... | |
| static JTimeval | min () | 
| Get minimal time value.  More... | |
| static JTimeval | max () | 
| Get maximal time value.  More... | |
Static Public Attributes | |
| static const int | FILE_CLOSED = -1 | 
Protected Member Functions | |
| template<class T > | |
| void | setOption (const int level, const int option, const T value) | 
| Set socket option.  More... | |
| template<class T > | |
| T | getOption (const int level, const int option) const | 
| Get socket option.  More... | |
Protected Attributes | |
| int | fileDescriptor | 
| T | object | 
| object  More... | |
| bool | has_next | 
| status  More... | |
Static Protected Attributes | |
| static bool | do_throw | 
| throw option  More... | |
Private Attributes | |
| JPrefix | prefix | 
| std::vector< char > | buffer | 
| int | result | 
| pointer_type | ps | 
Object iteration through ControlHost.
This class implements the JLANG::JObjectIterator interface.
Definition at line 31 of file JControlHostObjectIterator.hh.
      
  | 
  inherited | 
Definition at line 39 of file JAbstractObjectIterator.hh.
      
  | 
  inline | 
Constructor.
| server | host name and optional port number | 
| subscription | subscription | 
| timeout | timeout | 
Definition at line 44 of file JControlHostObjectIterator.hh.
      
  | 
  inline | 
Constructor.
| server | host name and optional port number | 
| timeout | timeout | 
| all | subscribe all, subscribe any if false | 
Definition at line 61 of file JControlHostObjectIterator.hh.
      
  | 
  inlineoverridevirtual | 
Set object.
| object | reference to object to be set | 
Implements JLANG::JAbstractObjectIterator< T >.
Definition at line 81 of file JControlHostObjectIterator.hh.
      
  | 
  inlinestaticinherited | 
Check special ControlHost tags.
| tag | tag | 
Definition at line 269 of file JControlHost.hh.
      
  | 
  inlinestaticinherited | 
Check validity of subscription specifier.
| c | subscription specifier | 
Definition at line 281 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Subscribe to single tag.
| subscription | subscription | 
Definition at line 360 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Subscribe to list of tags.
| subscription | subscription | 
Definition at line 372 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Identify.
| nick_name | nick name | 
Definition at line 384 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Tell server to send next message.
Definition at line 395 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Tell server to send messages forever.
Definition at line 406 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Send data.
| tag | tag | 
| buffer | data | 
| length | number of bytes | 
Definition at line 420 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Send data.
| tag | tag | 
| buffer | data | 
| length | number of bytes | 
Definition at line 448 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Send string.
| tag | tag | 
| buffer | data | 
Definition at line 469 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Send string.
| tag | tag | 
| buffer | data | 
Definition at line 483 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Send version.
Definition at line 495 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Wait for header.
| prefix | prefix | 
Definition at line 507 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Wait for header.
| tag | tag | 
| length | number of bytes | 
Definition at line 530 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Check for header, without waiting.
| prefix | prefix | 
| timeout | timeout | 
Definition at line 550 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Check for header, without waiting.
| tag | tag | 
| length | number of bytes | 
| timeout_us | timeout [us] | 
Definition at line 579 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Receive data.
| buffer | data | 
| length | number of bytes | 
Definition at line 599 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Receive string.
| buffer | data | 
Definition at line 619 of file JControlHost.hh.
      
  | 
  inlinestaticinherited | 
Locate ControlHost client(s).
| host_name | host name | 
| nick_name | nick name | 
| answer | list of host names | 
Definition at line 635 of file JControlHost.hh.
      
  | 
  inlineinherited | 
Configure socket (factory reset).
Definition at line 666 of file JControlHost.hh.
      
  | 
  inlineoverridevirtualinherited | 
Read data from socket.
| buffer | buffer | 
| length | number of bytes to read | 
Reimplemented from JNET::JSocket.
Definition at line 52 of file JSocketBlocking.hh.
      
  | 
  inlineoverridevirtualinherited | 
Write data to socket.
| buffer | buffer | 
| length | number of bytes to write | 
Reimplemented from JNET::JSocket.
Definition at line 80 of file JSocketBlocking.hh.
      
  | 
  inlineinherited | 
Set non-blocking of I/O.
| on | true to enable non-blocking; false to disable | 
Definition at line 56 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Get non-blocking of I/O.
Definition at line 80 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Set the TCP idle time.
| t_s | time [s] | 
Definition at line 98 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Set TCP no-delay.
| on | true to set TCP no-delay; false to disable | 
Definition at line 131 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Get TCP no-delay.
Definition at line 142 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Accept connection from a server.
| server | file descriptor of TCP server socket | 
Definition at line 153 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Connect to port on local host.
| port | port number | 
Definition at line 166 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Connect to port on specified host.
| hostname | host name | 
Definition at line 177 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Connect to port on specified host.
| hostname | host name | 
| port | port number | 
Definition at line 189 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Connect to port on specified host.
| ip_number | IP number | 
| port | port number | 
Definition at line 201 of file JTCPSocket.hh.
      
  | 
  inlinestaticinherited | 
Default socket buffer size to be used on this system.
Definition at line 75 of file JSocket.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Set keep alive of socket.
| on | true to enable keep alive; false to disable | 
Definition at line 104 of file JSocket.hh.
      
  | 
  inlineinherited | 
Get keep alive of socket.
Definition at line 115 of file JSocket.hh.
      
  | 
  inlineinherited | 
Set reuse address.
| on | true to enable reuse address; false to disable | 
Definition at line 126 of file JSocket.hh.
      
  | 
  inlineinherited | 
Get reuse address.
Definition at line 137 of file JSocket.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineprotectedinherited | 
Set socket option.
| level | level | 
| option | option | 
| value | value | 
Definition at line 274 of file JSocket.hh.
      
  | 
  inlineprotectedinherited | 
Get socket option.
| level | level | 
| option | option | 
Definition at line 292 of file JSocket.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Check availability of input.
This method returns true if at least one byte can be read without blocking.
| timeout | timeout | 
Definition at line 106 of file JFile.hh.
      
  | 
  inlineinherited | 
Check availability of output.
This method returns true if at least one byte can be written without blocking.
| timeout | timeout | 
Definition at line 119 of file JFile.hh.
      
  | 
  inlinevirtualinherited | 
      
  | 
  inlinevirtualinherited | 
      
  | 
  inlinevirtualinherited | 
      
  | 
  inlinevirtualinherited | 
      
  | 
  inlineinherited | 
Less than operation.
| file | JAbstractFile to be compared | 
Definition at line 64 of file JAbstractFile.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Get open status.
Definition at line 95 of file JAbstractFile.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Get host name.
Definition at line 88 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Set any IP number.
Definition at line 119 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlinestaticinherited | 
      
  | 
  inlinestaticinherited | 
      
  | 
  inlinestaticinherited | 
      
  | 
  inlineoverridevirtualinherited | 
Check availability of next element.
Implements JLANG::JObjectIterator< T >.
Definition at line 56 of file JAbstractObjectIterator.hh.
      
  | 
  inlineoverridevirtualinherited | 
Get next element.
Implements JLANG::JObjectIterator< T >.
Definition at line 71 of file JAbstractObjectIterator.hh.
      
  | 
  inlinevirtualinherited | 
Skip items.
| ns | number of items to skip | 
Reimplemented in JLANG::JSTDObjectIterator< T >, JLANG::JPipe< T >, JLANG::JPipe< JTail_t >, JLANG::JPipe< JHead_t >, and JLANG::JAbstractObjectReader< T >.
Definition at line 90 of file JObjectIterator.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Less than method.
| value | time value | 
Definition at line 105 of file JTimeval.hh.
      
  | 
  inlinestaticinherited | 
      
  | 
  inlinestaticinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Address of operator.
Definition at line 165 of file JTimeval.hh.
      
  | 
  inlineinherited | 
      
  | 
  private | 
Definition at line 102 of file JControlHostObjectIterator.hh.
      
  | 
  private | 
Definition at line 103 of file JControlHostObjectIterator.hh.
      
  | 
  staticinherited | 
Definition at line 27 of file JAbstractFile.hh.
      
  | 
  protectedinherited | 
Definition at line 102 of file JAbstractFile.hh.
      
  | 
  staticprotectedinherited | 
      
  | 
  protectedinherited | 
object
Definition at line 34 of file JAbstractObjectIterator.hh.
      
  | 
  protectedinherited | 
status
Definition at line 35 of file JAbstractObjectIterator.hh.
      
  | 
  privateinherited | 
Definition at line 84 of file JAbstractObjectIterator.hh.