summaryrefslogtreecommitdiff
path: root/src/csta.erl
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-10-29 14:00:41 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-10-29 14:00:41 +0100
commitfc86381ccac10fa30aefe76996a716ae1d677f5b (patch)
treec7a0c6c2ab9ab0c254bdb01088c2aad3119ff277 /src/csta.erl
parentb9697094228db7832e75a8699a2678338f7c7c22 (diff)
Prepare for rebar
Diffstat (limited to 'src/csta.erl')
-rw-r--r--src/csta.erl35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/csta.erl b/src/csta.erl
new file mode 100644
index 0000000..60aaaee
--- /dev/null
+++ b/src/csta.erl
@@ -0,0 +1,35 @@
+-module(csta).
+
+-export([lines/1, decode/1, snapshot/1]).
+-export([decodeStatus/1, statusOk/0]).
+
+-include("CSTA-escape-service.hrl").
+-include("CSTA-snapshot-device.hrl").
+-include("CSTA-device-identifiers.hrl").
+
+decode(Data) ->
+ 'CSTA-escape-service':decode('EscapeArgument', Data).
+
+lines(co) ->
+ lines(networkInterface);
+
+lines(ext) ->
+ lines(station);
+
+lines(Device) ->
+ 'CSTA-escape-service':encode('EscapeArgument', #'EscapeArgument'{
+ privateData = {private,
+ {kmeSystemData, {getSystemData, {request, {deviceList,
+ {category, {standardDevice, Device}}}}}}}}).
+
+decodeStatus(Data) ->
+ 'CSTA-system-status':decode('SystemStatusArg', Data).
+
+statusOk() ->
+ 'CSTA-system-status':encode('SystemStatusRes', {noData, []}).
+
+snapshot(Device) ->
+ 'CSTA-snapshot-device':encode('SnapshotDeviceArgument',
+ #'SnapshotDeviceArgument'{
+ snapshotObject = #'DeviceID'{
+ deviceIdentifier = {deviceNumber, Device}}}).