summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-10-27 21:08:26 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-10-27 21:08:26 +0100
commitac3375247bb62914d54478aae3c588536032d472 (patch)
treed5d813de83aff09579ffec166f604df4bffe85cd
parentc471a45bd62883dc8788233228776c3cf52f9daf (diff)
CO stub
-rw-r--r--tda.erl10
-rw-r--r--tda.txt14
2 files changed, 23 insertions, 1 deletions
diff --git a/tda.erl b/tda.erl
index 395f516..ba17d58 100644
--- a/tda.erl
+++ b/tda.erl
@@ -1,7 +1,7 @@
-module(tda).
-export([start/0, client/1, stop/0]).
--export([ext/0]).
+-export([ext/0, co/0]).
-define(TIMEOUT, 300000).
-define(CONNECT_TIMEOUT, 3000).
@@ -12,6 +12,7 @@ start() -> register(tdaPid, spawn(?MODULE, client, [{dial, ?HOST, ?PORT}])).
stop() -> tdaPid ! {logout}.
ext() -> tdaPid ! {ext}.
+co() -> tdaPid ! {co}.
client({dial, Host, Port}) ->
io:format("Dial ~p:~p~n", [Host, Port]),
@@ -48,6 +49,13 @@ loop(Sock) ->
io:format("Send: ~p~n", [Rq]),
gen_tcp:send(Sock, Rq),
loop(Sock);
+ {co} ->
+ io:format("Request CO lines~n", []),
+ {ok, Rq} = rose:invoke({present, 2},
+ {local, 51}, csta:co_lines()),
+ io:format("Send: ~p~n", [Rq]),
+ gen_tcp:send(Sock, Rq),
+ loop(Sock);
{tcp, Sock, Msg} ->
io:format("Reply ~p~n", [Msg]),
case decode(Sock, Msg) of
diff --git a/tda.txt b/tda.txt
index 37f6983..65dabd0 100644
--- a/tda.txt
+++ b/tda.txt
@@ -39,6 +39,13 @@ A1 16 ROSE Invoke
A0 03 DeviceCategory
0A 01 02 networkInterface
+Response?
+7e c
+ a1 a
+ a4 8
+ a4 6
+ 4 4 30 41 36 46
+
request Ext lines
A1 16 ROSE Invoke
02 02 06 02 invodeId present X
@@ -51,6 +58,13 @@ A1 16 ROSE Invoke
A0 03 DeviceCategory
0A 01 05 station
+Response?
+7e c
+ a1 a
+ a4 8
+ a4 6
+ 4 4 30 41 36 42
+
monitor 111
A1 11
02 01 78