* ''virtual string getStatus( );'' — getting the status of the input transport.
+
* ''virtual string getStatus( );'' — getting the status of the transport.
* ''virtual void start( );'' — starting the transport.
* ''virtual void start( );'' — starting the transport.
* ''virtual void stop( );'' — stopping the transport.
* ''virtual void stop( );'' — stopping the transport.
Line 26:
Line 26:
* ''virtual void start( int time = 0 );'' — starting the transport with the connection timeout ''time''. When you start the output transport the actual connection to the remote station is established for the interfaces that works by the connection. At this time the errors can occur if the connection is impossible and the transport should return to the stopped state.
* ''virtual void start( int time = 0 );'' — starting the transport with the connection timeout ''time''. When you start the output transport the actual connection to the remote station is established for the interfaces that works by the connection. At this time the errors can occur if the connection is impossible and the transport should return to the stopped state.
* ''virtual void stop( );'' — stopping the transport.
* ''virtual void stop( );'' — stopping the transport.
−
* ''virtual int messIO( const char *oBuf, int oLen, char *iBuf = NULL, int iLen = 0, int time = 0 );'' — sending of the data over the transport. The waiting timeout ''time'' of the connection, in milliseconds. The ''time'' in negative disables the transport's request/respond mode and allows for the independently reading/writing to a buffer IO, with the reading timeout ''time'' in absolute.
+
* ''virtual int messIO( const char *oBuf, int oLen, char *iBuf = NULL, int iLen = 0, int time = 0 );'' — sending of the data over the transport. The waiting timeout ''time'' of the connection in milliseconds. The ''time'' in negative disables the transport's request/respond mode and allows for the independently reading/writing to a buffer IO, with the reading timeout ''time'' in absolute.
Revision as of 21:30, 7 November 2022
|-
! API of the modules of the "Transports" subsystem
|-
| Provide OpenSCADA communications through the interface, often it is the network one which is implemented by the module.
|-
| TTypeTransport->TModule — the root module object of the "Transports" subsystem:
virtual bool isNetwork( ); — the sign of network implementation by this module.
virtual string outAddrHelp( ); — address format help of the output transports.
virtual TTransportIn *In( const string &id, const string &stor ); — called when a new input transport object is opened or created by this module with the identifier id and the storage stor.
virtual TTransportOut *Out( const string &name, const string &stor ); — called when a new output transport object is opened or created by this module with the identifier id and the storage stor.
virtual string getStatus( ); — getting the status of the transport.
virtual void start( ); — starting the transport.
virtual void stop( ); — stopping the transport.
virtual int writeTo( const string &sender, const string &data ); — sending data backward to the sender. Implemented in transports with support of the initiative sending, not only at a request!
virtual unsigned short attempts( ); — connection attempts.
virtual string getStatus( ); — getting the status of the transport.
virtual void setTimings( const string &vl, bool isDef = false ); — setting the transport timeouts, as default one for isDef.
virtual void setAttempts( unsigned short vl ); — setting the connection attempts.
virtual void start( int time = 0 ); — starting the transport with the connection timeout time. When you start the output transport the actual connection to the remote station is established for the interfaces that works by the connection. At this time the errors can occur if the connection is impossible and the transport should return to the stopped state.
virtual void stop( ); — stopping the transport.
virtual int messIO( const char *oBuf, int oLen, char *iBuf = NULL, int iLen = 0, int time = 0 ); — sending of the data over the transport. The waiting timeout time of the connection in milliseconds. The time in negative disables the transport's request/respond mode and allows for the independently reading/writing to a buffer IO, with the reading timeout time in absolute.