void AppClient::decode(const Msg& msg, bool complete) { switch (msg.getPayload().getDataType()) { case DataType::SeriesEnum: { if (msg.getName() == "RWFFld") { //APIQA dataDictionary.decodeFieldDictionary(msg.getPayload().getSeries(), filter); if (complete) { fldComplete = true; } } else if (msg.getName() == "RWFEnum") { //APIQA dataDictionary.decodeEnumTypeDictionary(msg.getPayload().getSeries(), filter); if (complete) { enumComplete = true; } } if (fldComplete && enumComplete) { cout << endl << "Dictionary download complete" << endl; cout << "Dictionary Id : " << dataDictionary.getDictionaryId() << endl; cout << "Dictionary field version : " << dataDictionary.getFieldVersion() << endl; cout << "Number of dictionary entries : " << dataDictionary.getEntries().size() << endl; if ( dumpDictionary ) cout << dataDictionary << endl; } } } }
void AppClient::decode(const Msg& msg, bool complete) { switch (msg.getPayload().getDataType()) { case DataType::FieldListEnum: decode(msg.getPayload().getFieldList()); break; case DataType::SeriesEnum: { if (msg.getName() == "RWFFld") { dataDictionary.decodeFieldDictionary(msg.getPayload().getSeries(), DICTIONARY_NORMAL); if (complete) { fldDictComplete = true; } } else if (msg.getName() == "RWFEnum") { dataDictionary.decodeEnumTypeDictionary(msg.getPayload().getSeries(), DICTIONARY_NORMAL); if (complete) { enumTypeComplete = true; } } if (fldDictComplete && enumTypeComplete) { cout << dataDictionary << endl; } } } }