|
|
|
@ -1072,8 +1072,118 @@ void CIncSourceTestDlgDlg::loadA2lFile(std::string strFilePath) |
|
|
|
|
|
|
|
} |
|
|
|
std::cout << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
const auto& rec_list = module->RecordLayouts(); |
|
|
|
//EXPECT_GT(rec_list.size(), 0);
|
|
|
|
std::cout << "\t\tRECORD LAYOUT" << std::endl; |
|
|
|
for (const auto& [rec_name, rec] : rec_list) { |
|
|
|
A2L_RECORDLAYOUT recordlayout; |
|
|
|
|
|
|
|
recordlayout.m_strName = rec_name; |
|
|
|
recordlayout.m_nPosition = rec->FncValues().Position; |
|
|
|
if (rec->FncValues().DataType == a2l::A2lDataType::UBYTE) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_UBYTE; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::SBYTE) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_SBYTE; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::UWORD) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_UWORD; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::SWORD) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_SWORD; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::ULONG) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_ULONG; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::SLONG) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_SLONG; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::A_UINT64) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_UINT64; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::A_INT64) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_INT64; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::FLOAT16_IEEE) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_FLOAT16_IEEE; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::FLOAT32_IEEE) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_FLOAT32_IEEE; |
|
|
|
else if (rec->FncValues().DataType == a2l::A2lDataType::FLOAT64_IEEE) |
|
|
|
recordlayout.m_nDataType = A2L_DATA_TYPE::A2L_DATA_TYPE_FLOAT64_IEEE; |
|
|
|
|
|
|
|
if (rec->FncValues().IndexMode == a2l::A2lIndexMode::ALTERNATE_CURVES) |
|
|
|
recordlayout.m_strIndexMode = A2L_IndexMode::ALTERNATE_CURVES; |
|
|
|
else if (rec->FncValues().IndexMode == a2l::A2lIndexMode::ALTERNATE_WITH_X) |
|
|
|
recordlayout.m_strIndexMode = A2L_IndexMode::ALTERNATE_WITH_X; |
|
|
|
else if (rec->FncValues().IndexMode == a2l::A2lIndexMode::ALTERNATE_WITH_Y) |
|
|
|
recordlayout.m_strIndexMode = A2L_IndexMode::ALTERNATE_WITH_Y; |
|
|
|
else if (rec->FncValues().IndexMode == a2l::A2lIndexMode::COLUMN_DIR) |
|
|
|
recordlayout.m_strIndexMode = A2L_IndexMode::COLUMN_DIR; |
|
|
|
else if (rec->FncValues().IndexMode == a2l::A2lIndexMode::ROW_DIR) |
|
|
|
recordlayout.m_strIndexMode = A2L_IndexMode::ROW_DIR; |
|
|
|
|
|
|
|
if (rec->FncValues().AddressType == a2l::A2lAddressType::PBYTE) |
|
|
|
recordlayout.m_strAddressType = A2L_AddressType::PBYTE; |
|
|
|
else if (rec->FncValues().AddressType == a2l::A2lAddressType::PWORD) |
|
|
|
recordlayout.m_strAddressType = A2L_AddressType::PWORD; |
|
|
|
else if (rec->FncValues().AddressType == a2l::A2lAddressType::PLONG) |
|
|
|
recordlayout.m_strAddressType = A2L_AddressType::PLONG; |
|
|
|
else if (rec->FncValues().AddressType == a2l::A2lAddressType::PLONGLONG) |
|
|
|
recordlayout.m_strAddressType = A2L_AddressType::PLONGLONG; |
|
|
|
else if (rec->FncValues().AddressType == a2l::A2lAddressType::DIRECT) |
|
|
|
recordlayout.m_strAddressType = A2L_AddressType::DIRECT; |
|
|
|
|
|
|
|
m_stA2LData.m_stRecordLayouts.m_RecordLayoutList.push_back(recordlayout); |
|
|
|
} |
|
|
|
std::cout << std::endl; |
|
|
|
|
|
|
|
const auto& characteristic_list = module->Characteristics(); |
|
|
|
//EXPECT_GT(characteristic_list.size(), 0);
|
|
|
|
std::cout << "\t\tCHARACTERISTIC" << std::endl; |
|
|
|
|
|
|
|
AddLogString(string_format("chracteristics : %d", characteristic_list.size())); |
|
|
|
int i = 0; |
|
|
|
for (const auto& [char_name, characteristic] : characteristic_list) { |
|
|
|
std::cout << char_name << " " << characteristic->Description() << std::endl; |
|
|
|
|
|
|
|
A2L_CHARACTERISTIC character; |
|
|
|
character.m_strName = char_name; |
|
|
|
character.m_strDescription = characteristic->Description(); |
|
|
|
|
|
|
|
if ( characteristic->Type() == a2l::A2lCharacteristicType::ASCII ) |
|
|
|
character.m_cType = A2L_CHRACTERISTICS_TYPE::ASCII; |
|
|
|
else if(characteristic->Type() == a2l::A2lCharacteristicType::CURVE) |
|
|
|
character.m_cType = A2L_CHRACTERISTICS_TYPE::CURVE; |
|
|
|
else if (characteristic->Type() == a2l::A2lCharacteristicType::MAP) |
|
|
|
character.m_cType = A2L_CHRACTERISTICS_TYPE::MAP; |
|
|
|
else if (characteristic->Type() == a2l::A2lCharacteristicType::CUBOID) |
|
|
|
character.m_cType = A2L_CHRACTERISTICS_TYPE::CUBOID; |
|
|
|
else if (characteristic->Type() == a2l::A2lCharacteristicType::CUBE_4) |
|
|
|
character.m_cType = A2L_CHRACTERISTICS_TYPE::CUBE_4; |
|
|
|
else if (characteristic->Type() == a2l::A2lCharacteristicType::CUBE_5) |
|
|
|
character.m_cType = A2L_CHRACTERISTICS_TYPE::CUBE_5; |
|
|
|
else if (characteristic->Type() == a2l::A2lCharacteristicType::VAL_BLK) |
|
|
|
character.m_cType = A2L_CHRACTERISTICS_TYPE::VAL_BLK; |
|
|
|
else if (characteristic->Type() == a2l::A2lCharacteristicType::VALUE) |
|
|
|
character.m_cType = A2L_CHRACTERISTICS_TYPE::VALUE; |
|
|
|
|
|
|
|
character.m_nAddress = characteristic->Address(); |
|
|
|
character.m_strRecordLayoutName = characteristic->Deposit(); |
|
|
|
character.m_nMaxDiff = characteristic->MaxDiff(); |
|
|
|
character.m_strCompuMothod = characteristic->Conversion(); |
|
|
|
character.m_nLowerLimit = characteristic->LowerLimit(); |
|
|
|
character.m_nUpperLimit = characteristic->UpperLimit(); |
|
|
|
//character.m_nLowerLimitEx = characteristic->LowerLimit();
|
|
|
|
character.m_strSymbolLink = characteristic->SymbolLink().SymbolName; |
|
|
|
character.m_nSymbolOffset = characteristic->SymbolLink().Offset; |
|
|
|
character.m_nLowerLimit = characteristic->ExtendedLimits().LowerLimits; |
|
|
|
character.m_nUpperLimit = characteristic->ExtendedLimits().UpperLimits; |
|
|
|
|
|
|
|
if (characteristic->MatrixDim().size() > 0) { |
|
|
|
for (int cnt = 0; cnt < characteristic->MatrixDim().size(); cnt++) |
|
|
|
character.m_MatrixDimSizeList.push_back(characteristic->MatrixDim().at(cnt)); |
|
|
|
} |
|
|
|
|
|
|
|
m_stA2LData.m_stCharacteristics.m_CharacteristicList.push_back(character); |
|
|
|
|
|
|
|
} |
|
|
|
std::cout << std::endl; |
|
|
|
|
|
|
|
AddLogString(""); |
|
|
|
|
|
|
|
const auto& axis_list = module->AxisPtss(); |
|
|
|
//EXPECT_GT(axis_list.size(), 1);
|
|
|
|
std::cout << "\t\tAXIS PTS" << std::endl; |
|
|
|
@ -1092,22 +1202,6 @@ void CIncSourceTestDlgDlg::loadA2lFile(std::string strFilePath) |
|
|
|
|
|
|
|
AddLogString(""); |
|
|
|
|
|
|
|
const auto& characteristic_list = module->Characteristics(); |
|
|
|
//EXPECT_GT(characteristic_list.size(), 0);
|
|
|
|
std::cout << "\t\tCHARACTERISTIC" << std::endl; |
|
|
|
|
|
|
|
AddLogString(string_format("chracteristics : %d", characteristic_list.size())); |
|
|
|
int i = 0; |
|
|
|
for (const auto& [char_name, characteristic] : characteristic_list) { |
|
|
|
std::cout << char_name << " " << characteristic->Description() << std::endl; |
|
|
|
AddLogString(string_format(" %d : %s", i, characteristic->Description().c_str())); |
|
|
|
} |
|
|
|
std::cout << std::endl; |
|
|
|
|
|
|
|
AddLogString(""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto& compu_tab_list = module->CompuTabs(); |
|
|
|
//EXPECT_GT(compu_tab_list.size(), 0);
|
|
|
|
std::cout << "\t\tCOMPU TAB" << std::endl; |
|
|
|
@ -1166,13 +1260,7 @@ void CIncSourceTestDlgDlg::loadA2lFile(std::string strFilePath) |
|
|
|
|
|
|
|
AddLogString(""); |
|
|
|
|
|
|
|
const auto& rec_list = module->RecordLayouts(); |
|
|
|
//EXPECT_GT(rec_list.size(), 0);
|
|
|
|
std::cout << "\t\tRECORD LAYOUT" << std::endl; |
|
|
|
for (const auto& [rec_name, rec] : rec_list) { |
|
|
|
std::cout << rec_name << std::endl; |
|
|
|
} |
|
|
|
std::cout << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
const auto& trans_list = module->Transformers(); |
|
|
|
//EXPECT_GT(trans_list.size(), 0);
|
|
|
|
|