No subject
Papa Tana
papa.tana101@REDACTED
Fri Jul 31 21:11:05 CEST 2020
Hi,
I receive Msg from some device in the network, and Msg exist only in 2
versions, like below :
Version1:
-------------
Msg = [{outnum,"configure"}].
OR
Version2:
-------------
Msg =
[{outnum,"configure"},
{innum, challenge,"Rand","Kc"},
{innum, response ,"Rand","Sres"}].
I tried to make a list comprehension but the structure of each item is
different depending it's a outnum(2) or an innum(4).
I need to process the Msg list, so that:
- if Msg is type Version 1, ie contains outnum ONLY, do action for outnum;
- if Msg contains BOTH innum + outnum (Version2), do action inoutnum;
Can anyone advice please?
Thanks,
More information about the erlang-questions
mailing list