OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
RFImplementationDialog Class Reference

#include <RFImplementationDialog.hh>

Inheritance diagram for RFImplementationDialog:
Inheritance graph
Collaboration diagram for RFImplementationDialog:
Collaboration graph

Public Member Functions

 RFImplementationDialog (wxWindow *parent, wxWindowID id, HDB::RFImplementation &implementation)
 
virtual ~RFImplementationDialog ()
 

Private Types

enum  {
  ID_LABEL_NAME = 10000 , ID_NAME , ID_LABEL_CLK_PORT , ID_CLK_PORT ,
  ID_LABEL_RESET_PORT , ID_RESET_PORT , ID_LABEL_GLOCK_PORT , ID_GLOCK_PORT ,
  ID_LABEL_GUARD_PORT , ID_GUARD_PORT , ID_LABEL_SIZE_PARAMETER , ID_SIZE_PARAMETER ,
  ID_LABEL_WIDTH_PARAMETER , ID_WIDTH_PARAMETER , ID_LABEL_SAC , ID_SAC ,
  ID_PORT_LIST , ID_ADD_PORT , ID_MODIFY_PORT , ID_DELETE_PORT ,
  ID_SOURCE_LIST , ID_ADD_SOURCE , ID_DELETE_SOURCE , ID_MOVE_SOURCE_UP ,
  ID_MOVE_SOURCE_DOWN , ID_LINE , ID_EXTERNAL_PORT_LIST , ID_ADD_EXTERNAL_PORT ,
  ID_EDIT_EXTERNAL_PORT , ID_DELETE_EXTERNAL_PORT , ID_PARAMETER_LIST , ID_EDIT_PARAMETER ,
  ID_ADD_PARAMETER , ID_DELETE_PARAMETER , ID_SIZE_CHOICE , ID_WIDTH_CHOICE
}
 Window indentifiers for dialog widgets. More...
 
enum  { RBOX_FALSE = 0 , RBOX_TRUE }
 

Private Member Functions

void onOK (wxCommandEvent &event)
 
void update ()
 
HDB::RFPortImplementationselectedPort ()
 
HDB::RFExternalPortselectedExternalPort ()
 
HDB::RFImplementation::Parameter selectedParameter ()
 
void onSACchoise (wxCommandEvent &event)
 
void onPortSelection (wxListEvent &event)
 
void onAddPort (wxCommandEvent &event)
 
void onModifyPort (wxCommandEvent &event)
 
void onDeletePort (wxCommandEvent &event)
 
void onExternalPortActivation (wxListEvent &event)
 
void onExternalPortSelection (wxListEvent &event)
 
void onAddExternalPort (wxCommandEvent &event)
 
void onEditExternalPort (wxCommandEvent &event)
 
void onDeleteExternalPort (wxCommandEvent &event)
 
void onParameterActivation (wxListEvent &event)
 
void onParameterSelection (wxListEvent &event)
 
void onAddParameter (wxCommandEvent &event)
 
void onEditParameter (wxCommandEvent &event)
 
void onDeleteParameter (wxCommandEvent &event)
 
void onSourceFileSelection (wxListEvent &event)
 
void onAddSourceFile (wxCommandEvent &event)
 
void onDeleteSourceFile (wxCommandEvent &event)
 
void onMoveSourceFileUp (wxCommandEvent &)
 
void onMoveSourceFileDown (wxCommandEvent &)
 
void onSizeChoice (wxCommandEvent &event)
 
void onWidthChoice (wxCommandEvent &event)
 
wxString getWidthParameter ()
 
wxString getSizeParameter ()
 
wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 

Private Attributes

HDB::RFImplementationimplementation_
 RF Implementation to modify.
 
wxListCtrl * portList_
 Pointer to the port list widget.
 
wxListCtrl * sourceList_
 Pointer to the source file list widget.
 
wxListCtrl * externalPortList_
 Pointer to the external port list widget.
 
wxListCtrl * parameterList_
 Pointer to the parameter list widget.
 
wxChoice * sizeChoice_
 Pointer to size parameter choice widget.
 
wxChoice * widthChoice_
 Pointer to width parameter choice widget.
 
wxString name_
 
wxString clkPort_
 
wxString rstPort_
 
wxString gLockPort_
 
wxString guardPort_
 
bool sacParam_
 

Detailed Description

Dialog for editing RF implementations.

Definition at line 45 of file RFImplementationDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Window indentifiers for dialog widgets.

Enumerator
ID_LABEL_NAME 
ID_NAME 
ID_LABEL_CLK_PORT 
ID_CLK_PORT 
ID_LABEL_RESET_PORT 
ID_RESET_PORT 
ID_LABEL_GLOCK_PORT 
ID_GLOCK_PORT 
ID_LABEL_GUARD_PORT 
ID_GUARD_PORT 
ID_LABEL_SIZE_PARAMETER 
ID_SIZE_PARAMETER 
ID_LABEL_WIDTH_PARAMETER 
ID_WIDTH_PARAMETER 
ID_LABEL_SAC 
ID_SAC 
ID_PORT_LIST 
ID_ADD_PORT 
ID_MODIFY_PORT 
ID_DELETE_PORT 
ID_SOURCE_LIST 
ID_ADD_SOURCE 
ID_DELETE_SOURCE 
ID_MOVE_SOURCE_UP 
ID_MOVE_SOURCE_DOWN 
ID_LINE 
ID_EXTERNAL_PORT_LIST 
ID_ADD_EXTERNAL_PORT 
ID_EDIT_EXTERNAL_PORT 
ID_DELETE_EXTERNAL_PORT 
ID_PARAMETER_LIST 
ID_EDIT_PARAMETER 
ID_ADD_PARAMETER 
ID_DELETE_PARAMETER 
ID_SIZE_CHOICE 
ID_WIDTH_CHOICE 

Definition at line 95 of file RFImplementationDialog.hh.

95 {
96 ID_LABEL_NAME = 10000,
97 ID_NAME,
111 ID_SAC,
121 ID_LINE,
122
133 };

◆ anonymous enum

anonymous enum
private
Enumerator
RBOX_FALSE 
RBOX_TRUE 

Definition at line 135 of file RFImplementationDialog.hh.

Constructor & Destructor Documentation

◆ RFImplementationDialog()

The Constructor.

Parameters
parentParent window of the dialog.
idWindow identifier for the dialog window.
implementationRF implementation to modify.

Definition at line 125 of file RFImplementationDialog.cc.

