summaryrefslogtreecommitdiff
path: root/src/escape.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/escape.erl')
-rw-r--r--src/escape.erl25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/escape.erl b/src/escape.erl
index 63acdb1..30db37c 100644
--- a/src/escape.erl
+++ b/src/escape.erl
@@ -17,17 +17,20 @@ lines(Device) ->
{deviceList, {category, {standardDevice, Device}}}}}}}}).
privateData({ok, #'EscapeArgument'{privateData = Data}}) ->
- Private = private(Data),
- io:format("Private Data ~p~n", [Private]).
-
-private({private, Private}) ->
- private(Private);
-private({kmeSystemData, Data}) ->
- private(Data);
-private({systemDataLinkedReply, #'KmeSystemDataLinkedReply'{lastSegment = false, sysData = Data}}) ->
- Data;
-private({systemDataLinkedReply, #'KmeSystemDataLinkedReply'{lastSegment = true, sysData = Data}}) ->
- Data.
+ private(Data).
+
+private({private, {kmeSystemData, Data}}) ->
+ io:format("kmeSystemData ~p~n", [linked(Data)]).
+
+linked({systemDataLinkedReply, #'KmeSystemDataLinkedReply'{lastSegment = false, sysData = Data}}) ->
+ stateEntry(Data);
+linked({systemDataLinkedReply, #'KmeSystemDataLinkedReply'{lastSegment = true, sysData = Data}}) ->
+ stateEntry(Data).
+
+stateEntry(#'KmeGetSystemDataRsp'{deviceList = List}) when List =/= asn1_NOVALUE ->
+ List;
+stateEntry(#'KmeGetSystemDataRsp'{pbxType = Type}) when Type =/= asn1_NOVALUE ->
+ pbxType(Type).
deviceData(Device) ->
'CSTA-escape-service':encode('EscapeArgument', #'EscapeArgument'{