FACT++  1.0
GCN::PaketType_t ConnectionGCN::GetType ( const QDomElement &  what)
inlineprivate

Definition at line 46 of file gcn.cc.

References i.

47  {
48  const QDomNodeList param = what.elementsByTagName("Param");
49  for (int i=0; i<param.count(); i++)
50  {
51  const QDomElement elem = param.at(i).toElement();
52  if (elem.attribute("name").toStdString()!="Packet_Type")
53  continue;
54 
55  const uint16_t val = elem.attribute("value").toUInt();
56  const auto it = fTypes.find(val);
57  if (it!=fTypes.end())
58  return it->second;
59 
60  Warn("Unknown paket type "+to_string(val)+".");
61  }
62 
63  return { -1, "", "" };
64  }
map< uint16_t, GCN::PaketType_t > fTypes
Definition: gcn.cc:33
int i
Definition: db_dim_client.c:21