126 :
127 wxDialog(parent, id, _T("Register File Implementation")),
129
130 createContents(this, true, true);
131
132 // Initialize list and choice widgets.
133 portList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_PORT_LIST));
134 sourceList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_SOURCE_LIST));
135 externalPortList_ = dynamic_cast<wxListCtrl*>(FindWindow(
137 parameterList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_PARAMETER_LIST));
138 sizeChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_SIZE_CHOICE));
139 widthChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_WIDTH_CHOICE));
142
143 portList_->InsertColumn(0, _T("name"), wxLIST_FORMAT_LEFT, 200);
144 sourceList_->InsertColumn(0, _T("source file"), wxLIST_FORMAT_LEFT, 260);
145
146 // Add initial size and width parameter choices
147 sizeChoice_->SetSelection(sizeChoice_->Append(
149 widthChoice_->SetSelection(widthChoice_->Append(
151
152 // Create columns in list widgets.
153 externalPortList_->InsertColumn(0, _T("name"), wxLIST_FORMAT_LEFT, 260);
154 parameterList_->InsertColumn(0, _T("parameter"), wxLIST_FORMAT_LEFT, 180);
155 parameterList_->InsertColumn(1, _T("value"), wxLIST_FORMAT_LEFT, 80);
156
157 // Read string attributes from the RFImplementation object.
164
165 // Set text field validators.
166 FindWindow(ID_NAME)->SetValidator(
167 wxTextValidator(wxFILTER_ASCII, &name_));
168 FindWindow(ID_CLK_PORT)->SetValidator(
169 wxTextValidator(wxFILTER_ASCII, &clkPort_));
170 FindWindow(ID_RESET_PORT)->SetValidator(
171 wxTextValidator(wxFILTER_ASCII, &rstPort_));
172 FindWindow(ID_GLOCK_PORT)->SetValidator(
173 wxTextValidator(wxFILTER_ASCII, &gLockPort_));
174 FindWindow(ID_GUARD_PORT)->SetValidator(
175 wxTextValidator(wxFILTER_ASCII, &guardPort_));
176
177 wxRadioBox* rbox = dynamic_cast<wxRadioBox*>(FindWindow(ID_SAC));
178 rbox->SetSelection(sacParam_ ? RBOX_TRUE : RBOX_FALSE);
179
180 // Disable conditional buttons initially.
181 FindWindow(ID_DELETE_PORT)->Disable();
182 FindWindow(ID_MODIFY_PORT)->Disable();
183 FindWindow(ID_DELETE_SOURCE)->Disable();
186 FindWindow(ID_EDIT_PARAMETER)->Disable();
188
189 update();
190}
#define assert(condition)
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
bool separateAddressCycleParameter() const
std::string sizeParameter() const
std::string widthParameter() const
std::string guardPort() const
wxChoice * sizeChoice_
Pointer to size parameter choice widget.
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
wxListCtrl * sourceList_
Pointer to the source file list widget.
HDB::RFImplementation & implementation_
RF Implementation to modify.
wxListCtrl * parameterList_
Pointer to the parameter list widget.
wxListCtrl * portList_
Pointer to the port list widget.
wxListCtrl * externalPortList_
Pointer to the external port list widget.
wxChoice * widthChoice_
Pointer to width parameter choice widget.
static wxString toWxString(const std::string &source)

References assert, and WxConversion::toWxString().

Here is the call graph for this function:

◆ ~RFImplementationDialog()

RFImplementationDialog::~RFImplementationDialog ( )
virtual

The Destructor.

Definition at line 195 of file RFImplementationDialog.cc.

195 {
196}

Member Function Documentation

◆ createContents()

wxSizer * RFImplementationDialog::createContents ( wxWindow *  parent,
bool  call_fit,
bool  set_sizer 
)
private

Creates the dialog contents.

Definition at line 860 of file RFImplementationDialog.cc.

861 {
862
863 wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
864
865 wxBoxSizer *item1 = new wxBoxSizer( wxVERTICAL );
866
867 wxFlexGridSizer *item2 = new wxFlexGridSizer( 2, 0, 0 );
868
869 wxStaticText *item3 = new wxStaticText( parent, ID_LABEL_NAME,
870 wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
871 item2->Add( item3, 0, wxALIGN_RIGHT|wxALL, 5 );
872
873 wxTextCtrl *item4 = new wxTextCtrl( parent, ID_NAME, wxT(""),
874 wxDefaultPosition, wxSize(200,-1), 0 );
875 item2->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
876
877 wxStaticText *item5 = new wxStaticText( parent, ID_LABEL_CLK_PORT,
878 wxT("Clock port:"), wxDefaultPosition, wxDefaultSize, 0 );
879 item2->Add( item5, 0, wxALIGN_RIGHT|wxALL, 5 );
880
881 wxTextCtrl *item6 = new wxTextCtrl( parent, ID_CLK_PORT, wxT(""),
882 wxDefaultPosition, wxSize(80,-1), 0 );
883 item2->Add( item6, 0, wxGROW|wxALL, 5 );
884
885 wxStaticText *item7 = new wxStaticText( parent, ID_LABEL_RESET_PORT,
886 wxT("Reset port:"), wxDefaultPosition, wxDefaultSize, 0 );
887 item2->Add( item7, 0, wxALIGN_RIGHT|wxALL, 5 );
888
889 wxTextCtrl *item8 = new wxTextCtrl( parent, ID_RESET_PORT, wxT(""),
890 wxDefaultPosition, wxSize(80,-1), 0 );
891 item2->Add( item8, 0, wxGROW|wxALL, 5 );
892
893 wxStaticText *item9 = new wxStaticText( parent, ID_LABEL_GLOCK_PORT,
894 wxT("Global lock port:"), wxDefaultPosition, wxDefaultSize, 0 );
895 item2->Add( item9, 0, wxALIGN_RIGHT|wxALL, 5 );
896
897 wxTextCtrl *item10 = new wxTextCtrl( parent, ID_GLOCK_PORT, wxT(""),
898 wxDefaultPosition, wxSize(80,-1), 0 );
899 item2->Add( item10, 0, wxGROW|wxALL, 5 );
900
901 wxStaticText *item11 = new wxStaticText( parent, ID_LABEL_GUARD_PORT,
902 wxT("Guard port:"), wxDefaultPosition, wxDefaultSize, 0 );
903 item2->Add( item11, 0, wxALIGN_RIGHT|wxALL, 5 );
904
905 wxTextCtrl *item12 = new wxTextCtrl( parent, ID_GUARD_PORT, wxT(""),
906 wxDefaultPosition, wxSize(80,-1), 0 );
907 item2->Add( item12, 0, wxGROW|wxALL, 5 );
908
909 wxStaticText *item13 = new wxStaticText( parent, ID_LABEL_SIZE_PARAMETER,
910 wxT("Size parameter:"), wxDefaultPosition, wxDefaultSize, 0 );
911 item2->Add( item13, 0, wxALIGN_RIGHT|wxALL, 5 );
912
913 wxChoice *sizeChoice = new wxChoice(parent, ID_SIZE_CHOICE,
914 wxDefaultPosition, wxSize(80,-1), 0, 0, wxCB_SORT);
915 item2->Add( sizeChoice, 0, wxGROW|wxALL, 5 );
916
917 wxStaticText *item15 = new wxStaticText( parent, ID_LABEL_WIDTH_PARAMETER,
918 wxT("Width parameter:"), wxDefaultPosition, wxDefaultSize, 0 );
919 item2->Add( item15, 0, wxALIGN_RIGHT|wxALL, 5 );
920
921 wxChoice *widthChoice = new wxChoice(parent, ID_WIDTH_CHOICE,
922 wxDefaultPosition, wxSize(80,-1), 0, 0, wxCB_SORT);
923 item2->Add(widthChoice, 0, wxGROW|wxALL, 5);
924
925 wxStaticText *saclabel = new wxStaticText(parent, ID_LABEL_SAC,
926 wxT("Separate address cycle:"), wxDefaultPosition, wxDefaultSize, 0);
927 item2->Add(saclabel, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL,
928 5);
929
930 wxString choises[2] =
931 { wxT("False"), wxT("True") };
932 wxRadioBox *sacradiobox = new wxRadioBox(parent, ID_SAC, wxT(""),
933 wxDefaultPosition, wxDefaultSize, 2, choises, 0, wxRA_SPECIFY_COLS);
934 item2->Add(sacradiobox, 0, wxGROW | wxALIGN_CENTER_VERTICAL | wxALL, 5);
935
936 item1->Add( item2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
937
938 wxBoxSizer *item17 = new wxBoxSizer( wxHORIZONTAL );
939
940 wxStaticBox *item19 = new wxStaticBox( parent, -1, wxT("Ports:") );
941 wxStaticBoxSizer *item18 = new wxStaticBoxSizer( item19, wxVERTICAL );
942
943 wxListCtrl *item20 = new wxListCtrl( parent, ID_PORT_LIST,
944 wxDefaultPosition, wxSize(220,160), wxLC_REPORT|wxSUNKEN_BORDER );
945 item18->Add( item20, 0, wxGROW|wxALL, 5 );
946
947 wxBoxSizer *item21 = new wxBoxSizer( wxHORIZONTAL );
948
949 wxButton *item22 = new wxButton( parent, ID_ADD_PORT,
950 wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
951 item21->Add( item22, 0, wxALIGN_CENTER|wxALL, 5 );
952
953 wxButton *item23 = new wxButton( parent, ID_MODIFY_PORT,
954 wxT("Modify..."), wxDefaultPosition, wxDefaultSize, 0 );
955 item21->Add( item23, 0, wxALIGN_CENTER|wxALL, 5 );
956
957 wxButton *item24 = new wxButton( parent, ID_DELETE_PORT,
958 wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
959 item21->Add( item24, 0, wxALIGN_CENTER|wxALL, 5 );
960
961 item18->Add( item21, 0, wxALIGN_CENTER, 5 );
962
963 item17->Add( item18, 0, wxGROW|wxALL, 5 );
964
965 wxStaticBox *item26 = new wxStaticBox( parent, -1, wxT("Source files:") );
966 wxStaticBoxSizer *item25 = new wxStaticBoxSizer( item26, wxVERTICAL );
967
968 wxFlexGridSizer *item27_1 = new wxFlexGridSizer( 2, 0, 0 );
969
970 wxListCtrl *item27 = new wxListCtrl( parent, ID_SOURCE_LIST,
971 wxDefaultPosition, wxSize(300, 150), wxLC_REPORT|wxSUNKEN_BORDER );
972 item27_1->Add( item27, 0, wxGROW|wxALL, 5 );
973
974 wxBoxSizer *item27_2 = new wxBoxSizer( wxVERTICAL );
975
976 wxButton *item60 = new wxButton( parent, ID_MOVE_SOURCE_UP, wxT("â–´"),
977 wxDefaultPosition, wxSize(20, 20), 0 );
978 item27_2->Add( item60, 0, wxALIGN_CENTER|wxALL, 5 );
979
980 wxButton *item61 = new wxButton( parent, ID_MOVE_SOURCE_DOWN, wxT("â–¾"),
981 wxDefaultPosition, wxSize(20, 20), 0 );
982 item27_2->Add( item61, 0, wxALIGN_CENTER|wxALL, 5 );
983
984 item27_1->Add( item27_2, 0, wxALIGN_CENTER, 5 );
985
986 item25->Add( item27_1, 0, wxGROW|wxALL, 5 );
987
988 wxBoxSizer *item28 = new wxBoxSizer( wxHORIZONTAL );
989
990 wxButton *item29 = new wxButton( parent, ID_ADD_SOURCE, wxT("Add..."),
991 wxDefaultPosition, wxDefaultSize, 0 );
992 item28->Add( item29, 0, wxALL, 5 );
993
994 wxButton *item30 = new wxButton( parent, ID_DELETE_SOURCE, wxT("Delete"),
995 wxDefaultPosition, wxDefaultSize, 0 );
996 item28->Add( item30, 0, wxALIGN_CENTER|wxALL, 5 );
997
998 item25->Add( item28, 0, 0, 5 );
999
1000 item17->Add( item25, 0, wxGROW|wxALL, 5 );
1001
1002 item1->Add( item17, 0, wxALIGN_CENTER|wxALL, 5 );
1003
1004 // External ports Box //
1005 wxBoxSizer *extPortAndParamSizer = new wxBoxSizer( wxHORIZONTAL );
1006
1007 wxStaticBox *extPortBox = new wxStaticBox(parent, -1,
1008 wxT("External ports:"));
1009 wxStaticBoxSizer *extPortBoxSizer = new wxStaticBoxSizer(extPortBox,
1010 wxVERTICAL);
1011 wxListCtrl *item35 = new wxListCtrl( parent, ID_EXTERNAL_PORT_LIST,
1012 wxDefaultPosition, wxSize(200,120), wxLC_REPORT|wxSUNKEN_BORDER );
1013 extPortBoxSizer->Add( item35, 0, wxGROW|wxALL, 5 );
1014 wxBoxSizer *extPortButtons = new wxBoxSizer( wxHORIZONTAL );
1015 wxButton *addExtPort = new wxButton( parent, ID_ADD_EXTERNAL_PORT,
1016 wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0);
1017 extPortButtons->Add( addExtPort, 0, wxALL, 5 );
1018 wxButton *editExtPort = new wxButton( parent, ID_EDIT_EXTERNAL_PORT,
1019 wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0);
1020 extPortButtons->Add(editExtPort, 0, wxALIGN_CENTER|wxALL, 5);
1021 wxButton *deleteExtPort = new wxButton( parent, ID_DELETE_EXTERNAL_PORT,
1022 wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0);
1023 extPortButtons->Add(deleteExtPort, 0, wxALIGN_CENTER|wxALL, 5);
1024 extPortBoxSizer->Add(extPortButtons, 0, wxALIGN_CENTER, 5);
1025 extPortAndParamSizer->Add(extPortBoxSizer, 0,
1026 wxALL, 5);
1027
1028 // Parameter box //
1029 wxStaticBox *paramBox = new wxStaticBox(parent, -1, wxT("Parameters:"));
1030 wxStaticBoxSizer *paramBoxSizer = new wxStaticBoxSizer(paramBox,
1031 wxVERTICAL);
1032
1033 wxListCtrl *item42 = new wxListCtrl( parent, ID_PARAMETER_LIST,
1034 wxDefaultPosition, wxSize(300,120), wxLC_REPORT|wxSUNKEN_BORDER );
1035 paramBoxSizer->Add( item42, 0, wxGROW|wxALL, 5 );
1036
1037 wxBoxSizer *item43 = new wxBoxSizer( wxHORIZONTAL );
1038
1039 wxButton *item44 = new wxButton( parent, ID_ADD_PARAMETER, wxT("Add..."),
1040 wxDefaultPosition, wxDefaultSize, 0 );
1041 item43->Add( item44, 0, wxALIGN_CENTER|wxALL, 5 );
1042
1043 wxButton *item45 = new wxButton( parent, ID_EDIT_PARAMETER, wxT("Edit..."),
1044 wxDefaultPosition, wxDefaultSize, 0 );
1045 item43->Add( item45, 0, wxALIGN_CENTER|wxALL, 5 );
1046
1047 wxButton *item46 = new wxButton( parent, ID_DELETE_PARAMETER,
1048 wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1049 item43->Add( item46, 0, wxALIGN_CENTER|wxALL, 5 );
1050
1051 paramBoxSizer->Add( item43, 0,
1052 0, 5 );
1053
1054 extPortAndParamSizer->Add( paramBoxSizer, 0,
1055 wxGROW|wxALL, 5 );
1056
1057 item1 ->Add(extPortAndParamSizer, 0,
1058 wxGROW|wxALL, 5 );
1059
1060 item0->Add( item1, 0, wxGROW|wxALL, 5 );
1061
1062 wxStaticLine *item31 = new wxStaticLine( parent, ID_LINE,
1063 wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
1064 item0->Add( item31, 0, wxGROW|wxALL, 5 );
1065
1066 wxBoxSizer *item32 = new wxBoxSizer( wxHORIZONTAL );
1067
1068 wxButton *item33 = new wxButton( parent, wxID_OK, wxT("&OK"),
1069 wxDefaultPosition, wxDefaultSize, 0 );
1070 item32->Add( item33, 0, wxALIGN_CENTER|wxALL, 5 );
1071
1072 wxButton *item34 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"),
1073 wxDefaultPosition, wxDefaultSize, 0 );
1074 item32->Add( item34, 0, wxALIGN_CENTER|wxALL, 5 );
1075
1076 item0->Add( item32, 0, wxALL, 5);
1077
1078 if (set_sizer)
1079 {
1080 parent->SetSizer( item0 );
1081 if (call_fit)
1082 item0->SetSizeHints(parent);
1083 }
1084
1085 return item0;
1086}

References ID_ADD_EXTERNAL_PORT, ID_ADD_PARAMETER, ID_ADD_PORT, ID_ADD_SOURCE, ID_CLK_PORT, ID_DELETE_EXTERNAL_PORT, ID_DELETE_PARAMETER, ID_DELETE_PORT, ID_DELETE_SOURCE, ID_EDIT_EXTERNAL_PORT, ID_EDIT_PARAMETER, ID_EXTERNAL_PORT_LIST, ID_GLOCK_PORT, ID_GUARD_PORT, ID_LABEL_CLK_PORT, ID_LABEL_GLOCK_PORT, ID_LABEL_GUARD_PORT, ID_LABEL_NAME, ID_LABEL_RESET_PORT, ID_LABEL_SAC, ID_LABEL_SIZE_PARAMETER, ID_LABEL_WIDTH_PARAMETER, ID_LINE, ID_MODIFY_PORT, ID_MOVE_SOURCE_DOWN, ID_MOVE_SOURCE_UP, ID_NAME, ID_PARAMETER_LIST, ID_PORT_LIST, ID_RESET_PORT, ID_SAC, ID_SIZE_CHOICE, ID_SOURCE_LIST, and ID_WIDTH_CHOICE.

◆ getSizeParameter()

wxString RFImplementationDialog::getSizeParameter ( )
private

Returns name of currently selected size parameter.

Returns
Name of selected item or empty string if there is no valid selection.

Definition at line 800 of file RFImplementationDialog.cc.

800 {
801 return sizeChoice_->GetString(sizeChoice_->GetSelection());
802}

References sizeChoice_.

Referenced by onOK(), and update().

◆ getWidthParameter()

wxString RFImplementationDialog::getWidthParameter ( )
private

Returns name of currently selected width parameter.

Returns
Name of selected item or empty string if there is no valid selection.

Definition at line 812 of file RFImplementationDialog.cc.

812 {
813 return widthChoice_->GetString(widthChoice_->GetSelection());
814}

References widthChoice_.

Referenced by onOK(), and update().

◆ onAddExternalPort()

void RFImplementationDialog::onAddExternalPort ( wxCommandEvent &  event)
private

Event handler for the add external port button.

Opens a RFExternalPortDialog for adding a new external port.

Definition at line 439 of file RFImplementationDialog.cc.

439 {
440
441 RFExternalPort* port = new RFExternalPort(
442 "", IN, "", "", implementation_);
443
444 RFExternalPortDialog dialog(this, -1, *port, implementation_);
445
446 if (dialog.ShowModal() != wxID_OK) {
448 return;
449 }
450
451 update();
452}
void deleteExternalPort(RFExternalPort *port)
@ IN
Input port.
Definition HDBTypes.hh:41

References HDB::RFImplementation::deleteExternalPort(), implementation_, HDB::IN, and update().

Here is the call graph for this function:

◆ onAddParameter()

void RFImplementationDialog::onAddParameter ( wxCommandEvent &  event)
private

Event handler for the add parameter button.

Opens a ImplementationParameterDialog for adding a new parameter.

Definition at line 547 of file RFImplementationDialog.cc.

547 {
548
550
551 ImplementationParameterDialog dialog(this, -1, parameter);
552
553 bool error = false;
554 wxString message = _T("");
555
556 if (dialog.ShowModal() != wxID_OK) {
557 return;
558 }
559
560 if (error) {
561 ErrorDialog dialog(this, message);
562 dialog.ShowModal();
563 return;
564 }
565
566 try {
568 parameter.name, parameter.type, parameter.value);
569 } catch (IllegalParameters& e) {
570 message = _T("RF implementation already contains ");
571 message.Append(_T("a parameter\nwith name '"));
572 message.Append(WxConversion::toWxString(parameter.name));
573 message.Append(_T("'."));
574 error = true;
575 }
576
577 if (error) {
578 ErrorDialog dialog(this, message);
579 dialog.ShowModal();
580 return;
581 }
582
583 update();
584}
void addParameter(const std::string &name, const std::string &type, const std::string &value)
std::string value
Value of the parameter.
Definition HDBTypes.hh:49
std::string type
Type of the parameter.
Definition HDBTypes.hh:48
std::string name
Name of the parameter.
Definition HDBTypes.hh:47

References HDB::RFImplementation::addParameter(), implementation_, HDB::Parameter::name, WxConversion::toWxString(), HDB::Parameter::type, update(), and HDB::Parameter::value.

Here is the call graph for this function:

◆ onAddPort()

void RFImplementationDialog::onAddPort ( wxCommandEvent &  event)
private

Event handler for the add port button.

Opens a RFPortImplementationdialog for adding a new port.

Definition at line 275 of file RFImplementationDialog.cc.

275 {
276
277 RFPortImplementation* port = new RFPortImplementation("", HDB::IN, "", "",
278 "", implementation_);
279
280 RFPortImplementationDialog dialog(this, -1, *port);
281
282 if (dialog.ShowModal() != wxID_OK) {
284 }
285
286 update();
287}
void deletePort(RFPortImplementation *port)

References HDB::RFImplementation::deletePort(), implementation_, HDB::IN, and update().

Here is the call graph for this function:

◆ onAddSourceFile()

void RFImplementationDialog::onAddSourceFile ( wxCommandEvent &  event)
private

Event handler for the add source file button.

Opens a source file dialog for adding a new implementation file to the list.

Definition at line 646 of file RFImplementationDialog.cc.

646 {
647
650
651 BlockImplementationFileDialog dialog(this, -1, *file);
652
653 if (dialog.ShowModal() == wxID_OK) {
655 update();
656 } else {
657 delete file;
658 }
659
660}
void addImplementationFile(BlockImplementationFile *file)

References HDB::HWBlockImplementation::addImplementationFile(), implementation_, update(), and HDB::BlockImplementationFile::VHDL.

Here is the call graph for this function:

◆ onDeleteExternalPort()

void RFImplementationDialog::onDeleteExternalPort ( wxCommandEvent &  event)
private

Event handler for the delete external port button.

Deletes the selected external port.

Definition at line 480 of file RFImplementationDialog.cc.

480 {
481
483
484 if (port == NULL) {
485 return;
486 }
487
489 update();
490}
HDB::RFExternalPort * selectedExternalPort()

References HDB::RFImplementation::deleteExternalPort(), implementation_, selectedExternalPort(), and update().

Here is the call graph for this function:

◆ onDeleteParameter()

void RFImplementationDialog::onDeleteParameter ( wxCommandEvent &  event)
private

Event handler for the delete parameter button.

Deletes the selected parameter.

Definition at line 624 of file RFImplementationDialog.cc.

624 {
626
628
629 // update external port parameter dependencies
630 for (int i = 0; i < implementation_.externalPortCount(); i++) {
632 port.unsetParameterDependency(parameter.name);
633 }
634 update();
635}
bool unsetParameterDependency(const std::string &parameter)
RFExternalPort & externalPort(int index) const
void removeParameter(const std::string &name)
HDB::RFImplementation::Parameter selectedParameter()

References HDB::RFImplementation::externalPort(), HDB::RFImplementation::externalPortCount(), implementation_, HDB::Parameter::name, HDB::RFImplementation::removeParameter(), selectedParameter(), HDB::ExternalPort::unsetParameterDependency(), and update().

Here is the call graph for this function:

◆ onDeletePort()

void RFImplementationDialog::onDeletePort ( wxCommandEvent &  event)
private

Event handler for the delete port button.

Deletes the selected port.

Definition at line 311 of file RFImplementationDialog.cc.

311 {
312
314
315 if (port == NULL) {
316 return;
317 }
318
320 update();
321}
HDB::RFPortImplementation * selectedPort()

References HDB::RFImplementation::deletePort(), implementation_, selectedPort(), and update().

Here is the call graph for this function:

◆ onDeleteSourceFile()

void RFImplementationDialog::onDeleteSourceFile ( wxCommandEvent &  event)
private

Event handler for the delete source file button.

Removes the selected source file.

Definition at line 668 of file RFImplementationDialog.cc.

668 {
669
670 std::string fileName = WidgetTools::lcStringSelection(sourceList_, 0);
671
672 for (int i = 0; i < implementation_.implementationFileCount(); i++) {
674 if (file.pathToFile() == fileName) {
676 }
677 }
678 update();
679}
void removeImplementationFile(const BlockImplementationFile &file)
BlockImplementationFile & file(int index) const
static std::string lcStringSelection(wxListCtrl *list, int column)

References HDB::HWBlockImplementation::file(), implementation_, HDB::HWBlockImplementation::implementationFileCount(), WidgetTools::lcStringSelection(), HDB::BlockImplementationFile::pathToFile(), HDB::HWBlockImplementation::removeImplementationFile(), sourceList_, and update().

Here is the call graph for this function:

◆ onEditExternalPort()

void RFImplementationDialog::onEditExternalPort ( wxCommandEvent &  event)
private

Event handler for the edit external port button.

Opens a RFExternalPort for modifying the selected external port.

Definition at line 460 of file RFImplementationDialog.cc.

460 {
461
463
464 if (port == NULL) {
465 return;
466 }
467
468 RFExternalPortDialog dialog(this, -1, *port, implementation_);
469
470 dialog.ShowModal();
471 update();
472}

References implementation_, selectedExternalPort(), and update().

Here is the call graph for this function:

◆ onEditParameter()

void RFImplementationDialog::onEditParameter ( wxCommandEvent &  event)
private

Event handler for the edit parameter button.

Opens a ImplementationParamaeterDialog for modifying the selected parameter.

Definition at line 594 of file RFImplementationDialog.cc.

594 {
595
597 std::string oldName = parameter.name;
598
599 ImplementationParameterDialog dialog(this, -1, parameter);
600
601 if (dialog.ShowModal() == wxID_OK) {
604 parameter.name, parameter.type, parameter.value);
605
606 // update external port parameter dependencies if needed
607 for (int i = 0; i < implementation_.externalPortCount(); i++) {
609 if (port.unsetParameterDependency(oldName)) {
610 port.setParameterDependency(parameter.name);
611 }
612 }
613 }
614
615 update();
616}
bool setParameterDependency(const std::string &parameter)

References HDB::RFImplementation::addParameter(), HDB::RFImplementation::externalPort(), HDB::RFImplementation::externalPortCount(), implementation_, HDB::Parameter::name, HDB::RFImplementation::removeParameter(), selectedParameter(), HDB::ExternalPort::setParameterDependency(), HDB::Parameter::type, HDB::ExternalPort::unsetParameterDependency(), update(), and HDB::Parameter::value.

Here is the call graph for this function:

◆ onExternalPortActivation()

void RFImplementationDialog::onExternalPortActivation ( wxListEvent &  event)
private

Event handler for the activate external port list item

Opens a RFExternalPort for modifying the selected external port.

Definition at line 407 of file RFImplementationDialog.cc.

407 {
409 assert(port != NULL);
410
411 RFExternalPortDialog dialog(this, -1, *port, implementation_);
412
413 dialog.ShowModal();
414 update();
415}

References assert, implementation_, selectedExternalPort(), and update().

Here is the call graph for this function:

◆ onExternalPortSelection()

void RFImplementationDialog::onExternalPortSelection ( wxListEvent &  event)
private

Event handler for the external port list selection changes.

Updates edit/delete external port enabeld/disabled states.

Definition at line 423 of file RFImplementationDialog.cc.

423 {
424 if (selectedExternalPort() == NULL) {
427 } else {
430 }
431}

References ID_DELETE_EXTERNAL_PORT, ID_EDIT_EXTERNAL_PORT, and selectedExternalPort().

Referenced by update().

Here is the call graph for this function:

◆ onModifyPort()

void RFImplementationDialog::onModifyPort ( wxCommandEvent &  event)
private

Event handler for the modify port button.

Modifies the selected port.

Definition at line 329 of file RFImplementationDialog.cc.

329 {
330
332
333 if (port == NULL) {
334 return;
335 }
336
337 RFPortImplementationDialog dialog(this, -1, *port);
338 dialog.ShowModal();
339 update();
340}

References selectedPort(), and update().

Here is the call graph for this function:

◆ onMoveSourceFileDown()

void RFImplementationDialog::onMoveSourceFileDown ( wxCommandEvent &  )
private

Event handler for the move source file down button.

Moves the selected source file down on the files list.

Definition at line 734 of file RFImplementationDialog.cc.

734 {
736 std::string fileName = WidgetTools::lcStringSelection(sourceList_, 0);
737 std::vector<std::string> pathToFileList;
738
739 int originalImplementationFileCount =
741
742 for (int i = 0; i < originalImplementationFileCount; i++) {
744 pathToFileList.push_back(file.pathToFile());
746 }
747
748 for (unsigned int i = 0; i < (pathToFileList.size() - 1); i++) {
749 if (pathToFileList.at(i) == fileName) {
750 pathToFileList.erase(pathToFileList.begin() + i);
751 pathToFileList.insert(pathToFileList.begin() + i + 1,
752 fileName);
753 break;
754 }
755 }
756
757 for (unsigned int i = 0; i < pathToFileList.size(); i++) {
759 pathToFileList.at(i), BlockImplementationFile::VHDL);
761 }
762
763 pathToFileList.clear();
764 update();
765
766 for (int i = 0; i < implementation_.implementationFileCount(); i++) {
767 if (implementation_.file(i).pathToFile() == fileName) {
768 sourceList_->SetItemState(i, wxLIST_STATE_SELECTED,
769 wxLIST_STATE_SELECTED);
770 }
771 }
772 }
773}

References HDB::HWBlockImplementation::addImplementationFile(), HDB::HWBlockImplementation::file(), implementation_, HDB::HWBlockImplementation::implementationFileCount(), WidgetTools::lcStringSelection(), HDB::BlockImplementationFile::pathToFile(), HDB::HWBlockImplementation::removeImplementationFile(), sourceList_, update(), and HDB::BlockImplementationFile::VHDL.

Here is the call graph for this function:

◆ onMoveSourceFileUp()

void RFImplementationDialog::onMoveSourceFileUp ( wxCommandEvent &  )
private

Event handler for the move source file up button.

Moves the selected source file up on the files list.

Definition at line 687 of file RFImplementationDialog.cc.

687 {
688
690 std::string fileName = WidgetTools::lcStringSelection(sourceList_, 0);
691 std::vector<std::string> pathToFileList;
692 int originalImplementationFileCount =
694
695 for (int i = 0; i < originalImplementationFileCount; i++) {
697 pathToFileList.push_back(file.pathToFile());
699 }
700
701 for (unsigned int i = 1; i < pathToFileList.size(); i++) {
702 if (pathToFileList.at(i) == fileName) {
703 pathToFileList.erase(pathToFileList.begin() + i);
704 pathToFileList.insert(pathToFileList.begin() + i - 1,
705 fileName);
706 break;
707 }
708 }
709
710 for (unsigned int i = 0; i < pathToFileList.size(); i++) {
712 pathToFileList.at(i), BlockImplementationFile::VHDL);
714 }
715
716 pathToFileList.clear();
717 update();
718
719 for (int i = 0; i < implementation_.implementationFileCount(); i++) {
720 if (implementation_.file(i).pathToFile() == fileName) {
721 sourceList_->SetItemState(i, wxLIST_STATE_SELECTED,
722 wxLIST_STATE_SELECTED);
723 }
724 }
725 }
726}

References HDB::HWBlockImplementation::addImplementationFile(), HDB::HWBlockImplementation::file(), implementation_, HDB::HWBlockImplementation::implementationFileCount(), WidgetTools::lcStringSelection(), HDB::BlockImplementationFile::pathToFile(), HDB::HWBlockImplementation::removeImplementationFile(), sourceList_, update(), and HDB::BlockImplementationFile::VHDL.

Here is the call graph for this function:

◆ onOK()

void RFImplementationDialog::onOK ( wxCommandEvent &  event)
private

Event handler for the OK button.

Validates the dialog data and updates the RFImplementation object string attributes.

Definition at line 824 of file RFImplementationDialog.cc.

824 {
825
826 TransferDataFromWindow();
827
828 name_ = name_.Trim(true).Trim(false);
829 clkPort_ = clkPort_.Trim(true).Trim(false);
830 rstPort_ = rstPort_.Trim(true).Trim(false);
831 gLockPort_ = gLockPort_.Trim(true).Trim(false);
832 guardPort_ = guardPort_.Trim(true).Trim(false);
833
834 if (name_.IsEmpty()) {
835 wxString message = _T("Name field must not be empty.");
836 InformationDialog dialog(this, message);
837 dialog.ShowModal();
838 return;
839 }
840
851
852 EndModal(wxID_OK);
853
854}
void setModuleName(const std::string &name)
void setClkPort(const std::string &name)
void setRstPort(const std::string &name)
void setGlockPort(const std::string &name)
void setSizeParameter(const std::string &sizeParam)
void setGuardPort(const std::string &guardPort)
void setSeparateAddressCycleParameter(bool enable)
void setWidthParameter(const std::string &widthParam)
static std::string toString(const wxString &source)

References clkPort_, getSizeParameter(), getWidthParameter(), gLockPort_, guardPort_, implementation_, name_, rstPort_, sacParam_, HDB::HWBlockImplementation::setClkPort(), HDB::HWBlockImplementation::setGlockPort(), HDB::RFImplementation::setGuardPort(), HDB::HWBlockImplementation::setModuleName(), HDB::HWBlockImplementation::setRstPort(), HDB::RFImplementation::setSeparateAddressCycleParameter(), HDB::RFImplementation::setSizeParameter(), HDB::RFImplementation::setWidthParameter(), and WxConversion::toString().

Here is the call graph for this function:

◆ onParameterActivation()

void RFImplementationDialog::onParameterActivation ( wxListEvent &  event)
private

Event handler for the parameter list activation.

Opens a RFImplementationParamaeterDialog for modifying the selected parameter.

Definition at line 500 of file RFImplementationDialog.cc.

500 {
502 std::string oldName = parameter.name;
503
504 ImplementationParameterDialog dialog(this, -1, parameter);
505
506 if (dialog.ShowModal() == wxID_OK) {
509 parameter.name, parameter.type, parameter.value);
510
511 // update external port parameter dependencies if needed
512 for (int i = 0; i < implementation_.externalPortCount(); i++) {
514 if (port.unsetParameterDependency(oldName)) {
515 port.setParameterDependency(parameter.name);
516 }
517 }
518 }
519
520 update();
521}

References HDB::RFImplementation::addParameter(), HDB::RFImplementation::externalPort(), HDB::RFImplementation::externalPortCount(), implementation_, HDB::Parameter::name, HDB::RFImplementation::removeParameter(), selectedParameter(), HDB::ExternalPort::setParameterDependency(), HDB::Parameter::type, HDB::ExternalPort::unsetParameterDependency(), update(), and HDB::Parameter::value.

Here is the call graph for this function:

◆ onParameterSelection()

void RFImplementationDialog::onParameterSelection ( wxListEvent &  event)
private

Event handler for the parameter list selection changes.

Updates edit/delete parameter enabled/disabled states.

Definition at line 530 of file RFImplementationDialog.cc.

530 {
531 if (selectedParameter().name == "") {
533 FindWindow(ID_EDIT_PARAMETER)->Disable();
534 } else {
536 FindWindow(ID_EDIT_PARAMETER)->Enable();
537 }
538}

References ID_DELETE_PARAMETER, ID_EDIT_PARAMETER, and selectedParameter().

Referenced by update().

Here is the call graph for this function:

◆ onPortSelection()

void RFImplementationDialog::onPortSelection ( wxListEvent &  event)
private

Event handler for the port list selection changes.

Updates the delete port button enabled/disabled state.

Definition at line 295 of file RFImplementationDialog.cc.

295 {
296 if (selectedPort() == NULL) {
297 FindWindow(ID_DELETE_PORT)->Disable();
298 FindWindow(ID_MODIFY_PORT)->Disable();
299 } else {
300 FindWindow(ID_DELETE_PORT)->Enable();
301 FindWindow(ID_MODIFY_PORT)->Enable();
302 }
303}

References ID_DELETE_PORT, ID_MODIFY_PORT, and selectedPort().

Referenced by update().

Here is the call graph for this function:

◆ onSACchoise()

void RFImplementationDialog::onSACchoise ( wxCommandEvent &  event)
private

Definition at line 264 of file RFImplementationDialog.cc.

264 {
265 assert((event.GetInt() == RBOX_FALSE) || (event.GetInt() == RBOX_TRUE));
266 sacParam_ = (event.GetInt() == RBOX_FALSE) ? false : true;
267}

References assert, RBOX_FALSE, RBOX_TRUE, and sacParam_.

◆ onSizeChoice()

void RFImplementationDialog::onSizeChoice ( wxCommandEvent &  event)
private

◆ onSourceFileSelection()

void RFImplementationDialog::onSourceFileSelection ( wxListEvent &  event)
private

Event handler for the source file list selection changes.

Updates delete source file button enabeld/disabled states.

Definition at line 781 of file RFImplementationDialog.cc.

781 {
783 FindWindow(ID_DELETE_SOURCE)->Disable();
784 FindWindow(ID_MOVE_SOURCE_UP)->Disable();
786 } else {
787 FindWindow(ID_DELETE_SOURCE)->Enable();
788 FindWindow(ID_MOVE_SOURCE_UP)->Enable();
790 }
791}

