Tools » History » Version 9

J. Moringen, 09/25/2011 03:49 PM
added call tool

1 1 J. Moringen
h1. Tools
2 1 J. Moringen
3 1 J. Moringen
{{>toc}}
4 1 J. Moringen
5 1 J. Moringen
h2. Introspection
6 1 J. Moringen
7 2 J. Moringen
h3. Version, Plugins and Configuration Query
8 2 J. Moringen
9 2 J. Moringen
The RSB information query tool can used to display information regarding 
10 2 J. Moringen
* the RSB library version
11 2 J. Moringen
* the set of registered connectors 
12 2 J. Moringen
* the set of available converters
13 2 J. Moringen
14 8 J. Wienke
|_.Implementation Language |_.Project |_.Repository Link           |
15 8 J. Wienke
| C++                      | rsb-cpp  | source:trunk/cpp/core/apps |
16 2 J. Moringen
17 2 J. Moringen
_Example: version only_
18 2 J. Moringen
<pre>
19 2 J. Moringen
[jmoringe@azurit build]$ ./rsb_version
20 2 J. Moringen
Version: 0.4.0, build 1911 (DATE 2011-06-30 15:14:46 +0200 (Thu, 30 Jun 2011)), abi 2
21 2 J. Moringen
</pre>
22 2 J. Moringen
23 2 J. Moringen
_Example: verbose mode_
24 2 J. Moringen
<pre>
25 2 J. Moringen
[jmoringe@azurit build]$ ./rsb_version --verbose
26 2 J. Moringen
Version: 0.4.0, build 1911 (DATE 2011-06-30 15:14:46 +0200 (Thu, 30 Jun 2011)), abi 2
27 2 J. Moringen
28 2 J. Moringen
29 2 J. Moringen
Connectors
30 2 J. Moringen
ConnectorFactory<rsb::transport::InPushConnector>[
31 2 J. Moringen
	ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}]
32 2 J. Moringen
	ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}]
33 2 J. Moringen
]
34 2 J. Moringen
ConnectorFactory<rsb::transport::OutConnector>[
35 2 J. Moringen
	ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}]
36 2 J. Moringen
	ConnectorInfo[spread, schemas = {spread}, options = {host, maxfragmentsize, port, enabled}]
37 2 J. Moringen
]
38 2 J. Moringen
39 2 J. Moringen
Converters
40 2 J. Moringen
Repository<std::string>[
41 2 J. Moringen
	.*               <-> bytearray       : rsb::converter::ByteArrayConverter[wireType = std::string, wireSchema = .*, dataType = bytearray]
42 2 J. Moringen
	bool             <-> bool            : rsb::converter::BoolConverter[wireType = std::string, wireSchema = bool, dataType = bool]
43 2 J. Moringen
	uint64           <-> unsigned long   : rsb::converter::Uint64Converter[wireType = std::string, wireSchema = uint64, dataType = unsigned long]
44 2 J. Moringen
	utf-8-string     <-> std::string     : rsb::converter::StringConverter[wireType = std::string, wireSchema = utf-8-string, dataType = std::string]
45 2 J. Moringen
	void             <-> void            : rsb::converter::VoidConverter[wireType = std::string, wireSchema = void, dataType = void]
46 2 J. Moringen
]
47 2 J. Moringen
</pre>
48 2 J. Moringen
49 1 J. Moringen
h3. Logger
50 1 J. Moringen
51 1 J. Moringen
The RSB logger participates in a [[Glossary|channel]] using one or more [[Glossary|transports]] and displays all [[Events|events]] published on the channel using a configurable style.
52 1 J. Moringen
53 3 J. Moringen
|_.Implementation Language |_.Project      |_.Repository Link          |_.Compiled Binary |
54 9 J. Moringen
| C++                      | rsb-cpp-tools | source:trunk/cpp/tools    | Artifacts of "this":https://ci.cor-lab.de/job/rsb-cpp-tools-stable/ Jenkins job |
55 9 J. Moringen
| Common Lisp              | cl-rsb-tools  | source:trunk/cl-rsb-tools | "Linux i686":https://ci.cor-lab.de/job/cl-rsb-tools/label=ubuntu_lucid_32bit/lastSuccessfulBuild/artifact/build/logger-builtin-spread, "Linux x86_64":https://ci.cor-lab.de/job/cl-rsb-tools,/label=ubuntu_lucid_64bit/lastSuccessfulBuild/artifact/build/logger-builtin-spread, "MacOS x86_64":https://ci.cor-lab.de/job/cl-rsb-tools/label=MAC_OS_lion_64bit/ |
56 1 J. Moringen
57 1 J. Moringen
_Example:_
58 1 J. Moringen
In the following example, the C++ version of the logger is instructed to participate in the channel designated by the root scope @/@. This means that the logger will display *all* events which are receivable using its configured transports. In this example, the configured transports depend on the RSB [[Configuration|configuration file]] and environment variables.
59 1 J. Moringen
<pre>
60 1 J. Moringen
[jmoringe@azurit logger]$ ./rsblogger --format detailed /
61 1 J. Moringen
Event
62 1 J. Moringen
  Scope  /
