Skip to content

Commit

Permalink
add connection tracking setup to genfb
Browse files Browse the repository at this point in the history
  • Loading branch information
MandKastner committed Jan 16, 2025
1 parent 001d007 commit 3599fc9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/funcbloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ bool CFunctionBlock::initialize() {
setupEventMonitoringData();
#endif //FORTE_SUPPORT_MONITORING
if (getFBInterfaceSpec().mEITypeNames != nullptr) {
mInputEventConnectionCount = std::make_unique<size_t[]>(getFBInterfaceSpec().mNumEIs);
setupInputConnectionTrackingData(getFBInterfaceSpec().mNumEIs);
}
return true;
}
Expand Down
7 changes: 7 additions & 0 deletions src/core/funcbloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,13 @@ class CFunctionBlock : public forte::core::CFBContainer {
*/
void triggerEventsOfType(TEventTypeID paEventTypeId);

/*!\brief initialize the data structure which holds conneciton counts per pin
* \param paNumEIs number of eventInputs
*/
void setupInputConnectionTrackingData(TEventID paNumEIs) {
mInputEventConnectionCount = std::make_unique<size_t[]>(paNumEIs);
}

protected:

/*!\brief The main constructor for a function block.
Expand Down
2 changes: 2 additions & 0 deletions src/core/genfb.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ void CGenFunctionBlock<T>::setupFBInterface() {
setupAdapters(varsData);
}

T::setupInputConnectionTrackingData(T::getFBInterfaceSpec().mNumEIs);

#ifdef FORTE_SUPPORT_MONITORING
T::setupEventMonitoringData();
#endif
Expand Down

0 comments on commit 3599fc9

Please sign in to comment.