Now you can list all vms with __get_vms (just for testing)

This commit is contained in:
Jonatan Pålsson 2011-02-01 16:37:45 +01:00
parent af75d731b4
commit 3d8b413a8f
3 changed files with 10 additions and 4 deletions

View file

@ -8,6 +8,8 @@ parse(Data) ->
Message = string:tokens(Data, " "),
io:format(Message),
case Message of
["__get_vms"] ->
{vms};
[RefID, "__error", Size, Message ] ->
{ok, you_said_error};
[_, "__boot", _ ] ->
@ -23,10 +25,12 @@ parse(Data) ->
[RefID, "__echo", Length, Msg ] ->
{Ref, _} = string:to_integer(RefID),
{echo, Ref, Length, Msg};
[RefID, Command, _, Parameter ] ->
{cmd, Command, Parameter};
%% Debugging tools, not for production use
["__crash"] ->
{crash, 0};
[RefID, Command, _, Parameter ] ->
{cmd, Command, Parameter};
%% End debugging tools
Other ->
{out_of_bounds, Other}
end.