63 1 J. Moringen
  Id     ac5f449c-4aa1-4b03-a9e2-3fac7d38e651
64 1 J. Moringen
  Type   bytearray
65 1 J. Moringen
  Origin ab6e3a17-e11f-4c89-8c07-606a009e8439
66 1 J. Moringen
Timestamps
67 1 J. Moringen
  Create  2011-Jul-03 12:51:11.802849+??:??
68 1 J. Moringen
  Send    2011-Jul-03 12:51:11.802950+??:??
69 1 J. Moringen
  Receive 2011-Jul-03 12:51:11.810332+??:??
70 1 J. Moringen
  Deliver 2011-Jul-03 12:51:11.810572+??:??
71 1 J. Moringen
Payload (bytearray, length 100000)
72 1 J. Moringen
  0x0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
73 1 J. Moringen
  0x0017 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
74 1 J. Moringen
  0x002e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
75 1 J. Moringen
  0x0045 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...
76 1 J. Moringen
-------------------------------------------------------------------------------
77 1 J. Moringen
Event
78 1 J. Moringen
  Scope  /
79 1 J. Moringen
  Id     3fd721ef-6e7c-4e81-bd5f-ff215b2b965f
80 1 J. Moringen
  Type   std::string
81 1 J. Moringen
  Origin 8e07e02a-0dee-44a2-8926-cc65c0285410
82 1 J. Moringen
Timestamps
83 1 J. Moringen
  Create  2011-Jul-03 12:51:20.102403+??:??
84 1 J. Moringen
  Send    2011-Jul-03 12:51:20.102482+??:??
85 1 J. Moringen
  Receive 2011-Jul-03 12:51:20.105319+??:??
86 1 J. Moringen
  Deliver 2011-Jul-03 12:51:20.105404+??:??
87 1 J. Moringen
Payload (std::string, length 3)
88 1 J. Moringen
  foo
