summaryrefslogtreecommitdiff
path: root/src/status.erl
blob: b12b54e07bb5f1c97eafab25e5b687d41bf0a3bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-module(status).

-export([opcode/0, decode/1, encode/0, value/1]).

-include("CSTA-system-status.hrl").

opcode() ->
	{local, 211}.

decode(Data) ->
	'CSTA-system-status':decode('SystemStatusArg', Data).

encode() ->
	'CSTA-system-status':encode('SystemStatusRes', {noData, []}).

value({ok, #'SystemStatusArg'{systemStatus = Status}}) ->
	Status;

value(Data) ->
	value(decode(Data)).