devel:development_documentation
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
devel:development_documentation [2008/08/27 13:56] – created pkubanek | devel:development_documentation [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | [[devel:Messaging]] |
- | RTS2 uses its own messaging system. Messages contains name of the originator, type (debug, info, warning, error) and message text, which is unformated string. Please note that this message subsystem is intended only to pass string messages. It was not invited to pass some structured infromation from one component to the other - for such tasks are commands. | + | Description of messaging system |
- | To send message from any RTS2 code, use: | + | [[code:telescope_driver|How to implement telescope driver]] |
- | <code c++> | + | Short introduction how to implement a telescope driver and integrate |
- | logStream (type) | + | |
- | << 1234 // use it as stream, add others values if necessary | + | |
- | << sendLog; | + | |
- | </ | + | |
- | where type is one of **MESSAGE_ERROR**, | + | [[devel:Modbus TCP/IP]] |
- | So for example to send warning message, use: | + | Modbus TCP/IP connection. |
- | <code c++> | + | [[devel:Database Structure]] |
- | logStream (MESSAGE_WARNING) | + | |
- | << | + | |
- | << | + | |
- | << | + | |
- | << | + | |
- | << | + | |
- | << | + | |
- | </ | + | |
- | + | ||
- | To process messages coming from other connected devices over TCP/IP, hook on to public virtual function | + | |
- | + | ||
- | <code c++> | + | |
- | virtual void message (Rts2Message & msg) | + | |
- | </ | + | |
- | + | ||
- | Please see [[http:// | + | |
- | + | ||
- | To process messages which are generated inside application, | + | |
- | + | ||
- | <code c++> | + | |
- | void Rts2Centrald:: | + | |
- | </ | + | |
- | + | ||
- | You get message type and string to send. In order to send generated message to all connected devices, you need to call sendMessageAll. However, please note that usual infrastructure of RTS2 assumes that you send message only to centrald, and then centrald distributed message to log and to other components in the system. So you should not care about sending messages. | + | |
+ | Commented database structure. |
devel/development_documentation.1219838167.txt.gz · Last modified: 2008/09/06 00:00 (external edit)