89 1 J. Moringen
-------------------------------------------------------------------------------
90 1 J. Moringen
</pre>
91 1 J. Moringen
92 4 J. Moringen
_Example (inspection of protocol buffer event payloads):_
93 5 J. Moringen
In this example, the Common Lisp version of the RSB logger is used to display protocol buffer event payloads. This only works, if the logger is provided with the protocol buffer IDL definitions of the event payloads it should display (in this example: the @running.example.Image@ message from [[Meetings2011-07-14|the slides used in this meeting]]). These definitions can either be textual definitions, typically found in @.proto@ files (as in this example), or compiled, binary descriptions (not shown).
94 4 J. Moringen
<pre>
95 4 J. Moringen
[jmoringe@azurit build]$ ls ~/projects/talk-rsb-data/code/*.proto
96 4 J. Moringen
/homes/jmoringe/projects/talk-rsb-data/code/Image.proto
97 4 J. Moringen
[jmoringe@azurit build]$ ./logger-builtin-spread --style detailed --idl-path "/homes/jmoringe/projects/talk-rsb/data/code/" spread:
98 4 J. Moringen
Event
99 4 J. Moringen
  Scope : /
100 4 J. Moringen
  Id    : 89064E22-C503-44DA-9C65-9385C29D09A1
101 4 J. Moringen
  Type  : T
102 4 J. Moringen
  Origin: ABB03F86-655A-42EE-9D5B-26D34C922A3A
103 4 J. Moringen
Timestamps
104 4 J. Moringen
  Create : 2011-07-16T00:28:52.123994+02:00
105 4 J. Moringen
  Send   : 2011-07-16T00:28:52.124095+02:00
106 4 J. Moringen
  Receive: 2011-07-16T00:28:52.235294+02:00
107 4 J. Moringen
  Deliver: 2011-07-16T00:28:52.243197+02:00
108 4 J. Moringen
Payload (RUNNING.EXAMPLE:IMAGE)
109 4 J. Moringen
  #<IMAGE {1005B10C81}>
110 4 J. Moringen
    Meta-Data: #<META-DATA {10063AF2B1}>
111 4 J. Moringen
                 Key  : "foo"
112 4 J. Moringen
                 Value: "bar"
113 4 J. Moringen
    Width    : 20
114 4 J. Moringen
    Height   : 30
115 4 J. Moringen
    Depths   : 20
116 4 J. Moringen
               10
117 1 J. Moringen
    Data     : 01 02 03 04 
118 1 J. Moringen
-------------------------------------------------------------------------------
119 9 J. Moringen
</pre>
120 9 J. Moringen
121 9 J. Moringen
h3. RPC Call
122 9 J. Moringen
123 9 J. Moringen
The call tool can be used to invoke methods of RSB RPC servers.
124 9 J. Moringen
125 9 J. Moringen
|_.Implementation Language |_.Project      |_.Repository Link          |_.Compiled Binary |
126 9 J. Moringen
| Common Lisp              | cl-rsb-tools  | source:trunk/cl-rsb-tools | "Linux i686":https://ci.cor-lab.de/job/cl-rsb-tools/label=ubuntu_lucid_32bit/lastSuccessfulBuild/artifact/build/logger-builtin-spread, "Linux x86_64":https://ci.cor-lab.de/job/cl-rsb-tools,/label=ubuntu_lucid_64bit/lastSuccessfulBuild/artifact/build/logger-builtin-spread, "MacOS x86_64":https://ci.cor-lab.de/job/cl-rsb-tools/label=MAC_OS_lion_64bit/ |
127 9 J. Moringen
128 9 J. Moringen
_Example:_
129 9 J. Moringen
In this example, the @call@ tool is used to invoke the @terminate@ method of the remote server at scope @/control@ without an argument.
130 9 J. Moringen
<pre>
131 9 J. Moringen
[jmoringe@azurit logger]$ ./call 'spread:/control/terminate()'
132 9 J. Moringen
[jmoringe@azurit logger]$ 
133 4 J. Moringen
</pre>
134 4 J. Moringen
135 1 J. Moringen
h2. System-level and Debugging Tools
136 1 J. Moringen
137 1 J. Moringen
h3. Spread Sniffer
138 1 J. Moringen
139 1 J. Moringen
The Spread sniffer tool allows debugging low-level communication when the Spread transport is used. It displays raw payloads of Spread messages and, if possible, the corresponding decoded @Notification@ objects.
140 3 J. Moringen
141 3 J. Moringen
|_.Implementation Language |_.Project      |_.Repository Link          |_.Compiled Binary |
142 3 J. Moringen
| Common Lisp              | cl-rsb-tools  | source:trunk/cl-rsb-tools | TODO             |
143 1 J. Moringen
144 1 J. Moringen
_Example:_
145 1 J. Moringen
<pre>
146 1 J. Moringen
[jmoringe@azurit build]$ ./spread-sniffer
147 1 J. Moringen
0000 12 10 73 F4 31 91 9D C2 48 C4 9C A9 92 33 03 ED 2A AB 32 05 2F 66 6F 6F 2F 
148 1 J. Moringen
0019 3A 0C 75 74 66 2D 38 2D 73 74 72 69 6E 67 4A 03 62 61 72 58 01 60 00 7A 24 
149 1 J. Moringen
0032 0A 10 62 AB 33 5F 9A F7 4A FE B2 D1 86 7B 81 3D 60 26 10 95 99 B0 85 FF E4 
150 1 J. Moringen
004B A9 02 18 CB 99 B0 85 FF E4 A9 02 
151 1 J. Moringen
#<NOTIFICATION {10046DFF41}>
152 1 J. Moringen
  Version       : 31 2E 30 ("1.0")
153 1 J. Moringen
  Id            : 73 F4 31 91 9D C2 48 C4 9C A9 92 33 03 ED 2A AB 
154 1 J. Moringen
  Scope         : 2F 66 6F 6F 2F ("/foo/")
155 1 J. Moringen
  Wire-Schema   : 75 74 66 2D 38 2D 73 74 72 69 6E 67 ("utf-8-string")
156 1 J. Moringen
  Data          : 62 61 72 ("bar")
157 1 J. Moringen
  Meta-Data     : #<META-DATA {10047D8681}>
158 1 J. Moringen
                    Sender-Id   : 62 AB 33 5F 9A F7 4A FE B2 D1 86 7B 81 3D 60 26 
159 1 J. Moringen
                    Create-Time : 1309689890213013
160 1 J. Moringen
                    Send-Time   : 1309689890213067
161 1 J. Moringen
                    Receive-Time: 0
162 1 J. Moringen
                    Deliver-Time: 0
163 1 J. Moringen
                    User-Times  : <empty sequence>
164 1 J. Moringen
                    User-Infos  : <empty sequence>
165 1 J. Moringen
  Num-Data-Parts: 1
166 1 J. Moringen
  Data-Part     : 0
167 1 J. Moringen
  Method        : <empty sequence>
168 1 J. Moringen
</pre>