From 551c1a9a63dd3095b18204d65a1b0cbc90a69c7d Mon Sep 17 00:00:00 2001 From: shi_jq Date: Thu, 13 Mar 2025 14:27:22 +0800 Subject: [PATCH] =?UTF-8?q?[ref]=E5=90=8C=E6=AD=A5711?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alarmGeneratePlugin.cpp | 26 ++ .../alarmGeneratePlugin/alarmGeneratePlugin.h | 27 ++ .../alarmGeneratePlugin.pro | 38 ++ .../fbd_plugins/alarmGeneratePlugin/icon.qrc | 5 + .../icon/alarmGenerate.png | Bin 0 -> 743 bytes .../alarmdelayplugin/icon/alarmdelay.png | Bin 1329 -> 832 bytes .../alarmpushplugin/icon/alarmpush.png | Bin 1197 -> 808 bytes .../alarmsplitplugin/icon/alarmsplit.png | Bin 900 -> 597 bytes .../alarmsubscribeplugin.cpp | 1 + .../icon/alarmsubscribe.png | Bin 1043 -> 743 bytes .../apc_pd_pcsplugin/ApcPdPCSPlugin.cpp | 405 ++++++++++++++++++ .../apc_pd_pcsplugin/ApcPdPCSPlugin.h | 99 +++++ .../apc_pd_pcsplugin/apc_pd_pcsplugin.pro | 33 ++ .../fbd_plugins/apc_pd_pcsplugin/icon.qrc | 5 + .../apc_pd_pcsplugin/icon/apc_pd_pcs.png | Bin 0 -> 563 bytes .../batchActionAOplugin.cpp | 175 ++++++++ .../batchActionAOplugin/batchActionAOplugin.h | 56 +++ .../batchActionAOplugin.pro | 39 ++ .../fbd_plugins/batchActionAOplugin/icon.qrc | 5 + .../icon/batchActionAO.png | Bin 0 -> 627 bytes .../demandcontrolplugin.cpp | 163 +++++++ .../demandcontrolplugin/demandcontrolplugin.h | 74 ++++ .../demandcontrolplugin.pro | 33 ++ .../fbd_plugins/demandcontrolplugin/icon.qrc | 5 + .../icon/demandcontrol.png | Bin 0 -> 1037 bytes .../fbd_designer/fbd_plugins/fbd_plugins.pro | 8 +- .../fmttextplugin/FmtCfgDialog.cpp | 108 +++-- .../fmttextplugin/icon/fmttext.png | Bin 933 -> 788 bytes .../multimapplugin/icon/multimap.png | Bin 788 -> 563 bytes .../multimapplugin/image/delete.png | Bin 219 -> 274 bytes .../multimapplugin/image/export.png | Bin 343 -> 343 bytes .../multimapplugin/image/import.png | Bin 359 -> 377 bytes .../fbd_plugins/multimapplugin/image/save.png | Bin 285 -> 349 bytes .../fbd_plugins/multimapplugin/image/undo.png | Bin 413 -> 480 bytes .../fbd_plugins/multimapplugin/mapcfgdlg.cpp | 7 +- .../fbd_plugins/multimapplugin/mapcfgdlg.h | 3 +- .../multimapplugin/multimapplugin.pro | 1 + .../phonecallplugin/icon/phonecall.png | Bin 1327 -> 1002 bytes .../powerOutputCtrlplugin/icon.qrc | 5 + .../icon/powerOutputCtrl.png | Bin 0 -> 627 bytes .../powerOutputCtrlplugin/powerCtrlplugin.cpp | 74 ++++ .../powerOutputCtrlplugin/powerCtrlplugin.h | 35 ++ .../powerOutputCtrlplugin.pro | 39 ++ .../powercontrolgenplugin.cpp | 150 +++++-- .../powercontrolgenplugin.h | 37 +- .../powercontrollinearplugin/icon.qrc | 5 + .../icon/powercontrollinear.png | Bin 0 -> 563 bytes .../powercontrollinearplugin.cpp | 266 ++++++++++++ .../powercontrollinearplugin.h | 57 +++ .../powercontrollinearplugin.pro | 33 ++ .../icon/powercontrolpcs.png | Bin 553 -> 563 bytes .../powercontrolpcsplugin.cpp | 153 +++++-- .../powercontrolpcsplugin.h | 47 +- .../powercontrolreactiveplugin/icon.qrc | 5 + .../icon/powercontrolreactive.png | Bin 0 -> 563 bytes .../powercontrolreactiveplugin.cpp | 401 +++++++++++++++++ .../powercontrolreactiveplugin.h | 98 +++++ .../powercontrolreactiveplugin.pro | 33 ++ .../sendsmsplugin/icon/sendsms.png | Bin 723 -> 505 bytes .../smtpmailplugin/icon/smtpmail.png | Bin 1207 -> 1000 bytes .../timetriggerplugin/icon/timetrigger.png | Bin 1147 -> 724 bytes .../videocontrolplugin/icon/videocontrol.png | Bin 876 -> 571 bytes 62 files changed, 2621 insertions(+), 133 deletions(-) create mode 100644 product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.cpp create mode 100644 product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.h create mode 100644 product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.pro create mode 100644 product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/icon.qrc create mode 100644 product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/icon/alarmGenerate.png create mode 100644 product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/ApcPdPCSPlugin.cpp create mode 100644 product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/ApcPdPCSPlugin.h create mode 100644 product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/apc_pd_pcsplugin.pro create mode 100644 product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/icon.qrc create mode 100644 product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/icon/apc_pd_pcs.png create mode 100644 product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.cpp create mode 100644 product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.h create mode 100644 product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.pro create mode 100644 product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/icon.qrc create mode 100644 product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/icon/batchActionAO.png create mode 100644 product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.cpp create mode 100644 product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.h create mode 100644 product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.pro create mode 100644 product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/icon.qrc create mode 100644 product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/icon/demandcontrol.png create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/icon.qrc create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/icon/powerOutputCtrl.png create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerCtrlplugin.cpp create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerCtrlplugin.h create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerOutputCtrlplugin.pro create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/icon.qrc create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/icon/powercontrollinear.png create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.cpp create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.h create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.pro create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/icon.qrc create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/icon/powercontrolreactive.png create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.cpp create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.h create mode 100644 product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.pro diff --git a/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.cpp b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.cpp new file mode 100644 index 00000000..30e63c3c --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.cpp @@ -0,0 +1,26 @@ +#include "alarmGeneratePlugin.h" + +alarmGeneratePlugin::alarmGeneratePlugin(): CBlock() +{ + addInPort( CPort(this, "I1", E_PORTDATA_STRING) ); + addInPort( CPort(this, "I2", E_PORTDATA_BOOL) ); + setInPortShowName("I1",tr("测点标签")); + setInPortShowName("I2",tr("使能")); + + this->setProperty( C_PROPERTY_SHOWNAME, showName() ); + //this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("Format")).toStdString().c_str(), E_VALUEEDIT_LINEEDIT ); + + //Format = tr("%1 失败"); +} + +alarmGeneratePlugin::~alarmGeneratePlugin() +{ +} + +QString alarmGeneratePlugin::propertyShowName( QString sPropertyName ) +{ + //if ( sPropertyName == "Format" ) + // return tr("告警内容格式"); + return sPropertyName; +} + diff --git a/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.h b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.h new file mode 100644 index 00000000..151b43be --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.h @@ -0,0 +1,27 @@ +#ifndef TEMPLATEPLUGIN_H +#define TEMPLATEPLUGIN_H + +#include "CBlock.h" + +class alarmGeneratePlugin : public CBlock +{ + Q_OBJECT + Q_PLUGIN_METADATA( IID Block_iid ) // Q_PLUGIN_METADATA 宏用于描述插件元数据 + Q_INTERFACES( CBlock ) // Q_INTERFACES 宏用于告诉Qt该类实现的接口 + + //IMPL_PROPERTY( QString, Format ) + + //Q_PROPERTY( QString Format READ get_Format WRITE set_Format USER true DESIGNABLE true ) + +public: + Q_INVOKABLE alarmGeneratePlugin(); + Q_INVOKABLE ~alarmGeneratePlugin(); + +public: + QString name() { return "alarmGenerate"; } + QString showName() { return QObject::tr("告警生成"); } + QString propertyShowName( QString sPropertyName ); + QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } +}; + +#endif // TEMPLATEPLUGIN_H diff --git a/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.pro b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.pro new file mode 100644 index 00000000..84479c10 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/alarmGeneratePlugin.pro @@ -0,0 +1,38 @@ +TARGET = alarmGeneratePlugin +QT = core gui widgets xml sql +CONFIG += dll +TEMPLATE = lib +CONFIG += qt + +SOURCES += \ + alarmGeneratePlugin.cpp \ + +HEADERS += \ + alarmGeneratePlugin.h \ + +INCLUDEPATH += \ + ../../fbd_block \ + ../../fbd_tree \ + +LIBS += \ + -lfbd_block \ + -lfbd_tree \ + +RESOURCES += \ + icon.qrc + +!include( ../../../../idl_files/idl_files.pri){ + error(the file idl_files.pri is not exist!!) +} + +!include( ../../../../common.pri ){ + error(the file common.pri is not exist!!) +} + +#fbd_plugins插件的统一规则 +FBD_PLUGINS_PRI=$$PWD/../fbd_plugins.pri +exists($$FBD_PLUGINS_PRI) { + include($$FBD_PLUGINS_PRI) +}else { + error("FATAL error: can not find fbd_plugins.pri") +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/icon.qrc b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/icon.qrc new file mode 100644 index 00000000..012749eb --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/icon.qrc @@ -0,0 +1,5 @@ + + + icon/alarmGenerate.png + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/icon/alarmGenerate.png b/product/src/tools/fbd_designer/fbd_plugins/alarmGeneratePlugin/icon/alarmGenerate.png new file mode 100644 index 0000000000000000000000000000000000000000..9ce412abffe47e82a33b37e6037b59e6a3e78a73 GIT binary patch literal 743 zcmV?P)yj9ZXn14uvD({qOyz=60jh9;V{OiM3MXwKE zf3IDe*k&;Cz+&?lhe&5I7=}4}&Q1u|!~~o9#M2O2WSeoPVGy!8mai~$>Ka|!Wwe_E zx2oHw49(FSvNmtwFvx#%4y;RqedBWTJ+nP|=RqtsS{-5mp1*505sxNKzj(QkD{!ki zXR}Y)KhrocKI1Zl=(~p9602%@O!yZ#qPhx52epejtCLTz!DOXR$EXXHFq<@XX;ei# zmUthY@TG}dO>XkK?{=9w6Jm)lzZ{YgtI-J~Q&ilk0coM2f#jcGI*gD^)oOHYv&L2X zJS%k*H6Y#0D^@7pg`Q$s(C1muKgzhESN9B}f?f->5LMhI4C-SS(h5>+R>}USO?{hQ Z@gK(|{bA!<2V4LE002ovPDHLkV1i}lPmTZp literal 0 HcmV?d00001 diff --git a/product/src/tools/fbd_designer/fbd_plugins/alarmdelayplugin/icon/alarmdelay.png b/product/src/tools/fbd_designer/fbd_plugins/alarmdelayplugin/icon/alarmdelay.png index 0d5edf9cf9b763bc5b2a98091a691a7cdd095c90..b47b3ac8b428dd127271fca4f9907a9a1ddb296f 100644 GIT binary patch delta 801 zcmV++1K#|x3cv=CEPoRK01FcV0GgZ_00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj7)k#D_RCodHSHEx4K@@-QIKJ&<=pSH$W23dLlUs3dv^1%ki8Nhw(yB2|7FHKo z9Gg}bHEBZo4@fsn6H|m%M$p93fKHX~anE-Lga*FwJsM&1lYiU+-+TA{+&tIB`UAkWk@obwf<{;T)pV<`N}% zUb5d2_StL&7zJ%UG18`ES^$D=9xY$ckYgv}q0#gJuHr`fAaT}up4SR| zO?4On;To6u<$op0+q*${$fIl8CVb;L#cMS_#I}`nhOv3)o`Y~q6)4h6tMM?L(596Q zlWX%0*SJV2HgCb2Hq4ZlF~hP|h{7^BAk5VBVD8i%d+cxt7s27qC9L#2@n13ck_$Da}vdc`~ZyFt;n$$!*T#3!>J<>$DXM|a{@ij2X4 z(s6zLh4{GjY*RHom|K69>0PJX%}wLxxRTEV?GH9}H$^V+7#L0x8X$xUTvJ-uF?eq; zij)LXpXYD}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GuAmKLrDG z(NuN?ZFu*zji4sa&%B_%E{G1A2AR*6s%tWI3XcHidz=dh(@KMk?him{=8o;P9qmdLm3JLl!3kA01l#i%iyk3gt z^fC2%-s8gz4Y9ga^YjS-cR8IuVgUFI2Y-12kHT)$e+kyv;dB+^hxwFCwVMS(YjA6x zQq4(V9Bq$SxstT}ej+{Z{_S0pVS%}fd8Uh_B~vXrMj_tH!P+M#CJKMH9gB#jLXDz& z^Q1=)4f(pyZ6sSi-K#g{yn3H0avwG;3me?u-#?DkPJj7VaQ5F}m5h#3flj6m4u1~% zmWi|oRCY?rtGdmCTitDka^>vq%1T6)*jA&Y=M zp|zA%f^t2^V2obD&K)b*AU}Kq?c{n{Qub@K(pSo{xB`RTz@B+XNwZgd$As#59}Bi7?Wi= zTN2=9oOzBR>)8f;+z{%6iNBs<+?=XMM1Q@EMwG{sZJzgrN^=GDH3i@Zsz+?LHSwXK zvvNy951c7te5%0Ao+tJBJlXc=z4u=J+f)x{iu?zP|I7T}KW+a2c*@(Z84s}LfB*mh M07*qoM6N<$f~-Gw(f|Me diff --git a/product/src/tools/fbd_designer/fbd_plugins/alarmpushplugin/icon/alarmpush.png b/product/src/tools/fbd_designer/fbd_plugins/alarmpushplugin/icon/alarmpush.png index c0b1369b8ed37af6289ae64244d7dff55deb6ffb..c0435155561f798bfad8045626fce5b996dc32bf 100644 GIT binary patch delta 777 zcmV+k1NQu_38)5;EPoRK01FcV0GgZ_00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj7y-7qtRCodHS3OJ=K@|Sp?B1SSLOj&or7{MQrPhSAwDLk>4YAWi+1i4`7+Wqj zCN@B42Nc%ePi(nx7)qcfk+UMVJG0}Py+a7x?adLOFn-C*ZGU#(%(w4n=Y2;osOt*P zuXq%3xoCi}h?O z5dVq)ed6v_-8v$RuxlNEaZ5FdKR%X&1acyZnt>-&K!1?cJI}u^^(Hn)BoHuZt8sV1 z!SYNIUd~VC;Y1WSgZ=FnrNQPeU%F12RD!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`Y-dp|Fr!CM#o$oazbA~00000NkvXXu0mjfz02W^ diff --git a/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/ApcPdPCSPlugin.cpp b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/ApcPdPCSPlugin.cpp new file mode 100644 index 00000000..14ca4689 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/ApcPdPCSPlugin.cpp @@ -0,0 +1,405 @@ +#include "ApcPdPCSPlugin.h" + +#define CN_MAX_UNIT_COUNT 300 //最大机组数量 + +#define CN_WIDTH 230 // 图元宽度 +#define CN_HEIGHTSPACE 40 // 输入(输出、文字)上下之间的间隔 +#define CN_FIRSTHEIGHT (m_nCustomPortSpace-14)/2 // 第一个输入(输出、文字)与顶的距离 +//#define CN_PCSLINEARHEADINPUTNUM 7 // PCSLinear顶框输入个数 +//#define CN_PCSLINEARHEADOUTPUTNUM 6 // PCSLinear顶框输出个数 +#define CN_PCSLINEARINPUTNUM 6 // PCS机组框输入个数 +#define CN_PCSLINEAROUTPUTNUM 4 // PCS机组框输出个数 +#define CN_MAXPCSLINEARHEADNUM (m_nTopInPortNum>=m_nTopOutPortNum ? m_nTopInPortNum : m_nTopOutPortNum) +#define CN_MAXPCSLINEARNUM (CN_PCSLINEARINPUTNUM>=CN_PCSLINEAROUTPUTNUM ? CN_PCSLINEARINPUTNUM : CN_PCSLINEAROUTPUTNUM) +#define CN_PCSLINEARHEADHEIGHT CN_MAXPCSLINEARHEADNUM*m_nCustomPortSpace // PCSLinear顶框的高度 +#define CN_PCSLINEARHEIGHT CN_MAXPCSLINEARNUM*m_nCustomPortSpace // PCSLinear框的高度 + +ApcPdPCSPlugin::ApcPdPCSPlugin(): CBlock() +{ + m_nPCSNum = 0; + m_nCustomPortSpace = CN_HEIGHTSPACE; + m_fCommPrecision = 0.01f; + m_fRegulatePrecision = 50; + m_fMinAllocP = 50; + m_nRegulateCycle = 0; + m_nWaitRespTimeout = 3000; + + initPropertyMAP(); + + setPortShowNameFunctionEnable( false ); + + addInPort( CPort(this, "TotalRegulateEnable", E_PORTDATA_BOOL) ); + setInPortShowName( "TotalRegulateEnable", tr("总调节使能") ); + + addInPort( CPort(this, "TotalTargetP", E_PORTDATA_FLOAT) ); + setInPortShowName( "TotalTargetP", tr("AGC目标值") ); + + //addInPort( CPort(this, "TotalTargetPUpperLimit", E_PORTDATA_FLOAT) ); + //setInPortShowName( "TotalTargetPUpperLimit", tr("总有功上限") ); + //addInPort( CPort(this, "TotalTargetPLowerLimit", E_PORTDATA_FLOAT) ); + //setInPortShowName( "TotalTargetPLowerLimit", tr("总有功下限") ); + + addInPort( CPort(this, "ULSoc", E_PORTDATA_FLOAT) ); + setInPortShowName( "ULSoc", tr("SOC上限(单位:%)") ); + addInPort( CPort(this, "LLSoc", E_PORTDATA_FLOAT) ); + setInPortShowName( "LLSoc", tr("SOC下限(单位:%)") ); + + addInPort( CPort(this, "TotalDeadband", E_PORTDATA_FLOAT) ); + setInPortShowName( "TotalDeadband", tr("调节死区") ); + addInPort( CPort(this, "Step", E_PORTDATA_FLOAT) ); + setInPortShowName( "Step", tr("最大调节步进") ); + addInPort( CPort(this, "Interval", E_PORTDATA_FLOAT) ); + setInPortShowName( "Interval", tr("最小调节周期(ms)") ); + m_nTopInPortNum = getInPortSize(); + + addOutPort( CPort(this, "TotalSetP", E_PORTDATA_FLOAT)); + setOutPortShowName( "TotalSetP", tr("总分配功率") ); + addOutPort(CPort(this, "TotalTargetP", E_PORTDATA_FLOAT)); + setOutPortShowName("TotalTargetP", tr("总目标功率")); + addOutPort( CPort(this, "TotalRealP", E_PORTDATA_FLOAT)); + setOutPortShowName( "TotalRealP", tr("总实时功率") ); + addOutPort( CPort(this, "Total SOC", E_PORTDATA_FLOAT) ); + setOutPortShowName( "Total SOC", tr("总SOC(单位:%)") ); + addOutPort( CPort(this, "TotalMaxChargeP", E_PORTDATA_FLOAT)); + setOutPortShowName( "TotalMaxChargeP", tr("总最大充电功率") ); + addOutPort( CPort(this, "TotalMaxDischargeP", E_PORTDATA_FLOAT)); + setOutPortShowName( "TotalMaxDischargeP", tr("总最大放电功率") ); + addOutPort( CPort(this, "TotalUpMarginPower", E_PORTDATA_FLOAT) ); + setOutPortShowName( "TotalUpMarginPower", tr("总可增有功") ); + addOutPort( CPort(this, "TotalDownMarginPower", E_PORTDATA_FLOAT) ); + setOutPortShowName( "TotalDownMarginPower", tr("总可减有功") ); + addOutPort(CPort(this, "TotalNonRegulatePower", E_PORTDATA_FLOAT)); + setOutPortShowName("TotalNonRegulatePower", tr("总不可调功率")); + addOutPort( CPort(this, "StatusCode", E_PORTDATA_INT) ); + setOutPortShowName( "StatusCode", tr("状态码") ); + addOutPort( CPort(this, "ErrorCode", E_PORTDATA_INT) ); + setOutPortShowName( "ErrorCode", tr("错误码") ); + m_nTopOutPortNum = getOutPortSize(); + + this->setProperty( C_PROPERTY_SHOWNAME, showName() ); + //< 端口间隔 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("PortSpace")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + //< 机组数量 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("UnitCnt")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + + //< 功率分配算法 + QStringList listTmp; + listTmp<setProperty( (C_PREFIX_VALUEEDITTYPE+QString("AllocALG")).toStdString().c_str(), E_VALUEEDIT_COMBOBOX ); + this->setProperty( (C_PREFIX_COMBOBOXITEM+QString("AllocALG")).toStdString().c_str(), listTmp); + AllocALG = listTmp.at(0); + + //< 反馈超时时间 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("WaitRespTimeout")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + //< 稳定时定时分配间隔 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("RegulateCycle")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + + //< 机组参数 + //< 最小分配功率 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("MinAllocP")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + //< 通讯精度 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("CommPrecision")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + //< 调节精度 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("RegulatePrecision")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + +} + +ApcPdPCSPlugin::~ApcPdPCSPlugin() +{ + +} + +void ApcPdPCSPlugin::initPropertyMAP() +{ + m_mapProperty["UnitCnt"] = tr("机组个数"); + m_mapProperty["PortSpace"] = tr("端口间隔"); + m_mapProperty["AllocALG"] = tr("功率分配算法"); + m_mapProperty["CommPrecision"] = tr("通讯精度"); + m_mapProperty["RegulatePrecision"] = tr("调节精度"); + m_mapProperty["WaitRespTimeout"] = tr("调节反馈超时时间(单位:ms)"); + m_mapProperty["RegulateCycle"] = tr("稳定时调节周期(单位:s)"); + m_mapProperty["MinAllocP"] = tr("最小分配功率"); +} + +QString ApcPdPCSPlugin::propertyShowName( QString sPropertyName ) +{ + auto iter = m_mapProperty.find(sPropertyName); + if(iter != m_mapProperty.end()) + { + return iter.value(); + } + + return sPropertyName; +} + +QPointF ApcPdPCSPlugin::getInputTextPos(const int nInputIndex, const int nInputTextWidth) +{ + Q_UNUSED(nInputTextWidth); + + int nY = getInputHeight(nInputIndex); + return QPointF(1,nY); +} + +QPointF ApcPdPCSPlugin::getOutputTextPos(const int nOutputIndex, const int nOutputTextWidth) +{ + return QPointF( CN_WIDTH - nOutputTextWidth, getOutputHeight(nOutputIndex) ); +} + +int ApcPdPCSPlugin::getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getInputHeight(nIndex + 1); +} + +int ApcPdPCSPlugin::getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getOutputHeight(nIndex + 1); +} + +int ApcPdPCSPlugin::getFirstHeight() +{ + return CN_FIRSTHEIGHT; +} + +QString ApcPdPCSPlugin::getOutputRealValueSep() +{ + return "\n"; +} + +QPointF ApcPdPCSPlugin::getIconPos(const QSize &pixmapSize) +{ + int nX = (CN_WIDTH - pixmapSize.width()) / 2; + return QPointF(nX,5); +} + +QPolygonF ApcPdPCSPlugin::getPolygon(const int nWidth, const int nHeight) +{ + // Set Polygon Top-Left: 0/0 + QPolygonF polygon; + polygon << QPointF(0, 0) << QPointF( nWidth, 0) + << QPointF(nWidth, nHeight) << QPointF(0, nHeight) + << QPointF(0, 0); + + const int nPCSLinearNum = this->property("UnitCnt").toInt(); + for ( int i=0; iproperty("UnitCnt").toInt(); + if ( nUnitCount == 0 ) + { + this->setProperty("UnitCnt",1); + } +} + +int ApcPdPCSPlugin::getInputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < m_nTopInPortNum ) + nRet += nIndex * m_nCustomPortSpace; + else + { + nRet += CN_PCSLINEARHEADHEIGHT+ + (nIndex-m_nTopInPortNum)/CN_PCSLINEARINPUTNUM*CN_PCSLINEARHEIGHT+ + (nIndex-m_nTopInPortNum)%CN_PCSLINEARINPUTNUM*m_nCustomPortSpace; + } + return nRet; +} + +int ApcPdPCSPlugin::getOutputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < m_nTopOutPortNum ) + nRet += nIndex * m_nCustomPortSpace; + else + { + nRet += CN_PCSLINEARHEADHEIGHT+ + (nIndex-m_nTopOutPortNum)/CN_PCSLINEAROUTPUTNUM*CN_PCSLINEARHEIGHT+ + (nIndex-m_nTopOutPortNum)%CN_PCSLINEAROUTPUTNUM*m_nCustomPortSpace; + } + return nRet; +} + +void ApcPdPCSPlugin::setPCSNum( int nPCSNum ) +{ + if ( nPCSNum < 0 ) + { + emit signalErrorDisplay(tr("PCS个数不能小于0个!!!")); + return; + } + if ( nPCSNum > CN_MAX_UNIT_COUNT ) + { + emit signalErrorDisplay(tr("PCS个数不能大于300个!!!")); + return; + } + + QString sPortName = ""; + QString sPortDesc = ""; + for ( int i=nPCSNum+1; i<=m_nPCSNum; i++ ) + { + // 删除输入端口 + removeInPort(QString("Unit %1 TargetP").arg(i)); + removeInPort(QString("Unit %1 RealP").arg(i)); + removeInPort(QString("Unit %1 SOC").arg(i)); + removeInPort(QString("Unit %1 MaxDischargeP").arg(i)); + removeInPort(QString("Unit %1 MaxChargeP").arg(i)); + removeInPort(QString("Unit %1 RegulateEnable").arg(i)); + + // 删除输出端口 + removeOutPort(QString("Unit %1 DistributionPower").arg(i)); + removeOutPort(QString("Unit %1 RegulateEnable").arg(i)); + removeOutPort(QString("Unit %1 StatusCode").arg(i)); + removeOutPort(QString("Unit %1 ErrorCode").arg(i)); + + // 删除动态属性 + + } + for ( int i=m_nPCSNum+1; i<=nPCSNum; i++ ) + { + // 增加输入端口 + sPortName = QString("Unit %1 TargetP").arg(i); + sPortDesc = QString(tr("机组%1有功目标值")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + + sPortName = QString("Unit %1 RealP").arg(i); + sPortDesc = QString(tr("机组%1有功实际值")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + + sPortName = QString("Unit %1 SOC").arg(i); + sPortDesc = QString(tr("机组%1 SOC(单位:%)")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 MaxDischargeP").arg(i); + sPortDesc = QString(tr("机组%1最大放电功率")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 MaxChargeP").arg(i); + sPortDesc = QString(tr("机组%1最大充电功率")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + sPortDesc = QString(tr("机组%1调节使能")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_BOOL) ); + setInPortShowName( sPortName, sPortDesc ); + + // 增加输出端口 + sPortName = QString("Unit %1 DistributionPower").arg(i); + sPortDesc = QString(tr("机组%1分配有功")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + sPortDesc = QString(tr("机组%1调节使能")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_BOOL) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 StatusCode").arg(i); + sPortDesc = QString(tr("机组%1状态码")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_INT) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 ErrorCode").arg(i); + sPortDesc = QString(tr("机组%1错误码")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_INT) ); + setOutPortShowName( sPortName, sPortDesc ); + + // 增加动态属性 + + } + m_nPCSNum = nPCSNum; + emit signalPortSizeChanged(); +} + +void ApcPdPCSPlugin::setSpace(int nValue) +{ + if (nValue > 100) + { + emit signalErrorDisplay(tr("端口间隔不能大于100")); + return; + } + + if(nValue < 20) + { + emit signalErrorDisplay(tr("端口间隔不能小于20")); + return; + } + + m_nCustomPortSpace = nValue; + emit signalPortSizeChanged(); +} + +void ApcPdPCSPlugin::setWaitRespTimeout(int nWaitRespTimeout) +{ + if(nWaitRespTimeout <= 0) + { + emit signalErrorDisplay(tr("【调节反馈超时时间】值错误,合法值:大于0")); + return; + } + + m_nWaitRespTimeout = nWaitRespTimeout; +} + +void ApcPdPCSPlugin::setRegulateCycle(int nRegulateCycle) +{ + if(nRegulateCycle < 0) + { + emit signalErrorDisplay(tr("【稳定时调节周期】值错误,合法值:大于等于0")); + return; + } + + m_nRegulateCycle = nRegulateCycle; +} + +void ApcPdPCSPlugin::setMinAllocP(float fMinAllocP) +{ + if(fMinAllocP <= 0) + { + emit signalErrorDisplay(tr("【最小分配功率】值错误,合法值:大于0")); + return; + } + + m_fMinAllocP = fMinAllocP; +} + +void ApcPdPCSPlugin::setCommPrecision(float fCommPrecision) +{ + if(fCommPrecision < 0) + { + emit signalErrorDisplay(tr("【通讯精度】值错误,合法值:大于0")); + return; + } + + m_fCommPrecision = fCommPrecision; +} + +void ApcPdPCSPlugin::setRegulatePrecision(float fRegulatePrecision) +{ + if(fRegulatePrecision < 0) + { + emit signalErrorDisplay(tr("【调节精度】值错误,合法值:大于0")); + return; + } + + m_fRegulatePrecision = fRegulatePrecision; +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/ApcPdPCSPlugin.h b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/ApcPdPCSPlugin.h new file mode 100644 index 00000000..258bd4c6 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/ApcPdPCSPlugin.h @@ -0,0 +1,99 @@ +#ifndef TEMPLATEPLUGIN_H +#define TEMPLATEPLUGIN_H + +#include "CBlock.h" +#include + +class ApcPdPCSPlugin : public CBlock +{ + Q_OBJECT + Q_PLUGIN_METADATA( IID Block_iid ) // Q_PLUGIN_METADATA 宏用于描述插件元数据 + Q_INTERFACES( CBlock ) // Q_INTERFACES 宏用于告诉Qt该类实现的接口 + +public: + Q_INVOKABLE ApcPdPCSPlugin(); + Q_INVOKABLE ~ApcPdPCSPlugin(); + +public: + QString name() { return "apc_pd_pcs"; } + QString showName() { return QObject::tr("储能机组有功分配器V2"); } + QString propertyShowName( QString sPropertyName ); + QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } + + //< 获取图元输入端口文本的位置坐标,nInputTextWidth是文字边框的宽度 + QPointF getInputTextPos(const int nInputIndex,const int nInputTextWidth) override; + QPointF getOutputTextPos(const int nOutputIndex,const int nOutputTextWidth) override; + //< 获取输入端口高度 + int getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + int getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + // 第一个输入(输出、文字)与顶的距离 + int getFirstHeight() override; + //< 输出值显示分隔符 + QString getOutputRealValueSep() override; + + QPointF getIconPos(const QSize &pixmapSize) override; + //< 用于画图元外边框的折线 + QPolygonF getPolygon(const int nWidth,const int nHeight) override; + bool isCustomItemPos() override; + + void setDefaultIconSize() override; + //< 初始化后执行的操作,可以图元自定义一些特殊操作 + void afterInitialize() override; + +private: + int getInputHeight(const int nIndex); + int getOutputHeight(const int nIndex ); + void initPropertyMAP(); + +public: + int getPCSNum () { return m_nPCSNum; } + void setPCSNum ( int nPCSNum ); + int getSpace() { return m_nCustomPortSpace; } + void setSpace( int nValue ); + + void setWaitRespTimeout(int nWaitRespTimeout); + int getWaitRespTimeout() {return m_nWaitRespTimeout;} + void setRegulateCycle(int nRegulateCycle); + int getRegulateCycle() {return m_nRegulateCycle;} + + void setMinAllocP(float fMinAllocP); + float getMinAllocP() {return m_fMinAllocP;} + + void setCommPrecision(float fCommPrecision); + float getCommPrecision() {return m_fCommPrecision;} + void setRegulatePrecision(float fRegulatePrecision); + float getRegulatePrecision() {return m_fRegulatePrecision;} + +private: + QMap m_mapProperty; + int m_nTopInPortNum; //< 顶框中输入端口个数 + int m_nTopOutPortNum; //< 顶框中输出端口个数 + + int m_nCustomPortSpace; + Q_PROPERTY(int PortSpace READ getSpace WRITE setSpace USER true DESIGNABLE true) + + int m_nPCSNum; // PCS个数 机组个数 + Q_PROPERTY( int UnitCnt READ getPCSNum WRITE setPCSNum USER true DESIGNABLE true ) + + IMPL_PROPERTY( QString, AllocALG ) // 功率分配算法 allocation algorithm + Q_PROPERTY( QString AllocALG READ get_AllocALG WRITE set_AllocALG USER true DESIGNABLE true ) + + int m_nWaitRespTimeout; //< 等待调节反馈超时时间 + Q_PROPERTY( int WaitRespTimeout READ getWaitRespTimeout WRITE setWaitRespTimeout USER true DESIGNABLE true ) + + int m_nRegulateCycle; //< 稳定时定时调节周期 + Q_PROPERTY( int RegulateCycle READ getRegulateCycle WRITE setRegulateCycle USER true DESIGNABLE true ) + + float m_fMinAllocP; //< 最小分配功率 + Q_PROPERTY( float MinAllocP READ getMinAllocP WRITE setMinAllocP USER true DESIGNABLE true ) + + //< 作用:1、若读回来的机组功率设定值与下发的目标值差值的绝对值小于该值,则认为通讯成功。2、下发功率是此值的倍数 + float m_fCommPrecision; + Q_PROPERTY( float CommPrecision READ getCommPrecision WRITE setCommPrecision USER true DESIGNABLE true ) + + //< 作用:若机组的功率实际值与设定值差值的绝对值小于该值,则认为成功。 + float m_fRegulatePrecision; + Q_PROPERTY( float RegulatePrecision READ getRegulatePrecision WRITE setRegulatePrecision USER true DESIGNABLE true ) +}; + +#endif // TEMPLATEPLUGIN_H diff --git a/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/apc_pd_pcsplugin.pro b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/apc_pd_pcsplugin.pro new file mode 100644 index 00000000..5fc86b9a --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/apc_pd_pcsplugin.pro @@ -0,0 +1,33 @@ +TARGET = apc_pd_pcsplugin +QT = core gui widgets +CONFIG += dll +TEMPLATE = lib + +SOURCES += \ + ApcPdPCSPlugin.cpp + +HEADERS += \ + ApcPdPCSPlugin.h + +INCLUDEPATH += \ + ../.. \ + ../../fbd_block \ + ../../include + +LIBS += \ + -lfbd_block + +RESOURCES += \ + icon.qrc + +!include( ../../../../common.pri ){ + error(the file common.pri is not exist!!) +} + +#fbd_plugins插件的统一规则 +FBD_PLUGINS_PRI=$$PWD/../fbd_plugins.pri +exists($$FBD_PLUGINS_PRI) { + include($$FBD_PLUGINS_PRI) +}else { + error("FATAL error: can not find fbd_plugins.pri") +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/icon.qrc b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/icon.qrc new file mode 100644 index 00000000..7f50d9fc --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/icon.qrc @@ -0,0 +1,5 @@ + + + icon/apc_pd_pcs.png + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/icon/apc_pd_pcs.png b/product/src/tools/fbd_designer/fbd_plugins/apc_pd_pcsplugin/icon/apc_pd_pcs.png new file mode 100644 index 0000000000000000000000000000000000000000..61f527f9ca989b377faffa76329afa946be03516 GIT binary patch literal 563 zcmV-30?hr1P)5t9bg593J4V#DgY`FDj-w*rsl~9>cL= z^bX(iYzz48;9Pidi1;{O1o}XOfeQ_PgM|Zvrs#6wT%=^gi#*#ZgyU<_hso+ywvaPB6PqTR9_PaiO$4_&Zs;_t_C zUer0tWle=rTNice!`aG&_F3y1cxl}<+oi=Pd8nT!;^k9aR17c8$0;}k{||6@t!>CA zzak3;Kj`PVHc4To3va8Ttnm)Bk;I=iFun5Q;vLg=vWOZS459!4002ovPDHLkV1mjG B_{IPL literal 0 HcmV?d00001 diff --git a/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.cpp b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.cpp new file mode 100644 index 00000000..55acb6fb --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.cpp @@ -0,0 +1,175 @@ +#include "batchActionAOplugin.h" + +batchActionAOplugin::batchActionAOplugin(): CBlock() +{ + m_nInputNum = 0; + m_nControlTimeout=10; + m_nSendingInterval=50; + addInPort( CPort(this, "I1", E_PORTDATA_BOOL) ); + setInPortShowName("I1",tr("使能")); + + this->setProperty( C_PROPERTY_SHOWNAME, showName() ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("ActionName")).toStdString().c_str(), E_VALUEEDIT_LINEEDIT ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("SendingInterval")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("PortSpace")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("Width")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("InputNum")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("ControlTimeout")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + + + ActionName = "bactchActionAO"; + +} + +batchActionAOplugin::~batchActionAOplugin() +{ +} + +QString batchActionAOplugin::propertyShowName( QString sPropertyName ) +{ + if ( sPropertyName == "ActionName" ) + return tr("动作名称"); + else if ( sPropertyName == "SendingInterval" ) + return tr("发送周期(单位:s)"); + else if ( sPropertyName == "PortSpace" ) + return tr("端口间距"); + else if ( sPropertyName == "Width" ) + return tr("图元宽度"); + else if ( sPropertyName == "InputNum" ) + return tr("输入个数"); + else if ( sPropertyName == "ControlTimeout" ) + return tr("命令超时时间(单位:ms)"); + else if ( sPropertyName.startsWith("InputRtu") ) + return tr("输入")+sPropertyName.remove( "InputRtu" )+tr("Rtu标识"); + else if ( sPropertyName.startsWith("InputFlag") ) + return tr("输入")+sPropertyName.remove( "InputFlag" )+tr("控制点标识"); + else if ( sPropertyName.startsWith("CtrlStr") ) + return tr("输入")+sPropertyName.remove( "CtrlStr" )+tr("控制测点串"); + return sPropertyName; +} + +void batchActionAOplugin::setWidth(int nValue) +{ + if (nValue > 1000) + { + emit signalErrorDisplay(tr("宽度不能大于1000")); + return; + } + if (nValue < 40) + { + emit signalErrorDisplay(tr("宽度不能小于40")); + return; + } + if (nValue == getIconWidth()) + { + emit signalErrorDisplay(tr("输入值与现值相同")); + return; + } + setIconWidth( nValue ); + emit signalPortSizeChanged(); +} + +void batchActionAOplugin::setSpace(int nValue) +{ + if (nValue > 400) + { + emit signalErrorDisplay(tr("端口间隔不能大于400")); + return; + } + if (nValue < 16) + { + emit signalErrorDisplay(tr("端口间隔不能小于16")); + return; + } + if (nValue == getPortSpace()) + { + emit signalErrorDisplay(tr("输入值与现值相同")); + return; + } + setPortSpace( nValue ); + emit signalPortSizeChanged(); +} + +void batchActionAOplugin::setCustomInputNum(int value) +{ + + if (value < 0) + { + emit signalErrorDisplay(tr("输入值不能小于0")); + return; + } + if (value == m_nInputNum ) + { + emit signalErrorDisplay(tr("输入值与现值相同")); + return; + } + + int oldvalue = m_nInputNum; + QString PortName; + for (int i = value; i < oldvalue; i++) + { + PortName = QString("I%1").arg(i+1); + removeInPort(PortName); + + m_bChangeDynamicProperty = false; + QString sPropertyNameRtu = QString("InputRtu%1").arg(i+1); + QString sPropertyNameParam = QString("InputFlag%1").arg(i+1); + QString sPropertyNameCtrlStr = QString("CtrlStr%1").arg(i+1); + this->setProperty( sPropertyNameRtu.toStdString().c_str(), QVariant::Invalid ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+sPropertyNameRtu).toStdString().c_str(), QVariant::Invalid ); + this->setProperty( sPropertyNameParam.toStdString().c_str(), QVariant::Invalid ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+sPropertyNameParam).toStdString().c_str(), QVariant::Invalid ); + this->setProperty( sPropertyNameCtrlStr.toStdString().c_str(), QVariant::Invalid ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+sPropertyNameCtrlStr).toStdString().c_str(), QVariant::Invalid ); + + m_bChangeDynamicProperty = true; + } + for (int i = oldvalue; i < value; i++) + { + PortName = QString("I%1").arg(i+1); + addInPort( CPort(this, PortName, E_PORTDATA_FLOAT) ); + + m_bChangeDynamicProperty = false; + QString sPropertyNameRtu = QString("InputRtu%1").arg(i+1); + QString sPropertyNameParam = QString("InputFlag%1").arg(i+1); + QString sPropertyNameCtrlStr = QString("CtrlStr%1").arg(i+1); + + this->setProperty( (C_PREFIX_VALUEEDITTYPE+sPropertyNameRtu).toStdString().c_str(), E_VALUEEDIT_LINEEDIT ); + this->setProperty( sPropertyNameRtu.toStdString().c_str(), "" ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+sPropertyNameParam).toStdString().c_str(), E_VALUEEDIT_LINEEDIT ); + this->setProperty( sPropertyNameParam.toStdString().c_str(), ""); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+sPropertyNameCtrlStr).toStdString().c_str(), E_VALUEEDIT_LINEEDIT ); + this->setProperty( sPropertyNameCtrlStr.toStdString().c_str(), ""); + + m_bChangeDynamicProperty = true; + } + emit signalPortSizeChanged(); + m_nInputNum = value; + +} + +void batchActionAOplugin::setSendingInterval(int nValue) +{ + m_nSendingInterval=nValue; +} + +void batchActionAOplugin::setControlTimeout(int nValue) +{ + m_nControlTimeout=nValue; +} + + + + + + + + + + + + + + + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.h b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.h new file mode 100644 index 00000000..3d9278f5 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.h @@ -0,0 +1,56 @@ +#ifndef TEMPLATEPLUGIN_H +#define TEMPLATEPLUGIN_H + +#include "CBlock.h" + +class batchActionAOplugin : public CBlock +{ + Q_OBJECT + Q_PLUGIN_METADATA( IID Block_iid ) // Q_PLUGIN_METADATA 宏用于描述插件元数据 + Q_INTERFACES( CBlock ) // Q_INTERFACES 宏用于告诉Qt该类实现的接口 + + IMPL_PROPERTY( QString, ActionName ) + IMPL_PROPERTY( int, ControlTimeout ) + IMPL_PROPERTY( int, RedoTimes ) + + Q_PROPERTY( QString ActionName READ get_ActionName WRITE set_ActionName USER true DESIGNABLE true ) + Q_PROPERTY( int SendingInterval READ getSendingInterval WRITE setSendingInterval USER true DESIGNABLE true ) + Q_PROPERTY( int PortSpace READ getSpace WRITE setSpace USER true DESIGNABLE true ) + Q_PROPERTY( int Width READ getWidth WRITE setWidth USER true DESIGNABLE true ) + Q_PROPERTY( int InputNum READ getCustomInputNum WRITE setCustomInputNum USER true DESIGNABLE true ) + Q_PROPERTY( int ControlTimeout READ getControlTimeout WRITE setControlTimeout USER true DESIGNABLE true ) + +public: + Q_INVOKABLE batchActionAOplugin(); + Q_INVOKABLE ~batchActionAOplugin(); + +public: + QString name() { return "batchActionAO"; } + QString showName() { return QObject::tr("AO批量控制"); } + QString propertyShowName( QString sPropertyName ); + QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } + + int getWidth() { return (int)getIconWidth(); } + void setWidth( int nValue ); + int getSpace() { return getPortSpace(); } + void setSpace( int nValue ); + int getCustomInputNum() { return m_nInputNum; } + void setCustomInputNum(int nValue); + int getSendingInterval() { return m_nSendingInterval; } + void setSendingInterval(int nValue); + int getControlTimeout() { return m_nControlTimeout; } + void setControlTimeout(int nValue); +protected: + + +private: + + +private: + int m_nInputNum; + int m_nSendingInterval; + bool m_bChangeDynamicProperty; + int m_nControlTimeout; +}; + +#endif // TEMPLATEPLUGIN_H diff --git a/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.pro b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.pro new file mode 100644 index 00000000..b3788302 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/batchActionAOplugin.pro @@ -0,0 +1,39 @@ +TARGET = batchActionAOplugin +QT = core gui widgets xml sql +CONFIG += dll +TEMPLATE = lib +CONFIG += qt + +SOURCES += \ + batchActionAOplugin.cpp \ + +HEADERS += \ + batchActionAOplugin.h \ + +INCLUDEPATH += \ + ../../fbd_block \ + ../../fbd_tree \ + ../../fbd_property \ + +LIBS += \ + -lfbd_block \ + -lfbd_tree \ + +RESOURCES += \ + icon.qrc + +!include( ../../../../idl_files/idl_files.pri){ + error(the file idl_files.pri is not exist!!) +} + +!include( ../../../../common.pri ){ + error(the file common.pri is not exist!!) +} + +#fbd_plugins插件的统一规则 +FBD_PLUGINS_PRI=$$PWD/../fbd_plugins.pri +exists($$FBD_PLUGINS_PRI) { + include($$FBD_PLUGINS_PRI) +}else { + error("FATAL error: can not find fbd_plugins.pri") +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/icon.qrc b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/icon.qrc new file mode 100644 index 00000000..bf3f885b --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/icon.qrc @@ -0,0 +1,5 @@ + + + icon/batchActionAO.png + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/icon/batchActionAO.png b/product/src/tools/fbd_designer/fbd_plugins/batchActionAOplugin/icon/batchActionAO.png new file mode 100644 index 0000000000000000000000000000000000000000..ff84c2259d922a72d88ffac2b4668a6813f0845b GIT binary patch literal 627 zcmV-(0*w8MP)RNC0tsT5WgV&|g}zJTQmz(Q^13&1ac#*PG{F-9AfhDsxm z%EU0<%PhfVA1u0yg(n$ixO?ZGxsRQh6=2*;jegIl%^+B`AaIRkkrG6jGf2k?jfvmD zo_=BhYeGkmsLBY!sMDy$#Ih?~5d!0Y!56|G!8c-giR38y{&_5rl^2M5Rrfd4Ar#~l zBHmQ}MTAVa zjd{I1vbU2nR()Q89YUT&2739b7Zp*ntYlO3fPSOKTzE{lkyE{1w6jzbM@S6{!*BxU zi^(b(^`AXtk2wk~o0wL_oNxB@HmUM$hE6SRXWnuwj{F{T1lkSzXB|4>Pf;_;d^;AM zNNE$XkbZ+D)Z!RFx)7KmC6J@Mp1bJ>u~*v`Q_#dZ9EvGe;tt}JD&32!pEnTKVzR3L z$6Kb_U?1tS9W?qJbfJHcX(|d0 + +DemandControlPlugin::DemandControlPlugin(): CBlock() +{ + m_fDemandDeadband = 50.0f; + m_fReverseDeadband = 50.0f; + m_fMaxDischargePower = 0.0f; + m_fMaxChargingPower = 0.0f; + m_nMinAdjustPeriod = 5000; //默认5秒 + + setPortShowNameFunctionEnable( false ); + //输入端口 + addInPort( CPort(this, "EnableRegulate", E_PORTDATA_BOOL) ); + setInPortShowName( "EnableRegulate", tr("调节使能") ); + + addInPort( CPort(this, "MeterRealPower", E_PORTDATA_FLOAT) ); + setInPortShowName( "MeterRealPower", tr("总实时功率") ); + + addInPort( CPort(this, "StorageRealPower", E_PORTDATA_FLOAT) ); + setInPortShowName( "StorageRealPower", tr("储能实时功率") ); + + addInPort( CPort(this, "PlanPower", E_PORTDATA_FLOAT) ); + setInPortShowName( "PlanPower", tr("储能计划功率") ); + + addInPort( CPort(this, "DemandSetValue", E_PORTDATA_FLOAT) ); + setInPortShowName( "DemandSetValue", tr("需量设定值") ); + + addInPort( CPort(this, "ReversePowerSetValue", E_PORTDATA_FLOAT) ); + setInPortShowName( "ReversePowerSetValue", tr("逆流功率设定值") ); + + //输出端口 + addOutPort( CPort(this, "OutTargetPower", E_PORTDATA_FLOAT) ); + setOutPortShowName( "OutTargetPower", tr("目标功率") ); + + addOutPort( CPort(this, "EnableOut", E_PORTDATA_BOOL) ); + setOutPortShowName( "EnableOut", tr("输出使能") ); + + //属性 + this->setProperty( C_PROPERTY_SHOWNAME, showName() ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("EnableDemandCtrl")).toStdString().c_str(), E_VALUEEDIT_COMBOBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("DemandDeadband")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("MaxDischargePower")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("EnableReverseCtrl")).toStdString().c_str(), E_VALUEEDIT_COMBOBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("ReverseDeadband")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("MaxChargingPower")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("MinAdjustPeriod")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + + QStringList listDemandTmp; + listDemandTmp<setProperty( (C_PREFIX_COMBOBOXITEM+QString("EnableDemandCtrl")).toStdString().c_str(), listDemandTmp); + EnableDemandCtrl = listDemandTmp.at(1); + + QStringList listReverseTmp; + listReverseTmp<setProperty( (C_PREFIX_COMBOBOXITEM+QString("EnableReverseCtrl")).toStdString().c_str(), listReverseTmp); + EnableReverseCtrl = listReverseTmp.at(1); + + setPortSpace(40); + setIconWidth(60); +} + +DemandControlPlugin::~DemandControlPlugin() +{ +} + +QString DemandControlPlugin::propertyShowName( QString sPropertyName ) +{ + if ( sPropertyName == "EnableDemandCtrl" ) + return tr("是否启用需量控制"); + else if ( sPropertyName == "DemandDeadband" ) + return tr("需量调节死区"); + else if ( sPropertyName == "MaxDischargePower" ) + return tr("超需时最大放电功率"); + else if ( sPropertyName == "EnableReverseCtrl" ) + return tr("是否启用防逆流控制"); + else if ( sPropertyName == "MaxChargingPower" ) + return tr("逆流时最大充电功率"); + else if ( sPropertyName == "ReverseDeadband" ) + return tr("逆流调节死区"); + else if ( sPropertyName == "MinAdjustPeriod" ) + return tr("最小调节间隔(单位:ms)"); + + return sPropertyName; +} + +void DemandControlPlugin::setDemandDeadband( float fDemandDeadband ) +{ + if ( fDemandDeadband <= 0 ) + { + emit signalErrorDisplay(tr("【需量调节死区】值错误,合法值:大于0")); + return; + } + m_fDemandDeadband = fDemandDeadband; +} + +void DemandControlPlugin::setMaxDischargePower(float fMaxDischargePower) +{ + if (fMaxDischargePower < 0) + { + emit signalErrorDisplay(tr("【最大放电功率】值错误,合法值:大于等于0")); + return; + } + m_fMaxDischargePower = fMaxDischargePower; +} + +void DemandControlPlugin::setReverseDeadband(float fReverseDeadband) +{ + if ( fReverseDeadband <= 0 ) + { + emit signalErrorDisplay(tr("【逆流调节死区】值错误,合法值:大于0")); + return; + } + m_fReverseDeadband = fReverseDeadband; +} + +void DemandControlPlugin::setMaxChargingPower(float fMaxChargingPower) +{ + if (fMaxChargingPower > 0) + { + emit signalErrorDisplay(tr("【最大充电功率】值错误,合法值:小于等于0")); + return; + } + m_fMaxChargingPower = fMaxChargingPower; +} + +void DemandControlPlugin::setMinAdjustPeriod(int nMinAdjustPeriod) +{ + if (nMinAdjustPeriod < 0) + { + emit signalErrorDisplay(tr("【最小调节间隔】值错误,合法值:大于等于0")); + return; + } + m_nMinAdjustPeriod = nMinAdjustPeriod; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.h b/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.h new file mode 100644 index 00000000..0cd96b95 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.h @@ -0,0 +1,74 @@ +#ifndef TEMPLATEPLUGIN_H +#define TEMPLATEPLUGIN_H + +#include "CBlock.h" + +class DemandControlPlugin : public CBlock +{ + Q_OBJECT + Q_PLUGIN_METADATA( IID Block_iid ) // Q_PLUGIN_METADATA 宏用于描述插件元数据 + Q_INTERFACES( CBlock ) // Q_INTERFACES 宏用于告诉Qt该类实现的接口 + +public: + Q_INVOKABLE DemandControlPlugin(); + Q_INVOKABLE ~DemandControlPlugin(); + +public: + QString name() { return "demandcontrol"; } + QString showName() { return QObject::tr("需量/逆流控制策略"); } + QString propertyShowName( QString sPropertyName ); + QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } + +public: + float getDemandDeadband() { return m_fDemandDeadband; } + void setDemandDeadband( float fDemandDeadband ); + + float getMaxDischargePower() {return m_fMaxDischargePower;} + void setMaxDischargePower(float fMaxDischargePower); + + float getReverseDeadband() { return m_fReverseDeadband; } + void setReverseDeadband( float fReverseDeadband ); + + float getMaxChargingPower() {return m_fMaxChargingPower;} + void setMaxChargingPower(float fMaxChargingPower); + + int getMinAdjustPeriod() {return m_nMinAdjustPeriod;} + void setMinAdjustPeriod(int nMinAdjustPeriod); + +private: + IMPL_PROPERTY( QString, EnableDemandCtrl) // 是否启用需量控制 + Q_PROPERTY( QString EnableDemandCtrl READ get_EnableDemandCtrl WRITE set_EnableDemandCtrl USER true DESIGNABLE true ) + + float m_fDemandDeadband; // 需量调节死区 + Q_PROPERTY( float DemandDeadband READ getDemandDeadband WRITE setDemandDeadband USER true DESIGNABLE true ) + + float m_fMaxDischargePower; // 超需时最大放电功率 + Q_PROPERTY( float MaxDischargePower READ getMaxDischargePower WRITE setMaxDischargePower USER true DESIGNABLE true ) + + IMPL_PROPERTY( QString, EnableReverseCtrl) // 是否启用逆流控制 + Q_PROPERTY( QString EnableReverseCtrl READ get_EnableReverseCtrl WRITE set_EnableReverseCtrl USER true DESIGNABLE true ) + + float m_fReverseDeadband; // 逆流调节死区 + Q_PROPERTY( float ReverseDeadband READ getReverseDeadband WRITE setReverseDeadband USER true DESIGNABLE true ) + + float m_fMaxChargingPower; // 逆流时最大充电功率 + Q_PROPERTY( float MaxChargingPower READ getMaxChargingPower WRITE setMaxChargingPower USER true DESIGNABLE true ) + + int m_nMinAdjustPeriod; // 最小调节间隔,单位:ms + Q_PROPERTY( int MinAdjustPeriod READ getMinAdjustPeriod WRITE setMinAdjustPeriod USER true DESIGNABLE true ) +}; + +#endif // TEMPLATEPLUGIN_H + + + + + + + + + + + + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.pro b/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.pro new file mode 100644 index 00000000..3b01c758 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/demandcontrolplugin.pro @@ -0,0 +1,33 @@ +TARGET = demandcontrolplugin +QT = core gui widgets +CONFIG += dll +TEMPLATE = lib + +SOURCES += \ + demandcontrolplugin.cpp + +HEADERS += \ + demandcontrolplugin.h + +INCLUDEPATH += \ + ../.. \ + ../../fbd_block \ + ../../include + +LIBS += \ + -lfbd_block + +RESOURCES += \ + icon.qrc + +!include( ../../../../common.pri ){ + error(the file common.pri is not exist!!) +} + +#fbd_plugins插件的统一规则 +FBD_PLUGINS_PRI=$$PWD/../fbd_plugins.pri +exists($$FBD_PLUGINS_PRI) { + include($$FBD_PLUGINS_PRI) +}else { + error("FATAL error: can not find fbd_plugins.pri") +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/icon.qrc b/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/icon.qrc new file mode 100644 index 00000000..796ba96f --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/icon.qrc @@ -0,0 +1,5 @@ + + + icon/demandcontrol.png + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/icon/demandcontrol.png b/product/src/tools/fbd_designer/fbd_plugins/demandcontrolplugin/icon/demandcontrol.png new file mode 100644 index 0000000000000000000000000000000000000000..e2b87598c2733493d3306772d0b373aa3101fb0a GIT binary patch literal 1037 zcmV+o1oHcdP)(Itw8XO^#Ot zpgqFx09sJLlipd%I-0Trffs?RW; z&Cq^Hb`(fJ9zI}@9Gf78~K4TNxCf;RBV4 zP||?t74_~qNZgw%l@!A7hhX>UN8t>PDe5UCzEF+`Eidt2Qjj~BZ$WqS$$ zFJ2xI*)Eq!@-00000NkvXX Hu0mjf3N_-- literal 0 HcmV?d00001 diff --git a/product/src/tools/fbd_designer/fbd_plugins/fbd_plugins.pro b/product/src/tools/fbd_designer/fbd_plugins/fbd_plugins.pro index 2faf0a6d..5c3410d3 100644 --- a/product/src/tools/fbd_designer/fbd_plugins/fbd_plugins.pro +++ b/product/src/tools/fbd_designer/fbd_plugins/fbd_plugins.pro @@ -15,4 +15,10 @@ SUBDIRS += \ alarmsplitplugin \ multimapplugin \ timetriggerplugin \ - videocontrolplugin + videocontrolplugin \ + alarmGeneratePlugin \ + demandcontrolplugin \ + powercontrolreactiveplugin \ + powerOutputCtrlplugin \ + apc_pd_pcsplugin \ + batchActionAOplugin diff --git a/product/src/tools/fbd_designer/fbd_plugins/fmttextplugin/FmtCfgDialog.cpp b/product/src/tools/fbd_designer/fbd_plugins/fmttextplugin/FmtCfgDialog.cpp index b8bae29a..4a98acbf 100644 --- a/product/src/tools/fbd_designer/fbd_plugins/fmttextplugin/FmtCfgDialog.cpp +++ b/product/src/tools/fbd_designer/fbd_plugins/fmttextplugin/FmtCfgDialog.cpp @@ -6,15 +6,14 @@ #define VAR_TOKEN_BEGIN "{" #define VAR_TOKEN_END "}" -FmtCfgDialog::FmtCfgDialog(QWidget *parent, CFmtTextPlugin *pTextPlugin) : - QDialog(parent), - ui(new Ui::FmtCfgDialog), - m_pFmtTextPlugin(pTextPlugin) +FmtCfgDialog::FmtCfgDialog(QWidget *parent, CFmtTextPlugin *pTextPlugin) : QDialog(parent), + ui(new Ui::FmtCfgDialog), + m_pFmtTextPlugin(pTextPlugin) { ui->setupUi(this); - setWindowTitle( tr("格式化文本配置") ); + setWindowTitle(tr("格式化文本配置")); - connect(ui->textEdit_text,&QTextEdit::textChanged,this,&FmtCfgDialog::previewLoad); + connect(ui->textEdit_text, &QTextEdit::textChanged, this, &FmtCfgDialog::previewLoad); } void FmtCfgDialog::setText(const QString &srcText) @@ -41,63 +40,92 @@ FmtCfgDialog::~FmtCfgDialog() void FmtCfgDialog::previewLoad() { - QString text = ui->textEdit_text->toPlainText(),previewText; - int begin_index,end_index; - while(text.size() != 0 ) + QString text = ui->textEdit_text->toPlainText(), previewText; + int begin_index, end_index; + + + while (text.size() != 0) { - if( ( begin_index = text.indexOf(VAR_TOKEN_BEGIN)) != -1) + if ((end_index = text.indexOf(VAR_TOKEN_END)) != -1) { - previewText += text.left(begin_index); - if( ( end_index = text.indexOf(VAR_TOKEN_END)) != -1) + QString var; + if ((begin_index = text.lastIndexOf(VAR_TOKEN_BEGIN,end_index)) != -1) { - auto var = text.mid(begin_index + 1,end_index - begin_index - 1); -// qDebug() << "----------------------"; -// qDebug() << "var is |" << var; -// qDebug() << VAR_TOKEN_BEGIN << " begin_index is |" << QString::number(begin_index); -// qDebug() << VAR_TOKEN_END << " end_index is |" << QString::number(end_index); -// qDebug() << "text is |" << text; -// qDebug() << "previewText is |" << previewText; - - if(m_pFmtTextPlugin->getInPort(var).dataType() == E_PORTDATA_INT) + var = text.mid(begin_index + 1, end_index - begin_index - 1); + bool isInt = false; + int nVar = var.mid(1).toInt(&isInt); + if (var[0] == 'I' && isInt && nVar < m_pFmtTextPlugin->getInPortSize() && nVar > 0) { - previewText += "23"; - }else if(m_pFmtTextPlugin->getInPort(var).dataType() == E_PORTDATA_STRING){ - previewText += "sample"; - }else if(m_pFmtTextPlugin->getInPort(var).dataType() == E_PORTDATA_FLOAT){ - previewText += "23.3"; - }else if(m_pFmtTextPlugin->getInPort(var).dataType() == E_PORTDATA_BOOL){ - previewText += tr("真"); - }else { previewText += tr("未知类型"); } - text = text.mid(end_index + 1); + if (m_pFmtTextPlugin->getInPort(var).dataType() == E_PORTDATA_INT) + { + var = "23"; + } + else if (m_pFmtTextPlugin->getInPort(var).dataType() == E_PORTDATA_STRING) + { + var = "sample"; + } + else if (m_pFmtTextPlugin->getInPort(var).dataType() == E_PORTDATA_FLOAT) + { + var = "23.3"; + } + else if (m_pFmtTextPlugin->getInPort(var).dataType() == E_PORTDATA_BOOL) + { + var = tr("真"); + } + else + { + var = QString(VAR_TOKEN_BEGIN) + var + VAR_TOKEN_END; + } + } + else + { + var = QString(VAR_TOKEN_BEGIN) + var + VAR_TOKEN_END; + } } - else{ previewText += tr("后续语法有误"); break;} - - }else{ + else + { + begin_index = end_index; + var = VAR_TOKEN_END; + } +// qDebug() << "----------------------"; +// qDebug() << "var :" << var; +// qDebug() << "begin_index:" << QString::number(begin_index); +// qDebug() << "end_index:" << QString::number(end_index); +// qDebug() << "text:" << text; +// qDebug() << "previewText before:" << previewText; + previewText += text.left(begin_index) + var; +// qDebug() << "previewText after:" << previewText; + text = text.mid(end_index + 1); + } + else + { + // 找不到{ 停止解析 previewText += text; text = ""; } + } ui->textEdit_preview->setPlainText(previewText); - } void FmtCfgDialog::varLoad() { - if(m_pFmtTextPlugin->getInPortSize() == 1){ + if (m_pFmtTextPlugin->getInPortSize() == 1) + { ui->groupBox_var->setHidden(true); return; } auto layout = new QVBoxLayout; ui->groupBox_var->setLayout(layout); - for(int i = 1; i < m_pFmtTextPlugin->getInPortSize(); i++) //< 从1开始,0是使能输入端口 + for (int i = 1; i < m_pFmtTextPlugin->getInPortSize(); i++) //< 从1开始,0是使能输入端口 { - QPushButton * tmpBtn = new QPushButton( m_pFmtTextPlugin->getInPortShowName(i) + tr("[")+ m_pFmtTextPlugin->getInPort(m_pFmtTextPlugin->getInPortName(i)).dataTypeName() + "]" ); - tmpBtn->setProperty("name",m_pFmtTextPlugin->getInPortName(i)); - connect(tmpBtn,&QPushButton::clicked, [=]( ) { ui->textEdit_text->insertPlainText( VAR_TOKEN_BEGIN + tmpBtn->property("name").toString() + VAR_TOKEN_END); } ); + QPushButton *tmpBtn = new QPushButton(m_pFmtTextPlugin->getInPortShowName(i) + tr("[") + m_pFmtTextPlugin->getInPort(m_pFmtTextPlugin->getInPortName(i)).dataTypeName() + "]"); + tmpBtn->setProperty("name", m_pFmtTextPlugin->getInPortName(i)); + connect(tmpBtn, &QPushButton::clicked, [=]() + { ui->textEdit_text->insertPlainText(VAR_TOKEN_BEGIN + tmpBtn->property("name").toString() + VAR_TOKEN_END); }); layout->addWidget(tmpBtn); // TYPE 变量名 } layout->addStretch(); - } diff --git a/product/src/tools/fbd_designer/fbd_plugins/fmttextplugin/icon/fmttext.png b/product/src/tools/fbd_designer/fbd_plugins/fmttextplugin/icon/fmttext.png index e47c22d314683171cf1f0afdeb62f861c6254e1f..a7dbb69b4f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rZL% ze19dhfCcpdNi<~5ek1|j>7k)#K~r=^!mdl5rA0$=;TASE$a`v#QtV>P+7{d#<)Va6 znv*0-{SHVS)PG4bN_0~fWOV2DzQ}aD&@RlJi!0(nD|i+nU<2&rv;`Kg`Xt_qwpJ0b z3rcoFoy6iAhaz$gGTI4#fw)7C+!eK1P#2m{h-Lv+JX+(@oDSd{LB&0!3!_bgV_!!A-Hgo_LkaV!y0VO~MK@Ltd>`tVF>>RKZMb2pa?e9OHoHR{CN;^#& z9XN}96p;d019z(WItSpO0uiym8{h)CniHI`0ufmN&%n*xpnsvYP4?gwaJjes0+d6W zRka!m@ClsHNc7FBj{$Z)_?Qvg>>79%k;>WVEu<*M|D&p|V-bCii6Aqz1@!KKrK%b$ zKTUS05D}~7VNA-tr=z445d(R0Ad~izeVKZ;x4_pFetfSnaPMyJXX)@9sA}oxb&%l{ zklNiAAbOHjb#vR5_y@BDbAOV|qF#|EgrvjHgpdLt3!M}Ig}>{g1GqGEciS0uv>VNX zZ`|FfYCGzOE}X@LyC8E~y3Fm6uDZo2z`*DpV>X9Ys@h9+2w*!Az#3Zm6!>NT{I3G| Y1{?Qtu~I-<)Bpeg07*qoM6N<$g15k~`2YX_ diff --git a/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/mapcfgdlg.cpp b/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/mapcfgdlg.cpp index 7ae4b31b..efb2fbc2 100644 --- a/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/mapcfgdlg.cpp +++ b/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/mapcfgdlg.cpp @@ -22,12 +22,13 @@ #include "pub_utility_api/CharUtil.h" #include - MapCfgDlg::MapCfgDlg(QWidget *parent) : - QDialog(parent), + CustomUiDialog(parent), ui(new Ui::MapCfgDlg) { ui->setupUi(this); + this->setWindowTitle(tr("映射配置")); + ui->tableWidget->setAcceptDrops(true); ui->tableWidget->setDropIndicatorShown(true); ui->tableWidget->setDragEnabled(true); @@ -41,6 +42,8 @@ MapCfgDlg::MapCfgDlg(QWidget *parent) : connect(ui->search,&QLineEdit::textChanged,this,&MapCfgDlg::searchData); connect(ui->ok,&QPushButton::clicked,this,&MapCfgDlg::okClicked); connect(ui->cancle,&QPushButton::clicked,this,&MapCfgDlg::cancleClicked); + + CustomUiDialog::setAutoLayout(true); } MapCfgDlg::~MapCfgDlg() diff --git a/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/mapcfgdlg.h b/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/mapcfgdlg.h index 372a15d1..2ea4c105 100644 --- a/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/mapcfgdlg.h +++ b/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/mapcfgdlg.h @@ -6,12 +6,13 @@ #include #include "model_excel/xlsx/xlsxdocument.h" #include "model_excel/xlsx/xlsxformat.h" +#include "pub_widget/CustomDialog.h" namespace Ui { class MapCfgDlg; } -class MapCfgDlg : public QDialog +class MapCfgDlg : public CustomUiDialog { Q_OBJECT diff --git a/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/multimapplugin.pro b/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/multimapplugin.pro index aedfa049..faa6b8e4 100644 --- a/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/multimapplugin.pro +++ b/product/src/tools/fbd_designer/fbd_plugins/multimapplugin/multimapplugin.pro @@ -30,6 +30,7 @@ LIBS += \ -lmodel_excel \ -lpub_logger_api \ -llog4cplus \ + -lpub_widget RESOURCES += \ icon.qrc diff --git a/product/src/tools/fbd_designer/fbd_plugins/phonecallplugin/icon/phonecall.png b/product/src/tools/fbd_designer/fbd_plugins/phonecallplugin/icon/phonecall.png index 8e19047a625a23c9f7a2f1ce91166372a5332036..3924e51be6cefcbba391067da2f13ace2691b831 100644 GIT binary patch delta 972 zcmV;-12g=u3hD=tEPoRK01FcV0GgZ_00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj8e@R3^RCocsS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~~_EsXF2 z>}K>SN{0d1?}8B(#k5%W-TF;1s8lgV3$&n*R)R_=f`M`#{eSw$1h=%bbSIn5Tk*I) zuzy+8Zef{#l>YZ#(1>B@G|C)zO561b<=qp(K-O8l~iun5f7)!chkS6E1H@uU@U; zhV@C7*~{#X3r)Avea9zLI2Imp9--uLxJq>d;h6~EjStMP80-5Gszonf+~9Op4JQ>9 z6r?g-XA~PBH&{r$%T=0eks}D9MFzF%gvn%j#^rKV;yuUve2-`ma9ykuDUHn{uYV^% zj~Uc#2@ZWXA@C5~;ogf%dr;|qEroiU$@IL#rJTm8e>oUe$N)iiR)R35wIP9pG&tNP zc$^pUI7@&+wasEKC4pdJy~p#5n3rYQpl4L1QeEDGf!av}55e&`(VG)vq9XFqnO*~l zW#I&lAVG_;3P)fu2wgM+tF%8ME zJDnAG(lPD~M2N@Zxq{V>;S!Qe2s{xH;C?JRk@sTVIhC*>#!XZEB@X-yI!TI1wng51 z4-$G1ObLSgEzImiQlBc4?cuz4^5vgP?H5dG=(WLrnS1@y_7@z^;Ly|Mn+<9J0000< KMNUMnLSTZG%6Iqx diff --git a/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/icon.qrc b/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/icon.qrc new file mode 100644 index 00000000..dcf96a8d --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/icon.qrc @@ -0,0 +1,5 @@ + + + icon/powerOutputCtrl.png + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/icon/powerOutputCtrl.png b/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/icon/powerOutputCtrl.png new file mode 100644 index 0000000000000000000000000000000000000000..ff84c2259d922a72d88ffac2b4668a6813f0845b GIT binary patch literal 627 zcmV-(0*w8MP)RNC0tsT5WgV&|g}zJTQmz(Q^13&1ac#*PG{F-9AfhDsxm z%EU0<%PhfVA1u0yg(n$ixO?ZGxsRQh6=2*;jegIl%^+B`AaIRkkrG6jGf2k?jfvmD zo_=BhYeGkmsLBY!sMDy$#Ih?~5d!0Y!56|G!8c-giR38y{&_5rl^2M5Rrfd4Ar#~l zBHmQ}MTAVa zjd{I1vbU2nR()Q89YUT&2739b7Zp*ntYlO3fPSOKTzE{lkyE{1w6jzbM@S6{!*BxU zi^(b(^`AXtk2wk~o0wL_oNxB@HmUM$hE6SRXWnuwj{F{T1lkSzXB|4>Pf;_;d^;AM zNNE$XkbZ+D)Z!RFx)7KmC6J@Mp1bJ>u~*v`Q_#dZ9EvGe;tt}JD&32!pEnTKVzR3L z$6Kb_U?1tS9W?qJbfJHcX(|d0setProperty( QString("CtrlStr").toStdString().c_str(), "" ); + + addInPort( CPort(this, "I1", E_PORTDATA_FLOAT) ); + addInPort( CPort(this, "I2", E_PORTDATA_BOOL) ); + setInPortShowName("I1",tr("目标值")); + setInPortShowName("I2",tr("使能")); + + this->setProperty( C_PROPERTY_SHOWNAME, showName() ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("ActionName")).toStdString().c_str(), E_VALUEEDIT_LINEEDIT ); + + QStringList listTmp2; + listTmp2<setProperty( (C_PREFIX_COMBOBOXITEM+QString("InPortCtrlStr")).toStdString().c_str(), listTmp2 ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("InPortCtrlStr")).toStdString().c_str(), E_VALUEEDIT_COMBOBOX ); + + + ActionName = "powerCtrl"; + InPortCtrlStr = listTmp2.at(0); +} + +powerCtrlplugin::~powerCtrlplugin() +{ +} + +QString powerCtrlplugin::propertyShowName( QString sPropertyName ) +{ + if ( sPropertyName == "ActionName" ) + return tr("动作名称"); + else if ( sPropertyName == "CtrlStr" ) + return tr("控制测点串"); + else if ( sPropertyName == "InPortCtrlStr" ) + return tr("输入控制测点串"); + return sPropertyName; +} + +QString powerCtrlplugin::get_InPortCtrlStr() +{ + return InPortCtrlStr; +} + +void powerCtrlplugin::set_InPortCtrlStr( QString sValue ) +{ + if ( sValue.startsWith("0") ) + { + this->setProperty( QString("CtrlStr").toStdString().c_str(), "" ); + removeInPort( "I0" ); + } + else + { + this->setProperty( QString("CtrlStr").toStdString().c_str(), QVariant::Invalid ); + insertInPort( 0, CPort(this, "I0", E_PORTDATA_STRING) ); + setInPortShowName("I0",tr("测点")); + } + emit signalPortSizeChanged(); + + InPortCtrlStr = sValue; +} + + + + + + + + + + + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerCtrlplugin.h b/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerCtrlplugin.h new file mode 100644 index 00000000..7ebce883 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerCtrlplugin.h @@ -0,0 +1,35 @@ +#pragma once + +#include "CBlock.h" + +class powerCtrlplugin : public CBlock +{ + Q_OBJECT + Q_PLUGIN_METADATA( IID Block_iid ) // Q_PLUGIN_METADATA 宏用于描述插件元数据 + Q_INTERFACES( CBlock ) // Q_INTERFACES 宏用于告诉Qt该类实现的接口 + + IMPL_PROPERTY( QString, ActionName ) + + + Q_PROPERTY( QString ActionName READ get_ActionName WRITE set_ActionName USER true DESIGNABLE true ) + Q_PROPERTY( QString InPortCtrlStr READ get_InPortCtrlStr WRITE set_InPortCtrlStr USER true DESIGNABLE true ) + +public: + Q_INVOKABLE powerCtrlplugin(); + Q_INVOKABLE ~powerCtrlplugin(); + +public: + QString name() { return "powerOutputCtrl"; } + QString showName() { return QObject::tr("功率输出控制"); } + QString propertyShowName( QString sPropertyName ); + QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } + +private: + QString get_InPortCtrlStr(); + void set_InPortCtrlStr( QString sValue ); + +private: + QString InPortCtrlStr; +}; + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerOutputCtrlplugin.pro b/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerOutputCtrlplugin.pro new file mode 100644 index 00000000..36c1d773 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powerOutputCtrlplugin/powerOutputCtrlplugin.pro @@ -0,0 +1,39 @@ +TARGET = powerCtrlplugin +QT = core gui widgets xml sql +CONFIG += dll +TEMPLATE = lib +CONFIG += qt + +SOURCES += \ + powerCtrlplugin.cpp \ + +HEADERS += \ + powerCtrlplugin.h \ + +INCLUDEPATH += \ + ../../fbd_block \ + ../../fbd_tree \ + ../../fbd_property \ + +LIBS += \ + -lfbd_block \ + -lfbd_tree \ + +RESOURCES += \ + icon.qrc + +!include( ../../../../idl_files/idl_files.pri){ + error(the file idl_files.pri is not exist!!) +} + +!include( ../../../../common.pri ){ + error(the file common.pri is not exist!!) +} + +#fbd_plugins插件的统一规则 +FBD_PLUGINS_PRI=$$PWD/../fbd_plugins.pri +exists($$FBD_PLUGINS_PRI) { + include($$FBD_PLUGINS_PRI) +}else { + error("FATAL error: can not find fbd_plugins.pri") +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolgenplugin/powercontrolgenplugin.cpp b/product/src/tools/fbd_designer/fbd_plugins/powercontrolgenplugin/powercontrolgenplugin.cpp index 4893933c..5348cf5e 100644 --- a/product/src/tools/fbd_designer/fbd_plugins/powercontrolgenplugin/powercontrolgenplugin.cpp +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrolgenplugin/powercontrolgenplugin.cpp @@ -2,6 +2,18 @@ #define CN_MAX_UNIT_COUNT 50 //最大机组数量 +#define CN_WIDTH 360 // 图元宽度 +#define CN_HEIGHTSPACE 70 // 输入(输出、文字)上下之间的间隔 +#define CN_FIRSTHEIGHT (CN_HEIGHTSPACE-14)/2 // 第一个输入(输出、文字)与顶的距离 +#define CN_GENHEADINPUTNUM 4 // GEN顶框输入个数 +#define CN_GENHEADOUTPUTNUM 5 // GEN顶框输出个数 +#define CN_GENINPUTNUM 5 // GEN框输入个数 +#define CN_GENOUTPUTNUM 4 // GEN框输出个数 +#define CN_MAXGENHEADNUM (CN_GENHEADINPUTNUM>=CN_GENHEADOUTPUTNUM ? CN_GENHEADINPUTNUM : CN_GENHEADOUTPUTNUM) +#define CN_MAXGENNUM (CN_GENINPUTNUM>=CN_GENOUTPUTNUM ? CN_GENINPUTNUM : CN_GENOUTPUTNUM) +#define CN_GENHEADHEIGHT CN_MAXGENHEADNUM*CN_HEIGHTSPACE // GEN顶框的高度 +#define CN_GENHEIGHT CN_MAXGENNUM*CN_HEIGHTSPACE // GEN框的高度 + PowerControlGENPlugin::PowerControlGENPlugin(): CBlock() { m_nGENNum = 0; @@ -85,6 +97,117 @@ QString PowerControlGENPlugin::propertyShowName( QString sPropertyName ) return sPropertyName; } +QPointF PowerControlGENPlugin::getInputTextPos(const int nInputIndex, const int nInputTextWidth) +{ + Q_UNUSED(nInputTextWidth); + + int nY = getInputHeight(nInputIndex); + return QPointF(1,nY); +} + +QPointF PowerControlGENPlugin::getOutputTextPos(const int nOutputIndex, const int nOutputTextWidth) +{ + return QPointF(CN_WIDTH-nOutputTextWidth, getOutputHeight(nOutputIndex)); +} + +int PowerControlGENPlugin::getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getInputHeight(nIndex + 1); +} + +int PowerControlGENPlugin::getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getOutputHeight(nIndex + 1); +} + +int PowerControlGENPlugin::getFirstHeight() +{ + return CN_FIRSTHEIGHT; +} + +QString PowerControlGENPlugin::getOutputRealValueSep() +{ + return "\n"; +} + +QPointF PowerControlGENPlugin::getIconPos(const QSize &pixmapSize) +{ + int nX = (CN_WIDTH - pixmapSize.width()) / 2; + return QPointF(nX,5); +} + +QPolygonF PowerControlGENPlugin::getPolygon(const int nWidth, const int nHeight) +{ + // Set Polygon Top-Left: 0/0 + QPolygonF polygon; + polygon << QPointF(0, 0) << QPointF( nWidth, 0) + << QPointF(nWidth, nHeight) << QPointF(0, nHeight) + << QPointF(0, 0); + + const int nGENNum = this->property("UnitCnt").toInt(); + for ( int i=0; iproperty("UnitCnt").toInt(); + if ( nUnitCount == 0 ) + { + this->setProperty("UnitCnt",1); + } +} + +int PowerControlGENPlugin::getInputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < CN_GENHEADINPUTNUM ) + nRet += nIndex * CN_HEIGHTSPACE; + else + { + nRet += CN_GENHEADHEIGHT+ + (nIndex-CN_GENHEADINPUTNUM)/CN_GENINPUTNUM*CN_GENHEIGHT+ + (nIndex-CN_GENHEADINPUTNUM)%CN_GENINPUTNUM*CN_HEIGHTSPACE; + } + return nRet; +} + +int PowerControlGENPlugin::getOutputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < CN_GENHEADOUTPUTNUM ) + nRet += nIndex * CN_HEIGHTSPACE; + else + { + nRet += CN_GENHEADHEIGHT+ + (nIndex-CN_GENHEADOUTPUTNUM)/CN_GENOUTPUTNUM*CN_GENHEIGHT+ + (nIndex-CN_GENHEADOUTPUTNUM)%CN_GENOUTPUTNUM*CN_HEIGHTSPACE; + } + + return nRet; +} + void PowerControlGENPlugin::setGENNum( int nGENNum ) { if ( nGENNum < 0 ) @@ -255,30 +378,3 @@ void PowerControlGENPlugin::setCommRecovDelay( int nCommRecovDelay ) } m_nCommRecovDelay = nCommRecovDelay; } - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolgenplugin/powercontrolgenplugin.h b/product/src/tools/fbd_designer/fbd_plugins/powercontrolgenplugin/powercontrolgenplugin.h index 02a92b60..173c5043 100644 --- a/product/src/tools/fbd_designer/fbd_plugins/powercontrolgenplugin/powercontrolgenplugin.h +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrolgenplugin/powercontrolgenplugin.h @@ -19,6 +19,30 @@ public: QString propertyShowName( QString sPropertyName ); QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } + //< 获取图元输入端口文本的位置坐标,nInputTextWidth是文字边框的宽度 + QPointF getInputTextPos(const int nInputIndex,const int nInputTextWidth) override; + QPointF getOutputTextPos(const int nOutputIndex,const int nOutputTextWidth) override; + //< 获取输入端口高度 + int getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + int getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + // 第一个输入(输出、文字)与顶的距离 + int getFirstHeight() override; + //< 输出值显示分隔符 + QString getOutputRealValueSep() override; + + QPointF getIconPos(const QSize &pixmapSize) override; + //< 用于画图元外边框的折线 + QPolygonF getPolygon(const int nWidth,const int nHeight) override; + bool isCustomItemPos() override; + + void setDefaultIconSize() override; + //< 初始化后执行的操作,可以图元自定义一些特殊操作 + void afterInitialize() override; + +private: + int getInputHeight(const int nIndex); + int getOutputHeight(const int nIndex ); + public: int getGENNum() { return m_nGENNum; } void setGENNum( int nGENNum ); @@ -51,16 +75,3 @@ private: }; #endif // TEMPLATEPLUGIN_H - - - - - - - - - - - - - diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/icon.qrc b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/icon.qrc new file mode 100644 index 00000000..1671947a --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/icon.qrc @@ -0,0 +1,5 @@ + + + icon/powercontrollinear.png + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/icon/powercontrollinear.png b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/icon/powercontrollinear.png new file mode 100644 index 0000000000000000000000000000000000000000..61f527f9ca989b377faffa76329afa946be03516 GIT binary patch literal 563 zcmV-30?hr1P)5t9bg593J4V#DgY`FDj-w*rsl~9>cL= z^bX(iYzz48;9Pidi1;{O1o}XOfeQ_PgM|Zvrs#6wT%=^gi#*#ZgyU<_hso+ywvaPB6PqTR9_PaiO$4_&Zs;_t_C zUer0tWle=rTNice!`aG&_F3y1cxl}<+oi=Pd8nT!;^k9aR17c8$0;}k{||6@t!>CA zzak3;Kj`PVHc4To3va8Ttnm)Bk;I=iFun5Q;vLg=vWOZS459!4002ovPDHLkV1mjG B_{IPL literal 0 HcmV?d00001 diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.cpp b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.cpp new file mode 100644 index 00000000..e2ce38d3 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.cpp @@ -0,0 +1,266 @@ +#include "powercontrollinearplugin.h" + +#define CN_MAX_UNIT_COUNT 200 //最大机组数量 + +#define CN_WIDTH 360 // 图元宽度 +#define CN_HEIGHTSPACE 70 // 输入(输出、文字)上下之间的间隔 +#define CN_FIRSTHEIGHT (CN_HEIGHTSPACE-14)/2 // 第一个输入(输出、文字)与顶的距离 +#define CN_PCSLINEARHEADINPUTNUM 7 // PCSLinear顶框输入个数 +#define CN_PCSLINEARHEADOUTPUTNUM 3 // PCSLinear顶框输出个数 +#define CN_PCSLINEARINPUTNUM 5 // PCSLinear框输入个数 +#define CN_PCSLINEAROUTPUTNUM 4 // PCSLinear框输出个数 +#define CN_MAXPCSLINEARHEADNUM (CN_PCSLINEARHEADINPUTNUM>=CN_PCSLINEARHEADOUTPUTNUM ? CN_PCSLINEARHEADINPUTNUM : CN_PCSLINEARHEADOUTPUTNUM) +#define CN_MAXPCSLINEARNUM (CN_PCSLINEARINPUTNUM>=CN_PCSLINEAROUTPUTNUM ? CN_PCSLINEARINPUTNUM : CN_PCSLINEAROUTPUTNUM) +#define CN_PCSLINEARHEADHEIGHT CN_MAXPCSLINEARHEADNUM*CN_HEIGHTSPACE // PCSLinear顶框的高度 +#define CN_PCSLINEARHEIGHT CN_MAXPCSLINEARNUM*CN_HEIGHTSPACE // PCSLinear框的高度 + +PowerControlLinearPlugin::PowerControlLinearPlugin(): CBlock() +{ + m_nPCSNum = 0; + + + + setPortShowNameFunctionEnable( false ); + + addInPort( CPort(this, "TotalPowerTargetValue", E_PORTDATA_FLOAT) ); + setInPortShowName( "TotalPowerTargetValue", tr("AGC设定值") ); + addInPort( CPort(this, "Tolerance", E_PORTDATA_FLOAT) ); + setInPortShowName( "Tolerance", tr("误差允许") ); + + addInPort( CPort(this, "TotalRegulateEnable", E_PORTDATA_BOOL) ); + setInPortShowName( "TotalRegulateEnable", tr("总调节使能") ); + addInPort( CPort(this, "ULSoc", E_PORTDATA_FLOAT) ); + setInPortShowName( "ULSoc", tr("SOC上限") ); + addInPort( CPort(this, "LLSoc", E_PORTDATA_FLOAT) ); + setInPortShowName( "LLSoc", tr("SOC下限") ); + addInPort( CPort(this, "Step", E_PORTDATA_FLOAT) ); + setInPortShowName( "Step", tr("调节步进") ); + addInPort( CPort(this, "Interval", E_PORTDATA_FLOAT) ); + setInPortShowName( "Interval", tr("调节周期(s)") ); + + addOutPort( CPort(this, "TotalPower", E_PORTDATA_FLOAT)); + setOutPortShowName( "TotalPower", tr("总输出有功") ); + addOutPort( CPort(this, "StatusCode", E_PORTDATA_INT) ); + setOutPortShowName( "StatusCode", tr("状态码") ); + addOutPort( CPort(this, "ErrorCode", E_PORTDATA_INT) ); + setOutPortShowName( "ErrorCode", tr("错误码") ); + + this->setProperty( C_PROPERTY_SHOWNAME, showName() ); + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("UnitCnt")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + + + +} + +PowerControlLinearPlugin::~PowerControlLinearPlugin() +{ + +} + +QString PowerControlLinearPlugin::propertyShowName( QString sPropertyName ) +{ + if ( sPropertyName == "UnitCnt" ) + return tr("机组个数"); + return sPropertyName; +} + +QPointF PowerControlLinearPlugin::getInputTextPos(const int nInputIndex, const int nInputTextWidth) +{ + Q_UNUSED(nInputTextWidth); + + int nY = getInputHeight(nInputIndex); + return QPointF(1,nY); +} + +QPointF PowerControlLinearPlugin::getOutputTextPos(const int nOutputIndex, const int nOutputTextWidth) +{ + return QPointF( (CN_WIDTH*0.6) - nOutputTextWidth, getOutputHeight(nOutputIndex) ); +} + +int PowerControlLinearPlugin::getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getInputHeight(nIndex + 1); +} + +int PowerControlLinearPlugin::getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getOutputHeight(nIndex + 1); +} + +int PowerControlLinearPlugin::getFirstHeight() +{ + return CN_FIRSTHEIGHT; +} + +QString PowerControlLinearPlugin::getOutputRealValueSep() +{ + return "\n"; +} + +QPointF PowerControlLinearPlugin::getIconPos(const QSize &pixmapSize) +{ + int nX = (CN_WIDTH*0.6 - pixmapSize.width()) / 2; + return QPointF(nX,5); +} + +QPolygonF PowerControlLinearPlugin::getPolygon(const int nWidth, const int nHeight) +{ + // Set Polygon Top-Left: 0/0 + QPolygonF polygon; + polygon << QPointF(0, 0) << QPointF( nWidth, 0) + << QPointF(nWidth, nHeight) << QPointF(0, nHeight) + << QPointF(0, 0); + + const int nPCSLinearNum = this->property("UnitCnt").toInt(); + for ( int i=0; iproperty("UnitCnt").toInt(); + if ( nUnitCount == 0 ) + { + this->setProperty("UnitCnt",1); + } +} + +int PowerControlLinearPlugin::getInputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < CN_PCSLINEARHEADINPUTNUM ) + nRet += nIndex * CN_HEIGHTSPACE; + else + { + nRet += CN_PCSLINEARHEADHEIGHT+ + (nIndex-CN_PCSLINEARHEADINPUTNUM)/CN_PCSLINEARINPUTNUM*CN_PCSLINEARHEIGHT+ + (nIndex-CN_PCSLINEARHEADINPUTNUM)%CN_PCSLINEARINPUTNUM*CN_HEIGHTSPACE; + } + return nRet; +} + +int PowerControlLinearPlugin::getOutputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < CN_PCSLINEARHEADOUTPUTNUM ) + nRet += nIndex * CN_HEIGHTSPACE; + else + { + nRet += CN_PCSLINEARHEADHEIGHT+ + (nIndex-CN_PCSLINEARHEADOUTPUTNUM)/CN_PCSLINEAROUTPUTNUM*CN_PCSLINEARHEIGHT+ + (nIndex-CN_PCSLINEARHEADOUTPUTNUM)%CN_PCSLINEAROUTPUTNUM*CN_HEIGHTSPACE; + } + return nRet; +} + +void PowerControlLinearPlugin::setPCSNum( int nPCSNum ) +{ + if ( nPCSNum < 0 ) + { + emit signalErrorDisplay(tr("PCS个数不能小于0个!!!")); + return; + } + if ( nPCSNum > CN_MAX_UNIT_COUNT ) + { + emit signalErrorDisplay(tr("PCS个数不能大于200个!!!")); + return; + } + + QString sPortName = ""; + QString sPortDesc = ""; + for ( int i=nPCSNum+1; i<=m_nPCSNum; i++ ) + { + // 删除输入端口 + sPortName = QString("Unit %1 MaxDischargeP").arg(i); + removeInPort(sPortName); + sPortName = QString("Unit %1 MaxChargeP").arg(i); + removeInPort(sPortName); + sPortName = QString("Unit %1 Actual value of active power").arg(i); + removeInPort(sPortName); + sPortName = QString("Unit %1 SOC").arg(i); + removeInPort(sPortName); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + removeInPort(sPortName); + + // 删除输出端口 + sPortName = QString("Unit %1 DistributionPower").arg(i); + removeOutPort(sPortName); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + removeOutPort(sPortName); + sPortName = QString("Unit %1 StatusCode").arg(i); + removeOutPort(sPortName); + sPortName = QString("Unit %1 ErrorCode").arg(i); + removeOutPort(sPortName); + + // 删除动态属性 + + } + for ( int i=m_nPCSNum+1; i<=nPCSNum; i++ ) + { + // 增加输入端口 + sPortName = QString("Unit %1 MaxDischargeP").arg(i); + sPortDesc = QString(tr("机组%1最大放电功率")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 MaxChargeP").arg(i); + sPortDesc = QString(tr("机组%1最大充电功率")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 Actual value of active power").arg(i); + sPortDesc = QString(tr("机组%1有功实际值")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 SOC").arg(i); + sPortDesc = QString(tr("机组%1 SOC")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + sPortDesc = QString(tr("机组%1调节使能")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_BOOL) ); + setInPortShowName( sPortName, sPortDesc ); + + // 增加输出端口 + sPortName = QString("Unit %1 DistributionPower").arg(i); + sPortDesc = QString(tr("机组%1分配有功")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + sPortDesc = QString(tr("机组%1调节使能")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_BOOL) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 StatusCode").arg(i); + sPortDesc = QString(tr("机组%1状态码")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_INT) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 ErrorCode").arg(i); + sPortDesc = QString(tr("机组%1错误码")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_INT) ); + setOutPortShowName( sPortName, sPortDesc ); + + // 增加动态属性 + + } + m_nPCSNum = nPCSNum; + emit signalPortSizeChanged(); +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.h b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.h new file mode 100644 index 00000000..49328384 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.h @@ -0,0 +1,57 @@ +#ifndef TEMPLATEPLUGIN_H +#define TEMPLATEPLUGIN_H + +#include "CBlock.h" + +class PowerControlLinearPlugin : public CBlock +{ + Q_OBJECT + Q_PLUGIN_METADATA( IID Block_iid ) // Q_PLUGIN_METADATA 宏用于描述插件元数据 + Q_INTERFACES( CBlock ) // Q_INTERFACES 宏用于告诉Qt该类实现的接口 + +public: + Q_INVOKABLE PowerControlLinearPlugin(); + Q_INVOKABLE ~PowerControlLinearPlugin(); + +public: + QString name() { return "powercontrollinear"; } + QString showName() { return QObject::tr("储能机组线性有功分配器"); } + QString propertyShowName( QString sPropertyName ); + QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } + + //< 获取图元输入端口文本的位置坐标,nInputTextWidth是文字边框的宽度 + QPointF getInputTextPos(const int nInputIndex,const int nInputTextWidth) override; + QPointF getOutputTextPos(const int nOutputIndex,const int nOutputTextWidth) override; + //< 获取输入端口高度 + int getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + int getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + // 第一个输入(输出、文字)与顶的距离 + int getFirstHeight() override; + //< 输出值显示分隔符 + QString getOutputRealValueSep() override; + + QPointF getIconPos(const QSize &pixmapSize) override; + //< 用于画图元外边框的折线 + QPolygonF getPolygon(const int nWidth,const int nHeight) override; + bool isCustomItemPos() override; + + void setDefaultIconSize() override; + //< 初始化后执行的操作,可以图元自定义一些特殊操作 + void afterInitialize() override; + +private: + int getInputHeight(const int nIndex); + int getOutputHeight(const int nIndex ); + +public: + int getPCSNum () { return m_nPCSNum; } + void setPCSNum ( int nPCSNum ); + + +private: + int m_nPCSNum; // PCS个数 机组个数 + Q_PROPERTY( int UnitCnt READ getPCSNum WRITE setPCSNum USER true DESIGNABLE true ) + +}; + +#endif // TEMPLATEPLUGIN_H diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.pro b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.pro new file mode 100644 index 00000000..0c54bc17 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrollinearplugin/powercontrollinearplugin.pro @@ -0,0 +1,33 @@ +TARGET = powercontrollinearplugin +QT = core gui widgets +CONFIG += dll +TEMPLATE = lib + +SOURCES += \ + powercontrollinearplugin.cpp + +HEADERS += \ + powercontrollinearplugin.h + +INCLUDEPATH += \ + ../.. \ + ../../fbd_block \ + ../../include + +LIBS += \ + -lfbd_block + +RESOURCES += \ + icon.qrc + +!include( ../../../../common.pri ){ + error(the file common.pri is not exist!!) +} + +#fbd_plugins插件的统一规则 +FBD_PLUGINS_PRI=$$PWD/../fbd_plugins.pri +exists($$FBD_PLUGINS_PRI) { + include($$FBD_PLUGINS_PRI) +}else { + error("FATAL error: can not find fbd_plugins.pri") +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolpcsplugin/icon/powercontrolpcs.png b/product/src/tools/fbd_designer/fbd_plugins/powercontrolpcsplugin/icon/powercontrolpcs.png index 1b950e11cdd18f8b494feebebe51f4fb6fc69a5c..61f527f9ca989b377faffa76329afa946be03516 100644 GIT binary patch delta 530 zcmV+t0`2{&1hWK?EPoRK01FcV0GgZ_00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj6$Vo&&RCodHm)}vsKoG{iQyzSz1MyKug>;}DU2o)GA04fkFAXETW03zxm zu>$ihaDI0=Bn&}RB+fY5nIo6IKfl|(+uI*rsl~9>cL=^bX(iYzz48;9Pidi1;{O1o}XOfeQ_PgM|Zvrs#6wT%8apTT(YgH`%k!4 z_tN<(xX0qs3M=A1b=Zp9y{m9v@2N^SVZXImZ_^$Rn14H4OPU#~TyBjc+Zf7*)(P(Y z1TE@qo&!%GFrg1!ux{e-$8lcNIm%^Cg;HA=b?U>}%7pe=>l%1z-89>!#V2{FpC{tw zQ(aUHFU`j(I0gR?aCoh4$R@uc3kE;v=eagXVWtajtD&s%4zrQOpEfYP^5fzi({{3m U8XOFw01E&B07*qoM6N<$f=DX%a{vGU delta 520 zcmV+j0{8v11gQj&EPoOJ01FZU(%pXi0005oNklIFaO^l4#)6)%r(q@x_iBT;949#;RR)6Y7sYn~-b#!|{n3|NR z!b|VFo_`7N{q`ipG0w#QhKnYVh~xnBNMr@ER8=4K=>r%8$SA5*bw-_|E@u_b;<0D9MVAHpfv+pnj{t4}yz;x`bIRSvcDgG7_W)Luo2QrD zlSdpoSJidX_Nr)hS2mO%zf(Wr>ag48SnBqW4>qnuA-c7 zTJ!el^^RUIM5LmPqljMsyaBkSv9hCY4TjVvH>c>@Y=}s446zMM(vZ6I5&fKb^5C*eZHw-w_4BH+E3UwD5soO3nb`E)uHrzhss zGbv(@9*;0XnTp&w*N-mrhWbK(l3$n}FY=CN_PCSHEADOUTPUTNUM ? CN_PCSHEADINPUTNUM : CN_PCSHEADOUTPUTNUM) +#define CN_MAXPCSNUM (CN_PCSINPUTNUM>=CN_PCSOUTPUTNUM ? CN_PCSINPUTNUM : CN_PCSOUTPUTNUM) +#define CN_PCSHEADHEIGHT CN_MAXPCSHEADNUM*CN_HEIGHTSPACE // PCS顶框的高度 +#define CN_PCSHEIGHT CN_MAXPCSNUM*CN_HEIGHTSPACE // PCS框的高度 +#define CN_PCSOUTPUTNUM 4 // PCS框输出个数 +#define CN_FIRSTHEIGHT (CN_HEIGHTSPACE-14)/2 // 第一个输入(输出、文字)与顶的距离 +#define CN_WIDTH 360 // 图元宽度 + PowerControlPCSPlugin::PowerControlPCSPlugin(): CBlock() { m_nPCSNum = 0; @@ -114,6 +128,119 @@ QString PowerControlPCSPlugin::propertyShowName( QString sPropertyName ) return sPropertyName; } +int PowerControlPCSPlugin::getInputHeight(const int nIndex) +{ + int nY = CN_FIRSTHEIGHT; + if ( nIndex < CN_PCSHEADINPUTNUM ) + { + nY += nIndex * CN_HEIGHTSPACE; + } + else + { + nY += CN_PCSHEADHEIGHT+ + (nIndex-CN_PCSHEADINPUTNUM)/CN_PCSINPUTNUM*CN_PCSHEIGHT+ + (nIndex-CN_PCSHEADINPUTNUM)%CN_PCSINPUTNUM*CN_HEIGHTSPACE; + } + + return nY; +} + +int PowerControlPCSPlugin::getOutputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < CN_PCSHEADOUTPUTNUM ) + nRet += nIndex * CN_HEIGHTSPACE; + else + { + nRet += CN_PCSHEADHEIGHT+ + (nIndex-CN_PCSHEADOUTPUTNUM)/CN_PCSOUTPUTNUM*CN_PCSHEIGHT+ + (nIndex-CN_PCSHEADOUTPUTNUM)%CN_PCSOUTPUTNUM*CN_HEIGHTSPACE; + } + return nRet; +} + +QPointF PowerControlPCSPlugin::getInputTextPos(const int nInputIndex, const int nInputTextWidth) +{ + Q_UNUSED(nInputTextWidth); + + int nY = getInputHeight(nInputIndex); + return QPointF(1,nY); +} + +QPointF PowerControlPCSPlugin::getOutputTextPos(const int nOutputIndex, const int nOutputTextWidth) +{ + return QPointF(CN_WIDTH-nOutputTextWidth, getOutputHeight(nOutputIndex)); +} + +QPointF PowerControlPCSPlugin::getIconPos(const QSize &pixmapSize) +{ + int nX = (CN_WIDTH - pixmapSize.width()) / 2; + return QPointF(nX,5); +} + +int PowerControlPCSPlugin::getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getInputHeight(nIndex + 1); +} + +int PowerControlPCSPlugin::getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getOutputHeight(nIndex + 1); +} + +int PowerControlPCSPlugin::getFirstHeight() +{ + return CN_FIRSTHEIGHT; +} + +void PowerControlPCSPlugin::setDefaultIconSize() +{ + setIconSize( CN_WIDTH, CN_MAXPCSHEADNUM*CN_HEIGHTSPACE ); +} + +bool PowerControlPCSPlugin::isCustomItemPos() +{ + return true; +} + +void PowerControlPCSPlugin::afterInitialize() +{ + int nUnitCount = this->property("UnitCnt").toInt(); + if ( nUnitCount == 0 ) + { + this->setProperty("UnitCnt",1); + } +} + +QString PowerControlPCSPlugin::getOutputRealValueSep() +{ + return "\n"; +} + +QPolygonF PowerControlPCSPlugin::getPolygon(const int nWidth, const int nHeight) +{ + // Set Polygon Top-Left: 0/0 + QPolygonF polygon; + polygon << QPointF(0, 0) << QPointF( nWidth, 0) + << QPointF(nWidth, nHeight) << QPointF(0, nHeight) + << QPointF(0, 0); + + const int nPCSNum = this->property("UnitCnt").toInt(); + for ( int i=0; i < nPCSNum; i++ ) + { + polygon << QPointF(0, CN_PCSHEADHEIGHT+i*CN_PCSHEIGHT+2) << QPointF(CN_WIDTH, CN_PCSHEADHEIGHT+i*CN_PCSHEIGHT+2) + << QPointF(0, CN_PCSHEADHEIGHT+i*CN_PCSHEIGHT+2); + } + + return polygon; +} + void PowerControlPCSPlugin::setPCSNum( int nPCSNum ) { if ( nPCSNum < 0 ) @@ -321,29 +448,3 @@ void PowerControlPCSPlugin::setCommRecovDelay( int nCommRecovDelay ) // m_fMinSoc = fMinSoc; //} - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolpcsplugin/powercontrolpcsplugin.h b/product/src/tools/fbd_designer/fbd_plugins/powercontrolpcsplugin/powercontrolpcsplugin.h index b5e9f25d..8bf045fd 100644 --- a/product/src/tools/fbd_designer/fbd_plugins/powercontrolpcsplugin/powercontrolpcsplugin.h +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrolpcsplugin/powercontrolpcsplugin.h @@ -19,6 +19,30 @@ public: QString propertyShowName( QString sPropertyName ); QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } + //< 获取图元输入端口文本的位置坐标,nInputTextWidth是文字边框的宽度 + QPointF getInputTextPos(const int nInputIndex,const int nInputTextWidth) override; + QPointF getOutputTextPos(const int nOutputIndex,const int nOutputTextWidth) override; + //< 获取输入端口高度 + int getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + int getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + // 第一个输入(输出、文字)与顶的距离 + int getFirstHeight() override; + //< 输出值显示分隔符 + QString getOutputRealValueSep() override; + + QPointF getIconPos(const QSize &pixmapSize) override; + //< 用于画图元外边框的折线 + QPolygonF getPolygon(const int nWidth,const int nHeight) override; + bool isCustomItemPos() override; + + void setDefaultIconSize() override; + //< 初始化后执行的操作,可以图元自定义一些特殊操作 + void afterInitialize() override; + +private: + int getInputHeight(const int nIndex); + int getOutputHeight(const int nIndex ); + public: int getPCSNum () { return m_nPCSNum; } void setPCSNum ( int nPCSNum ); @@ -67,26 +91,3 @@ private: }; #endif // TEMPLATEPLUGIN_H - - - - - - - - - - - - - - - - - - - - - - - diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/icon.qrc b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/icon.qrc new file mode 100644 index 00000000..5baba2ff --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/icon.qrc @@ -0,0 +1,5 @@ + + + icon/powercontrolreactive.png + + diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/icon/powercontrolreactive.png b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/icon/powercontrolreactive.png new file mode 100644 index 0000000000000000000000000000000000000000..61f527f9ca989b377faffa76329afa946be03516 GIT binary patch literal 563 zcmV-30?hr1P)5t9bg593J4V#DgY`FDj-w*rsl~9>cL= z^bX(iYzz48;9Pidi1;{O1o}XOfeQ_PgM|Zvrs#6wT%=^gi#*#ZgyU<_hso+ywvaPB6PqTR9_PaiO$4_&Zs;_t_C zUer0tWle=rTNice!`aG&_F3y1cxl}<+oi=Pd8nT!;^k9aR17c8$0;}k{||6@t!>CA zzak3;Kj`PVHc4To3va8Ttnm)Bk;I=iFun5Q;vLg=vWOZS459!4002ovPDHLkV1mjG B_{IPL literal 0 HcmV?d00001 diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.cpp b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.cpp new file mode 100644 index 00000000..b8247925 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.cpp @@ -0,0 +1,401 @@ +#include "powercontrolreactiveplugin.h" + +#define CN_MAX_UNIT_COUNT 300 //最大机组数量 + +#define CN_WIDTH 230 // 图元宽度 +#define CN_HEIGHTSPACE 50 // 输入(输出、文字)上下之间的间隔 +#define CN_FIRSTHEIGHT (CN_HEIGHTSPACE-14)/2 // 第一个输入(输出、文字)与顶的距离 +#define CN_PCSREACTIVEHEADINPUTNUM 4 // PCSREACTIVE顶框输入个数 +#define CN_PCSREACTIVEHEADOUTPUTNUM 3 // PCSREACTIVE顶框输出个数 +#define CN_PCSREACTIVEINPUTNUM 4 // PCSREACTIVE框输入个数 +#define CN_PCSREACTIVEOUTPUTNUM 4 // PCSREACTIVE框输出个数 +#define CN_MAXPCSREACTIVEHEADNUM (m_nTopInPortNum>=m_nTopOutPortNum ? m_nTopInPortNum : m_nTopOutPortNum) +#define CN_MAXPCSREACTIVENUM (CN_PCSREACTIVEINPUTNUM>=CN_PCSREACTIVEOUTPUTNUM ? CN_PCSREACTIVEINPUTNUM : CN_PCSREACTIVEOUTPUTNUM) +#define CN_PCSREACTIVEHEADHEIGHT CN_MAXPCSREACTIVEHEADNUM*CN_HEIGHTSPACE // PCSREACTIVE顶框的高度 +#define CN_PCSREACTIVEHEIGHT CN_MAXPCSREACTIVENUM*CN_HEIGHTSPACE // PCSREACTIVE框的高度 + +PowerControlReactivePlugin::PowerControlReactivePlugin(): CBlock() +{ + m_nPCSNum = 0; + m_nCustomPortSpace = CN_HEIGHTSPACE; + m_fCommPrecision = 0.01f; + m_fRegulatePrecision = 50; + m_fMinAllocP = 50; + m_nRegulateCycle = 0; + m_nWaitRespTimeout = 3000; + + initPropertyMAP(); + + setPortShowNameFunctionEnable( false ); + + addInPort( CPort(this, "TotalRegulateEnable", E_PORTDATA_BOOL) ); + setInPortShowName( "TotalRegulateEnable", tr("总调节使能") ); + + addInPort( CPort(this, "TotalPowerTargetValue", E_PORTDATA_FLOAT) ); + setInPortShowName( "TotalPowerTargetValue", tr("AVC设定值") ); + + addInPort( CPort(this, "TotalDeadband", E_PORTDATA_FLOAT) ); + setInPortShowName( "TotalDeadband", tr("调节死区") ); + addInPort( CPort(this, "Step", E_PORTDATA_FLOAT) ); + setInPortShowName( "Step", tr("最大调节步进") ); + addInPort( CPort(this, "Interval", E_PORTDATA_FLOAT) ); + setInPortShowName( "Interval", tr("最小调节周期(ms)") ); + m_nTopInPortNum = getInPortSize(); + + addOutPort( CPort(this, "TotalSetP", E_PORTDATA_FLOAT)); + setOutPortShowName( "TotalSetP", tr("总分配无功") ); + addOutPort(CPort(this, "TotalTargetP", E_PORTDATA_FLOAT)); + setOutPortShowName("TotalTargetP", tr("总目标无功")); + addOutPort( CPort(this, "TotalRealP", E_PORTDATA_FLOAT)); + setOutPortShowName( "TotalRealP", tr("总实时无功") ); + addOutPort( CPort(this, "TotalUpMarginPower", E_PORTDATA_FLOAT) ); + setOutPortShowName( "TotalUpMarginPower", tr("总可增无功") ); + addOutPort( CPort(this, "TotalDownMarginPower", E_PORTDATA_FLOAT) ); + setOutPortShowName( "TotalDownMarginPower", tr("总可减无功") ); + addOutPort(CPort(this, "TotalNonRegulatePower", E_PORTDATA_FLOAT)); + setOutPortShowName("TotalNonRegulatePower", tr("总不可调功率")); + addOutPort( CPort(this, "StatusCode", E_PORTDATA_INT) ); + setOutPortShowName( "StatusCode", tr("状态码") ); + addOutPort( CPort(this, "ErrorCode", E_PORTDATA_INT) ); + setOutPortShowName( "ErrorCode", tr("错误码") ); + m_nTopOutPortNum = getOutPortSize(); + + + this->setProperty( C_PROPERTY_SHOWNAME, showName() ); + //< 端口间隔 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("PortSpace")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + //< 机组数量 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("UnitCnt")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + + //< 功率分配算法 + QStringList listTmp; + listTmp<setProperty( (C_PREFIX_VALUEEDITTYPE+QString("AllocALG")).toStdString().c_str(), E_VALUEEDIT_COMBOBOX ); + this->setProperty( (C_PREFIX_COMBOBOXITEM+QString("AllocALG")).toStdString().c_str(), listTmp); + AllocALG = listTmp.at(0); + + //< 反馈超时时间 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("WaitRespTimeout")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + //< 稳定时定时分配间隔 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("RegulateCycle")).toStdString().c_str(), E_VALUEEDIT_SPINBOX ); + + //< 机组参数 + //< 最小分配功率 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("MinAllocP")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + //< 通讯精度 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("CommPrecision")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + //< 调节精度 + this->setProperty( (C_PREFIX_VALUEEDITTYPE+QString("RegulatePrecision")).toStdString().c_str(), E_VALUEEDIT_DOUBLESPINBOX ); + + +} + +PowerControlReactivePlugin::~PowerControlReactivePlugin() +{ + +} + +void PowerControlReactivePlugin::initPropertyMAP() +{ + m_mapProperty["UnitCnt"] = tr("机组个数"); + m_mapProperty["PortSpace"] = tr("端口间隔"); + m_mapProperty["AllocALG"] = tr("功率分配算法"); + m_mapProperty["CommPrecision"] = tr("通讯精度"); + m_mapProperty["RegulatePrecision"] = tr("调节精度"); + m_mapProperty["WaitRespTimeout"] = tr("调节反馈超时时间(单位:ms)"); + m_mapProperty["RegulateCycle"] = tr("稳定时调节周期(单位:s)"); + m_mapProperty["MinAllocP"] = tr("最小分配功率"); +} + +QString PowerControlReactivePlugin::propertyShowName( QString sPropertyName ) +{ + auto iter = m_mapProperty.find(sPropertyName); + if(iter != m_mapProperty.end()) + { + return iter.value(); + } + + return sPropertyName; +} + +QPointF PowerControlReactivePlugin::getInputTextPos(const int nInputIndex, const int nInputTextWidth) +{ + Q_UNUSED(nInputTextWidth); + + int nY = getInputHeight(nInputIndex); + return QPointF(1,nY); +} + +QPointF PowerControlReactivePlugin::getOutputTextPos(const int nOutputIndex, const int nOutputTextWidth) +{ + return QPointF( CN_WIDTH - nOutputTextWidth, getOutputHeight(nOutputIndex) ); +} + +int PowerControlReactivePlugin::getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getInputHeight(nIndex + 1); +} + +int PowerControlReactivePlugin::getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) +{ + Q_UNUSED(nPortHeight); + Q_UNUSED(nPortSize); + + return getOutputHeight(nIndex + 1); +} + +int PowerControlReactivePlugin::getFirstHeight() +{ + return CN_FIRSTHEIGHT; +} + +QString PowerControlReactivePlugin::getOutputRealValueSep() +{ + return "\n"; +} + +QPointF PowerControlReactivePlugin::getIconPos(const QSize &pixmapSize) +{ + int nX = (CN_WIDTH - pixmapSize.width()) / 2; + return QPointF(nX,5); +} + +QPolygonF PowerControlReactivePlugin::getPolygon(const int nWidth, const int nHeight) +{ + // Set Polygon Top-Left: 0/0 + QPolygonF polygon; + polygon << QPointF(0, 0) << QPointF( nWidth, 0) + << QPointF(nWidth, nHeight) << QPointF(0, nHeight) + << QPointF(0, 0); + + const int nPCSLinearNum = this->property("UnitCnt").toInt(); + for ( int i=0; iproperty("UnitCnt").toInt(); + if ( nUnitCount == 0 ) + { + this->setProperty("UnitCnt",1); + } +} + +int PowerControlReactivePlugin::getInputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < m_nTopInPortNum ) + nRet += nIndex * m_nCustomPortSpace; + else + { + nRet += CN_PCSREACTIVEHEADHEIGHT+ + (nIndex-m_nTopInPortNum)/CN_PCSREACTIVEINPUTNUM*CN_PCSREACTIVEHEIGHT+ + (nIndex-m_nTopInPortNum)%CN_PCSREACTIVEINPUTNUM*m_nCustomPortSpace; + } + return nRet; +} + +int PowerControlReactivePlugin::getOutputHeight(const int nIndex) +{ + int nRet = CN_FIRSTHEIGHT; + if ( nIndex < m_nTopOutPortNum ) + nRet += nIndex * m_nCustomPortSpace; + else + { + nRet += CN_PCSREACTIVEHEADHEIGHT+ + (nIndex-m_nTopOutPortNum)/CN_PCSREACTIVEOUTPUTNUM*CN_PCSREACTIVEHEIGHT+ + (nIndex-m_nTopOutPortNum)%CN_PCSREACTIVEOUTPUTNUM*m_nCustomPortSpace; + } + return nRet; +} + + +void PowerControlReactivePlugin::setPCSNum( int nPCSNum ) +{ + if ( nPCSNum < 0 ) + { + emit signalErrorDisplay(tr("PCS个数不能小于0个!!!")); + return; + } + if ( nPCSNum > CN_MAX_UNIT_COUNT ) + { + emit signalErrorDisplay(tr("PCS个数不能大于200个!!!")); + return; + } + + QString sPortName = ""; + QString sPortDesc = ""; + for ( int i=nPCSNum+1; i<=m_nPCSNum; i++ ) + { + // 删除输入端口 + sPortName = QString("Unit %1 Set value of reactive power").arg(i); + removeInPort(sPortName); + + sPortName = QString("Unit %1 Actual value of reactive power").arg(i); + removeInPort(sPortName); + + sPortName = QString("Unit %1 UpperLimitP").arg(i); + removeInPort(sPortName); + sPortName = QString("Unit %1 LowerLimitP").arg(i); + removeInPort(sPortName); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + removeInPort(sPortName); + + // 删除输出端口 + sPortName = QString("Unit %1 DistributionPower").arg(i); + removeOutPort(sPortName); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + removeOutPort(sPortName); + sPortName = QString("Unit %1 StatusCode").arg(i); + removeOutPort(sPortName); + sPortName = QString("Unit %1 ErrorCode").arg(i); + removeOutPort(sPortName); + + // 删除动态属性 + + } + for ( int i=m_nPCSNum+1; i<=nPCSNum; i++ ) + { + // 增加输入端口 + sPortName = QString("Unit %1 Set value of reactive power").arg(i); + sPortDesc = QString(tr("机组%1无功设定值")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + + sPortName = QString("Unit %1 Actual value of reactive power").arg(i); + sPortDesc = QString(tr("机组%1无功实际值")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + + sPortName = QString("Unit %1 UpperLimitP").arg(i); + sPortDesc = QString(tr("机组%1无功功率可调上限")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + + sPortName = QString("Unit %1 LowerLimitP").arg(i); + sPortDesc = QString(tr("机组%1无功功率可调下限")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setInPortShowName( sPortName, sPortDesc ); + + + sPortName = QString("Unit %1 RegulateEnable").arg(i); + sPortDesc = QString(tr("机组%1调节使能")).arg(i); + addInPort( CPort(this, sPortName, E_PORTDATA_BOOL) ); + setInPortShowName( sPortName, sPortDesc ); + + // 增加输出端口 + sPortName = QString("Unit %1 DistributionPower").arg(i); + sPortDesc = QString(tr("机组%1分配无功")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_FLOAT) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 RegulateEnable").arg(i); + sPortDesc = QString(tr("机组%1调节使能")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_BOOL) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 StatusCode").arg(i); + sPortDesc = QString(tr("机组%1状态码")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_INT) ); + setOutPortShowName( sPortName, sPortDesc ); + sPortName = QString("Unit %1 ErrorCode").arg(i); + sPortDesc = QString(tr("机组%1错误码")).arg(i); + addOutPort( CPort(this, sPortName, E_PORTDATA_INT) ); + setOutPortShowName( sPortName, sPortDesc ); + + // 增加动态属性 + + } + m_nPCSNum = nPCSNum; + emit signalPortSizeChanged(); +} +void PowerControlReactivePlugin::setSpace(int nValue) +{ + if (nValue > 100) + { + emit signalErrorDisplay(tr("端口间隔不能大于100")); + return; + } + + if(nValue < 20) + { + emit signalErrorDisplay(tr("端口间隔不能小于20")); + return; + } + + m_nCustomPortSpace = nValue; + emit signalPortSizeChanged(); +} + +void PowerControlReactivePlugin::setWaitRespTimeout(int nWaitRespTimeout) +{ + if(nWaitRespTimeout <= 0) + { + emit signalErrorDisplay(tr("【调节反馈超时时间】值错误,合法值:大于0")); + return; + } + + m_nWaitRespTimeout = nWaitRespTimeout; +} + +void PowerControlReactivePlugin::setRegulateCycle(int nRegulateCycle) +{ + if(nRegulateCycle < 0) + { + emit signalErrorDisplay(tr("【稳定时调节周期】值错误,合法值:大于等于0")); + return; + } + + m_nRegulateCycle = nRegulateCycle; +} + +void PowerControlReactivePlugin::setMinAllocP(float fMinAllocP) +{ + if(fMinAllocP <= 0) + { + emit signalErrorDisplay(tr("【最小分配功率】值错误,合法值:大于0")); + return; + } + + m_fMinAllocP = fMinAllocP; +} + +void PowerControlReactivePlugin::setCommPrecision(float fCommPrecision) +{ + if(fCommPrecision < 0) + { + emit signalErrorDisplay(tr("【通讯精度】值错误,合法值:大于0")); + return; + } + + m_fCommPrecision = fCommPrecision; +} + +void PowerControlReactivePlugin::setRegulatePrecision(float fRegulatePrecision) +{ + if(fRegulatePrecision < 0) + { + emit signalErrorDisplay(tr("【调节精度】值错误,合法值:大于0")); + return; + } + + m_fRegulatePrecision = fRegulatePrecision; +} + diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.h b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.h new file mode 100644 index 00000000..e60e33a0 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.h @@ -0,0 +1,98 @@ +#ifndef TEMPLATEPLUGIN_H +#define TEMPLATEPLUGIN_H + +#include "CBlock.h" + +class PowerControlReactivePlugin : public CBlock +{ + Q_OBJECT + Q_PLUGIN_METADATA( IID Block_iid ) // Q_PLUGIN_METADATA 宏用于描述插件元数据 + Q_INTERFACES( CBlock ) // Q_INTERFACES 宏用于告诉Qt该类实现的接口 + +public: + Q_INVOKABLE PowerControlReactivePlugin(); + Q_INVOKABLE ~PowerControlReactivePlugin(); + +public: + QString name() { return "powercontrolreactive"; } + QString showName() { return QObject::tr("储能无功分配器"); } + QString propertyShowName( QString sPropertyName ); + QIcon getIcon() { return QIcon(":/icon/"+name()+".png"); } + + //< 获取图元输入端口文本的位置坐标,nInputTextWidth是文字边框的宽度 + QPointF getInputTextPos(const int nInputIndex,const int nInputTextWidth) override; + QPointF getOutputTextPos(const int nOutputIndex,const int nOutputTextWidth) override; + //< 获取输入端口高度 + int getInputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + int getOutputHeight(const int nIndex, const int nPortSize, const int nPortHeight) override; + // 第一个输入(输出、文字)与顶的距离 + int getFirstHeight() override; + //< 输出值显示分隔符 + QString getOutputRealValueSep() override; + + QPointF getIconPos(const QSize &pixmapSize) override; + //< 用于画图元外边框的折线 + QPolygonF getPolygon(const int nWidth,const int nHeight) override; + bool isCustomItemPos() override; + + void setDefaultIconSize() override; + //< 初始化后执行的操作,可以图元自定义一些特殊操作 + void afterInitialize() override; + +private: + int getInputHeight(const int nIndex); + int getOutputHeight(const int nIndex ); + void initPropertyMAP(); + +public: + int getPCSNum () { return m_nPCSNum; } + void setPCSNum ( int nPCSNum ); + int getSpace() { return m_nCustomPortSpace; } + void setSpace( int nValue ); + + void setWaitRespTimeout(int nWaitRespTimeout); + int getWaitRespTimeout() {return m_nWaitRespTimeout;} + void setRegulateCycle(int nRegulateCycle); + int getRegulateCycle() {return m_nRegulateCycle;} + + void setMinAllocP(float fMinAllocP); + float getMinAllocP() {return m_fMinAllocP;} + + void setCommPrecision(float fCommPrecision); + float getCommPrecision() {return m_fCommPrecision;} + void setRegulatePrecision(float fRegulatePrecision); + float getRegulatePrecision() {return m_fRegulatePrecision;} + +private: + QMap m_mapProperty; + int m_nTopInPortNum; //< 顶框中输入端口个数 + int m_nTopOutPortNum; //< 顶框中输出端口个数 + + int m_nCustomPortSpace; + Q_PROPERTY(int PortSpace READ getSpace WRITE setSpace USER true DESIGNABLE true) + + int m_nPCSNum; // PCS个数 机组个数 + Q_PROPERTY( int UnitCnt READ getPCSNum WRITE setPCSNum USER true DESIGNABLE true ) + + IMPL_PROPERTY( QString, AllocALG ) // 功率分配算法 allocation algorithm + Q_PROPERTY( QString AllocALG READ get_AllocALG WRITE set_AllocALG USER true DESIGNABLE true ) + + int m_nWaitRespTimeout; //< 等待调节反馈超时时间 + Q_PROPERTY( int WaitRespTimeout READ getWaitRespTimeout WRITE setWaitRespTimeout USER true DESIGNABLE true ) + + int m_nRegulateCycle; //< 稳定时定时调节周期 + Q_PROPERTY( int RegulateCycle READ getRegulateCycle WRITE setRegulateCycle USER true DESIGNABLE true ) + + float m_fMinAllocP; //< 最小分配功率 + Q_PROPERTY( float MinAllocP READ getMinAllocP WRITE setMinAllocP USER true DESIGNABLE true ) + + //< 作用:1、若读回来的机组功率设定值与下发的目标值差值的绝对值小于该值,则认为通讯成功。2、下发功率是此值的倍数 + float m_fCommPrecision; + Q_PROPERTY( float CommPrecision READ getCommPrecision WRITE setCommPrecision USER true DESIGNABLE true ) + + //< 作用:若机组的功率实际值与设定值差值的绝对值小于该值,则认为成功。 + float m_fRegulatePrecision; + Q_PROPERTY( float RegulatePrecision READ getRegulatePrecision WRITE setRegulatePrecision USER true DESIGNABLE true ) +}; + +#endif // TEMPLATEPLUGIN_H diff --git a/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.pro b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.pro new file mode 100644 index 00000000..f34a68b3 --- /dev/null +++ b/product/src/tools/fbd_designer/fbd_plugins/powercontrolreactiveplugin/powercontrolreactiveplugin.pro @@ -0,0 +1,33 @@ +TARGET = powercontrolreactiveplugin +QT = core gui widgets +CONFIG += dll +TEMPLATE = lib + +SOURCES += \ + powercontrolreactiveplugin.cpp + +HEADERS += \ + powercontrolreactiveplugin.h + +INCLUDEPATH += \ + ../.. \ + ../../fbd_block \ + ../../include + +LIBS += \ + -lfbd_block + +RESOURCES += \ + icon.qrc + +!include( ../../../../common.pri ){ + error(the file common.pri is not exist!!) +} + +#fbd_plugins插件的统一规则 +FBD_PLUGINS_PRI=$$PWD/../fbd_plugins.pri +exists($$FBD_PLUGINS_PRI) { + include($$FBD_PLUGINS_PRI) +}else { + error("FATAL error: can not find fbd_plugins.pri") +} diff --git a/product/src/tools/fbd_designer/fbd_plugins/sendsmsplugin/icon/sendsms.png b/product/src/tools/fbd_designer/fbd_plugins/sendsmsplugin/icon/sendsms.png index c33ffb654c8848e8addb9fb0c9ba96fbf2c4e02f..a916429c55ebbed972e38f3319106c25ee21a5a0 100644 GIT binary patch delta 471 zcmV;|0Vw{{1^EMzEPoRK01FcV0GgZ_00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj6j!8s8RCodHS4~dBKotHSX;``72z6^9!7aMz4LpL}Ks`b03E&3G!Wg*(+(4un zmxUA1wKhE8lr}^%#s0I9FPWdtO#Agszc=rdpy0A2^^KGks(*zK!Xw&rM?yM`Nb7{7 zh*waS1~|nzEl?$1*@OX4dcGp&aIiy!IuP+Sa3K6YVnaJR=f22(fTHe2SV--N`;2y{ z^cFW@qYR&Bm{NwiDI@U)g`!H|C|GO2QPruz4^|-!q$1{*ONYl7tlIGU*)nnR?eVzh z@l&s>TT==#h=1*0t?_j&0u+nML=#uqHKh=97&fb7${N_Gt@(EAuto>Z}G-U*{{}KQe{9x zqLT*MQy-TtsV9hcMIlSRmRr>wnnqT{N2Ze}Nz9+@y-;&kUSNeYT4uU0;xmvJZJMC~ z4(i8#*!z@ZyJ~DXB%%M1XtLHzzA{K2wh`2v2O_gR>iB7c96lYo{{fidorRVsos0kg N002ovPDHLkV1hek(zXBq delta 691 zcmV;k0!;n+1JebNEPoOJ01FZU(%pXi0007oNklG%+P}aaiWaOV4_XkRC|JD}Me$dAXey0JA}Z}c z!O|A0#v1cucl^F)f8+4q^r&P?7&r4;RLZ-3t>3}c7{9VDUvxnmhp zG^H$SU^bbI%XO&7cfY+HPdn{GFrJ9kZ!{^vgQN}A&$fK{Hxyvrl1$l zsNy|q7Yt|^Zhr!L3@z6HZh?lO@6ecSFl@K>$1083j$!aG;W{d{RRar1)e6;S={SzS zu3Gbhb2AgWybHrUX)`^twL7u;<@Jr$(8sZJ*@F2naAx{5_p$DFoi&v;=RG-{s2f2 zxM4G1^DnMOg0ql;(}x#N>B!7OCae5lK_C9Cz6!B}&@ZRpClIgT`Lbu6LCiuiz`DWC z!|y=-DSx!HLJU5q?>GV@Xc|HHpm+c(E!0o?oomoI+WX-jK}*m@D*hvtjE~DVh_m7d ztl=5BXMaBjFrtA;Xby^^@3(5P9D%D0D6Zibph2h5n!zPFT)fuz|Lb<*?-<~`7k<%A z*gB&))r?f6ULnst!pS!0y$wj{iJ1~d!5}hwPAux9oNVj7xBm9$qh^>X`2xjvnMPmQ Zegi4f?995x8`uB<002ovPDHLkV1gppQ6&HX diff --git a/product/src/tools/fbd_designer/fbd_plugins/smtpmailplugin/icon/smtpmail.png b/product/src/tools/fbd_designer/fbd_plugins/smtpmailplugin/icon/smtpmail.png index ef256f5ad57ea97445dbe6eaa5810685d0701824..15fcc4fce0657c70ad10751f5b64359abe141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XYbNXBIeSnj;1^N)y2?p1R+0 zS|9Cd+{BpH3o(*4V|f&--liM3e)o4G8?(T_o<2Q-g`=yi*wuj!3}eXVd_!?5+kR@U zTZ1QaCN#>q++x{!@a$YV3BgLRaJ-GjrYS26>@&i5wc^F_IBw})ylld8CyqO?z<+FG z4}aX53_34Z$QXg| z@1>;+s>8>wPxZZ!#KV6plZ-2_h8X6~F|0UMs@Yb3?{#SCRlXi$n4T}=`&Tvf8&$JC t)%X7QGX1B96qBhBDD^FKy+7Li0Tk3Yw)rM!&5-~A002ovPDHLkV1i89IkEr% diff --git a/product/src/tools/fbd_designer/fbd_plugins/timetriggerplugin/icon/timetrigger.png b/product/src/tools/fbd_designer/fbd_plugins/timetriggerplugin/icon/timetrigger.png index ac39c6df6bf99ff9adbaad6398a32c9af8b1ae37..da6cb3f943d216bec827f31b19bfbe18dd859249 100644 GIT binary patch delta 692 zcmV;l0!#h-2-F3TEPoRK01FcV0GgZ_00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj7X-PyuRCoc!SKDHrEm=7d|mjW*yuxeZalyX!QbM-vS%Jqv&CzQ z^ujAT$5XJR9)8lbZeGOI(<#4vTK-NcnAG}-PBH^EDMdqldNS5$4p-k4(zYFj8G)~ z^|auOs8;0#U<$YhRe3BW>{;UlA!v0wRo3+Rye?gFnPZ{7M^iaoQ?3A<9#=!iEU z$;BiX@xoSXA>mu<2U_CA%3Beaxd8sKI}eSDgDngCqQp5SxL`2um5W|!Wgh-do0LwR a_3i<`Jrn(?(lCwy0000Jy$^oPjE>$m7s6y_opC~{pka|c|f~a~a7gYX$Dr%_|5Ndk> z$4O-G+EFd55&Z}s5=98&)axC7&t5|)8{@5-KFOZ9Gw;3Myni<{zn#^TQj{@_tdR0! z67(z)g=u4Cg%n*?j&pF5FduZGVgit6|O0lm*dd{0~57;7xA#ALw)1W4((n;Mr2?Gc^38Y$|!1+kCO~ zgr6Aq1>BKTYTJOWB0<)%L$}~~+ zmFv!e<8d>aO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