7. Subsystem “Communication interfaces' protocols” (TProtocolS)
Subsystem "Communication interfaces' protocols" is presented by the TProtocolS object, which contains modular objects of the separate protocols TProtocol on the a subsystem's level. Each protocol contains objects of the opened sessions of the incoming protocols TProtocolIn.
TProtocolS object provides an access to the both: the incoming and the outgoing protocols of the individual types of transport protocols. The inner side of outgoing protocol based on the steaming principle with the individual structure of the stream for each implementation of the protocol.
7.1. The object of the “Communication interfaces' protocols” subsystem (TProtocolS)
Public methods:
- int subVer( ); - Subsystem's version.
- AutoHD<TProtocol> at( const string &id ); - Connection to the protocol's <id> module.
- string optDescr( ); - Localized help for command-line options and parameters of the configuration file.
7.2. The modular object of the protocol (TProtocol)
Inherits: | TModule. |
Inherited: | By the root object of the subsystem's "Protocols" modules. |
Public methods:
- void list( vector<string> &list ); - The list of open incoming sessions.
- bool openStat( const string &name ); - Check for the openness of the incoming session with the specified name.
- void open( const string &name, const string &tr ); - The opening of the session on behalf of the incoming transport <tr>.
- void close( const string &name ); - Closing of the incoming session.
- AutoHD<TProtocolIn> at( const string &name ); - Connecting to the open incoming sessions.
- virtual void outMess( XMLNode &io, TTransportOut &tro ); - Sending the data in the XML tree <in> over the protocol and transport <tro>.
7.3. The object of the incoming protocol's session (TProtocolIn)
Inherits: | TCntrNode. |
Inherited: | By the session objects of the incoming modules' protocol of the subsystem "Protocols". |
Public methods:
- TProtocolIn( const string &name ); - Initializing constructor.
- const string &name( ); - The name of the incoming session.
- const string &srcTr( ); - The address of the transport-source of the opening of the session of the incoming protocol.
- void setSrcTr( const string &vl ); - Setting of the address of the transport-source of the opening of the session of the incoming protocol.
- virtual bool mess( const string &request, string &answer, const string &sender ); - The transfer of unstructured data to their processing by the protocol.
- TProtocol &owner( ); - The protocol - the owner of incoming sessions.