No subject

Papa Tana papa.tana101@REDACTED
Fri Jul 31 21:11:05 CEST 2020


I receive Msg from some device in the network, and Msg exist only in 2
versions, like below :

Msg = [{outnum,"configure"}].


Msg =
 {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?


More information about the erlang-questions mailing list