Datasheet
API Ruby class
201
>>> '!fatal' (6)
>>> 'session terminated on request' (29)
>>> END-OF SENTENCE
[[{"!re"=>nil, "rx-bits-per-second"=>"326944", "tx-bits-per-second"=>"1175812", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"84251", "tx-bits-per-second"=>"444610", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"111604", "tx-bits-per-second"=>"21782", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"116277", "tx-bits-per-second"=>"681", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"116277", "tx-bits-per-second"=>"681", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"339747", "tx-bits-per-second"=>"14495", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"106012", "tx-bits-per-second"=>"3952", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"118867", "tx-bits-per-second"=>"17370", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"130582", "tx-bits-per-second"=>"29941", ".tag"=>"2"},
{"!re"=>nil, "rx-bits-per-second"=>"130582", "tx-bits-per-second"=>"29941", ".tag"=>"2"},
{"!trap"=>nil, "category"=>"2", "message"=>"interrupted", ".tag"=>"2"},
{"!done"=>nil, ".tag"=>"2"}]]
Notes
•• This has only been testing using Ruby 1.9.2 and Ruby 1.8.7 on several FreeBSD hosts, though it should work
identically on other Ruby installations.
•• Encoding/decoding longer words has NOT be thoroughly tested.
•• Connection timeouts and auto-reconnections are NOT implemented.
•• The above examples are single-threaded, but it is probably be safe to use within a multi-threaded Ruby
application (untested).
•• The gem uses an event driven callback style to send commands and receive responses. Multiple simultaneous
commands may be executing over a single TCP API connection. If one fully utilizes the event-loop style of
programming, one could have a single-threaded single process simultaneously executing many commands over
many separate TCP API connections to different devices. To do so, one has to be careful to implement a main
event loop to avoid blocking.
See the author's web site in the external links below for a link to the CHANGELOG.
References
[1] http:/ / www. aarongifford. com/ computers/ mtik/ latest/ pkg/ mtik-4. 0. 0. gem
[2] http:/ / www. aarongifford. com/ computers/ mtik/ latest/ doc/
[3] http:/ / www. aarongifford. com/ computers/ mtik/ latest/ bin/ tikcli
[4] http:/ / www. aarongifford. com/ computers/ mtik/ latest/ bin/ tikcommand
[5] http:/ / www. aarongifford. com/ computers/ mtik/ latest/ bin/ tikfetch
[6] http:/ / www. aarongifford. com/ computers/ mtik/ latest/ examples/ tikjson. rb










