summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-10-23 16:35:55 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-10-23 16:35:55 +0200
commit84dfc90b6b311fdef45755889ab335d4a30328a7 (patch)
treea7d47feeec4dc4c5388b89a87ee56ea085f5b87f
parente0125b84c61b2b045b9b5e4ce8d3afa1070dd5fe (diff)
Experimental
-rw-r--r--tda.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/tda.erl b/tda.erl
index 6c0f901..5d26350 100644
--- a/tda.erl
+++ b/tda.erl
@@ -58,6 +58,9 @@ associate_abort(Bin) ->
% <<161,12,2,1,1,2,2,0,211,48,3,10,1,2>>
% <<162,11,2,1,1,48,6,2,2,0,211,5,0>>
system_status(Bin) ->
- % broken, no Invoke type
- {ok, Invoke} = 'Remote-Operations-Generic-ROS-PDUs':decode('Invoke', Bin),
- Invoke.
+ Inv = #'Invoke'{invokeId = 1, opcode = {local, 211}},
+ io:format("~p~n", [Inv]),
+ case 'Remote-Operations-Generic-ROS-PDUs':encode('Invoke', Inv) of
+ {ok, Invoke} -> Invoke;
+ {error, Reason} -> Reason
+ end.