void SporadicFrameEditDlg::vPrepareUIForEditMode() { IFrame* pouFrame = *m_pouFrame; std::string strName; if ( nullptr != pouFrame ) { unsigned int nUid; pouFrame->GetFrameId(nUid); pouFrame->GetName(strName); QString strTitle = "Edit SporadicFrame - "; strTitle+= + strName.c_str(); setWindowTitle(strTitle); ui.editFrameName->setText(strName.c_str()); } }
ERRORCODE CCommonLDFGenerator::nGetConfigurableFrames(ostringstream& omConfigFrames, std::string strLDFVersion ,std::list<ConfigFrameDetails> listFrames) { if(listFrames.size() <= 0 && strLDFVersion == defLIN_VERSION_1_3) { return EC_FAILURE; } std::string strFrameName; FrameProps omFrameProps; IFrame* pFrame = nullptr; UID_ELEMENT unElmntId = INVALID_UID_ELEMENT; omConfigFrames << defLIN_CONFIG_FRAMES << defOPEN_BRACE << endl; int ninde = 0; for(auto itrFrame : listFrames) { unElmntId = itrFrame.m_uidFrame; m_ouCluster->GetElement(eFrameElement, unElmntId, (IElement**)&pFrame); if(nullptr != pFrame) { unsigned int unFrameId = 0; pFrame->GetName(strFrameName); pFrame->GetProperties(omFrameProps); pFrame->GetFrameId(unFrameId); if(strLDFVersion == defLIN_VERSION_2_0)// slave version { omConfigFrames << defTAB << defTWOTAB << strFrameName.c_str() << defEQUAL << defHEX << std::hex << itrFrame.m_unConfigMsgId << defSEMICOLON; } else if(strLDFVersion == defLIN_VERSION_2_1) { omConfigFrames << defTAB << defTWOTAB << strFrameName.c_str() << defSEMICOLON; } } } omConfigFrames << defTWOTAB << defCLOSE_BRACE; return EC_SUCCESS; }