References ID_DELETE_SOURCE, ID_MOVE_SOURCE_DOWN, ID_MOVE_SOURCE_UP, WidgetTools::lcStringSelection(), and sourceList_.

Here is the call graph for this function:

◆ onWidthChoice()

void RFImplementationDialog::onWidthChoice ( wxCommandEvent &  event)
private

◆ selectedExternalPort()

HDB::RFExternalPort * RFImplementationDialog::selectedExternalPort ( )
private

Returns pointer to the external port selected in the external port list.

Returns
Selected external port.

Definition at line 368 of file RFImplementationDialog.cc.

368 {
369
370 long item = -1;
371 item = externalPortList_->GetNextItem(
372 item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
373
374 if (item == -1) {
375 return NULL;
376 }
377
378 return &implementation_.externalPort(item);
379}

References HDB::RFImplementation::externalPort(), externalPortList_, and implementation_.

Referenced by onDeleteExternalPort(), onEditExternalPort(), onExternalPortActivation(), and onExternalPortSelection().

Here is the call graph for this function:

◆ selectedParameter()

HDB::RFImplementation::Parameter RFImplementationDialog::selectedParameter ( )
private

Returns copy of the selected parameter in the parameter list.

Returns
Selected parameter.

Definition at line 388 of file RFImplementationDialog.cc.

388 {
389 long item = -1;
390 item = parameterList_->GetNextItem(
391 item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
392
393 if (item == -1) {
394 RFImplementation::Parameter empty = {"", "", ""};
395 return empty;
396 }
397
398 return implementation_.parameter(item);
399}
Parameter parameter(int index) const

References implementation_, HDB::RFImplementation::parameter(), and parameterList_.

Referenced by onDeleteParameter(), onEditParameter(), onParameterActivation(), and onParameterSelection().

Here is the call graph for this function:

◆ selectedPort()

HDB::RFPortImplementation * RFImplementationDialog::selectedPort ( )
private

Returns pointer to the port selected in the port list.

Returns
Selected port.

Definition at line 348 of file RFImplementationDialog.cc.

348 {
349
350 long item = -1;
351 item = portList_->GetNextItem(item, wxLIST_NEXT_ALL,
352 wxLIST_STATE_SELECTED);
353
354 if (item == -1) {
355 return NULL;
356 }
357
358 return &implementation_.port(item);
359}
RFPortImplementation & port(int index) const

References implementation_, HDB::RFImplementation::port(), and portList_.

Referenced by onDeletePort(), onModifyPort(), and onPortSelection().

Here is the call graph for this function:

◆ update()

void RFImplementationDialog::update ( )
private

Definition at line 199 of file RFImplementationDialog.cc.

199 {
200
201 // Update port list.
202 portList_->DeleteAllItems();
203 for (int i = 0; i < implementation_.portCount(); i++) {
204 wxString portName = WxConversion::toWxString(
206 portList_->InsertItem(i, portName);
207 }
208
209 // Update source file list.
210 sourceList_->DeleteAllItems();
211 for (int i = 0; i < implementation_.implementationFileCount(); i++) {
212 wxString fileName = WxConversion::toWxString(
214 sourceList_->InsertItem(i, fileName);
215 }
217 sourceList_->SetColumnWidth(0, wxLIST_AUTOSIZE);
218 }
219
220 // Update external port list.
221 externalPortList_->DeleteAllItems();
222 for (int i = 0; i < implementation_.externalPortCount(); i++) {
223 wxString portName = WxConversion::toWxString(
225 externalPortList_->InsertItem(i, portName);
226 }
227
228 // Update parameter list.
229 parameterList_->DeleteAllItems();
230 for (int i = 0; i < implementation_.parameterCount(); i++) {
231 const RFImplementation::Parameter parameter =
233 wxString param = WxConversion::toWxString(parameter.type);
234 param.Append(_T(": "));
235 param.Append(WxConversion::toWxString(parameter.name));
236 parameterList_->InsertItem(i, param);
237 parameterList_->SetItem(
238 i, 1, WxConversion::toWxString(parameter.value));
239 }
240
241 // Update width and size parameter choices
242 wxString oldWidthChoice = getWidthParameter();
243 wxString oldSizeChoice = getSizeParameter();
244 widthChoice_->Clear();
245 widthChoice_->Append(_T(""));
246 sizeChoice_->Clear();
247 sizeChoice_->Append(_T(""));
248 for (int i = 0; i < implementation_.parameterCount(); i++) {
249 const RFImplementation::Parameter parameter =
251 widthChoice_->Append(WxConversion::toWxString(parameter.name));
252 sizeChoice_->Append(WxConversion::toWxString(parameter.name));
253 }
254 widthChoice_->SetSelection(widthChoice_->FindString(oldWidthChoice));
255 sizeChoice_->SetSelection(sizeChoice_->FindString(oldSizeChoice));
256
257 wxListEvent dummy;
261}
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
std::string name() const
void onPortSelection(wxListEvent &event)
void onExternalPortSelection(wxListEvent &event)
void onParameterSelection(wxListEvent &event)

References dummy, HDB::RFImplementation::externalPort(), HDB::RFImplementation::externalPortCount(), externalPortList_, HDB::HWBlockImplementation::file(), getSizeParameter(), getWidthParameter(), implementation_, HDB::HWBlockImplementation::implementationFileCount(), HDB::ExternalPort::name(), HDB::Parameter::name, HDB::PortImplementation::name(), onExternalPortSelection(), onParameterSelection(), onPortSelection(), HDB::RFImplementation::parameter(), HDB::RFImplementation::parameterCount(), parameterList_, HDB::BlockImplementationFile::pathToFile(), HDB::RFImplementation::port(), HDB::RFImplementation::portCount(), portList_, sizeChoice_, sourceList_, WxConversion::toWxString(), HDB::Parameter::type, HDB::Parameter::value, and widthChoice_.

Referenced by onAddExternalPort(), onAddParameter(), onAddPort(), onAddSourceFile(), onDeleteExternalPort(), onDeleteParameter(), onDeletePort(), onDeleteSourceFile(), onEditExternalPort(), onEditParameter(), onExternalPortActivation(), onModifyPort(), onMoveSourceFileDown(), onMoveSourceFileUp(), and onParameterActivation().

Here is the call graph for this function:

Member Data Documentation

◆ clkPort_

wxString RFImplementationDialog::clkPort_
private

Definition at line 157 of file RFImplementationDialog.hh.

Referenced by onOK().

◆ externalPortList_

wxListCtrl* RFImplementationDialog::externalPortList_
private

Pointer to the external port list widget.

Definition at line 148 of file RFImplementationDialog.hh.

Referenced by selectedExternalPort(), and update().

◆ gLockPort_

wxString RFImplementationDialog::gLockPort_
private

Definition at line 159 of file RFImplementationDialog.hh.

Referenced by onOK().

◆ guardPort_

wxString RFImplementationDialog::guardPort_
private

Definition at line 160 of file RFImplementationDialog.hh.

Referenced by onOK().

◆ implementation_

HDB::RFImplementation& RFImplementationDialog::implementation_
private

◆ name_

wxString RFImplementationDialog::name_
private

Definition at line 156 of file RFImplementationDialog.hh.

Referenced by onOK().

◆ parameterList_

wxListCtrl* RFImplementationDialog::parameterList_
private

Pointer to the parameter list widget.

Definition at line 150 of file RFImplementationDialog.hh.

Referenced by selectedParameter(), and update().

◆ portList_

wxListCtrl* RFImplementationDialog::portList_
private

Pointer to the port list widget.

Definition at line 144 of file RFImplementationDialog.hh.

Referenced by selectedPort(), and update().

◆ rstPort_

wxString RFImplementationDialog::rstPort_
private

Definition at line 158 of file RFImplementationDialog.hh.

Referenced by onOK().

◆ sacParam_

bool RFImplementationDialog::sacParam_
private

Definition at line 161 of file RFImplementationDialog.hh.

Referenced by onOK(), and onSACchoise().

◆ sizeChoice_

wxChoice* RFImplementationDialog::sizeChoice_
private

Pointer to size parameter choice widget.

Definition at line 152 of file RFImplementationDialog.hh.

Referenced by getSizeParameter(), and update().

◆ sourceList_

wxListCtrl* RFImplementationDialog::sourceList_
private

Pointer to the source file list widget.

Definition at line 146 of file RFImplementationDialog.hh.

Referenced by onDeleteSourceFile(), onMoveSourceFileDown(), onMoveSourceFileUp(), onSourceFileSelection(), and update().

◆ widthChoice_

wxChoice* RFImplementationDialog::widthChoice_
private

Pointer to width parameter choice widget.

Definition at line 154 of file RFImplementationDialog.hh.

Referenced by getWidthParameter(), and update().


The documentation for this class was generated from the following files: