repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
SDurand7/AVLIT-Engine
Core/Base/include/Light.hpp
<reponame>SDurand7/AVLIT-Engine<gh_stars>0 #pragma once #include <Core/Base/include/SceneObject.hpp> #include <Core/Renderer/include/RenderTarget.hpp> namespace AVLIT { class Light : public SceneObject { public: Light(const Light &light) = delete; // transform should be a composition of a rotation and a tr...
SDurand7/AVLIT-Engine
Core/Base/include/Material.hpp
#pragma once #include <Core/Base/include/Macros.hpp> #include <Core/Base/include/Types.hpp> #include <Core/Renderer/include/Shader.hpp> #include <Core/Renderer/include/Texture.hpp> namespace AVLIT { class Material { public: Material() = default; inline bool isOpaque() const; inline bool isTwoSided() c...
SDurand7/AVLIT-Engine
Core/Renderer/OpenGL/inline/OGLShaderManager.inl
namespace AVLIT { inline OGLShader *OGLShaderManager::shader(OGLShaderType type) { return &m_shaders[static_cast<int>(type)]; } } // namespace AVLIT
SDurand7/AVLIT-Engine
Core/Base/inline/SceneBVHNode.inl
#include <Core/Base/include/SceneObject.hpp> namespace AVLIT { inline const std::string &SceneBVHNode::name() const { return m_sceneObject->name(); } inline int SceneBVHNode::childrenCount() const { return static_cast<int>(m_children.size()); } inline const AABB &SceneBVHNode::aabb() const { return m_aabb; } inli...
SDurand7/AVLIT-Engine
Core/Renderer/OpenGL/src/OGLVAO.cpp
<reponame>SDurand7/AVLIT-Engine #include "OGLVAO.hpp" #include <Core/Base/include/Mesh.hpp> namespace AVLIT { OGLVAO::OGLVAO(const Mesh &mesh) : m_buffers(2) { glGenVertexArrays(1, &m_vaoID); glGenBuffers(2, m_buffers.data()); glBindVertexArray(m_vaoID); const auto &indices = mesh.indices(); gl...
SDurand7/AVLIT-Engine
Core/Renderer/OpenGL/include/OGLVAO.hpp
#pragma once #include "glad.h" #include <vector> #include <Core/Base/include/Macros.hpp> #include <Core/Base/include/Types.hpp> namespace AVLIT { class OGLVAO { public: OGLVAO(const OGLVAO &) = delete; void operator=(const OGLVAO &) = delete; OGLVAO() = default; OGLVAO(const Mesh &mesh); ~O...
SDurand7/AVLIT-Engine
Core/Renderer/OpenGL/inline/OGLVAO.inl
<filename>Core/Renderer/OpenGL/inline/OGLVAO.inl namespace AVLIT { inline void OGLVAO::operator=(OGLVAO &&vao) noexcept { m_vaoID = vao.m_vaoID; vao.m_vaoID = 0; m_buffers = std::move(vao.m_buffers); } inline bool OGLVAO::operator==(const OGLVAO &vao) const { return m_vaoID == vao.m_vaoID; } inline void ...
reactor-engine/reactor-algebra
lib/include/reactor/algebra/Transform2dInside.hpp
<reponame>reactor-engine/reactor-algebra #ifndef REACTOR_ALGEBRA_TRANSFORM2DINSIDE_HPP #define REACTOR_ALGEBRA_TRANSFORM2DINSIDE_HPP namespace reactor { namespace algebra { template <typename TScalar> class Transform2dInside { public: }; }} // namespace reactor::algebra #endif // REACTOR_ALGEBRA_TRANSFORM2DINSIDE...
reactor-engine/reactor-algebra
lib/include/reactor/algebra/Vector2dInside.hpp
<filename>lib/include/reactor/algebra/Vector2dInside.hpp #ifndef REACTOR_ALGEBRA_VECTOR2DINSIDE_HPP #define REACTOR_ALGEBRA_VECTOR2DINSIDE_HPP namespace reactor { namespace algebra { template <typename TScalar> class Vector2dInside { public: TScalar mx; TScalar my; }; }} // namespace reactor::algebra #en...
reactor-engine/reactor-algebra
lib/src/reactor/algebra/Transform2d.cpp
<gh_stars>0 #include "reactor/math/Arithmetic.hpp" #include "reactor/algebra/Vector2d.hpp" #include "reactor/algebra/Transform2d.hpp" namespace reactor { namespace algebra { using namespace reactor::math; /**************** * Constructors * ****************/ template <typename TScalar> Transform2d<TScalar>::Transf...
reactor-engine/reactor-algebra
lib/src/reactor/algebra/Vector2d.cpp
<reponame>reactor-engine/reactor-algebra<gh_stars>0 #include "reactor/math/Arithmetic.hpp" #include "reactor/algebra/Vector2d.hpp" namespace reactor { namespace algebra { using namespace reactor::math; /**************** * Constructors * ****************/ template <typename TScalar> Vector2d<TScalar>::Vector2d() {...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/serialport/serialportwid.cpp
<reponame>ChinaClever/PDU-MonitorTool /* * 串口窗口 * * Created on: 2018年1月1日 * Author: Lzy */ #include "serialportwid.h" #include "ui_serialportwid.h" #include "msgbox.h" #include "config.h" SerialPortWid::SerialPortWid(QWidget *parent) : QWidget(parent), ui(new Ui::SerialPortWid) { ui->setupUi(t...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/cfgcom/config.cpp
/* * 配置文件公共基类 * * Created on: 2018年1月1日 * Author: Lzy */ #include "config.h" Cfg::Cfg() { mCfg = CfgCom::bulid(); item = new sCfgItem(); initCnt(); initErrData(); initCfgDev(); initCurrentNum(); } Cfg *Cfg::bulid() { static Cfg* sington = nullptr; if(sington == nullptr) ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/smtpclient/smtplib/mimehtml.cpp
/* Copyright (c) 2011-2012 - <NAME> This file is part of SmtpClient for Qt. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/RK9800/rk_serial.cpp
#include "rk_serial.h" Rk_Serial::Rk_Serial(QObject *parent) : QThread(parent) { mSerial = nullptr; } int Rk_Serial::transmit(uchar *recv) { if(!mSerial) return 0; static uchar sent[] = {0x55, 0xAA, 0x00, 0x01}; int len = mSerial->transmit(sent, sizeof(sent), recv, 1); if(len < 10) { qDebug() << "...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/cores/test_devread.cpp
<filename>PDU-MonitorTest/cores/test_devread.cpp /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "test_devread.h" Test_DevRead::Test_DevRead(QObject *parent) : Test_Object(parent) { } void Test_DevRead::initFunSlot() { mRtu = nullptr; mSiRtu = Dev_SiRtu::bulid(this); mIpRtu = Dev_IpRtu::...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/sqlcom/sqltableview.cpp
/* * * Created on: 2020年10月1日 * Author: Lzy */ #include "sqltableview.h" #include "config.h" SqlTableView::SqlTableView(QWidget *parent) : QWidget(parent) { tableView = new QTableView(this); tableView->setSortingEnabled(true); tableView->setSelectionMode(QAbstractItemView::SingleSelection); ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/cores/test_corethread.cpp
<reponame>ChinaClever/PDU-MonitorTool<gh_stars>0 /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "test_corethread.h" Test_CoreThread::Test_CoreThread(QObject *parent) : Test_Object(parent) { } void Test_CoreThread::initFunSlot() { mLogs = Test_Logs::bulid(this); mErr = Test_ErrRange::bulid(...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/smtpclient/email_setdlg.cpp
/* * email_setdlg.cpp * 邮件配置界面 * * Created on: 2016年10月11日 * Author: Lzy */ #include "email_setdlg.h" #include "ui_email_setdlg.h" #include "common.h" #include "email.h" static email_setInfo *gSet = NULL; email_setInfo *email_get_setInfo() { return gSet; } Email_SetDlg::Email_SetDlg(QWidget *parent) ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/home/home_setdlg.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "home_setdlg.h" #include "ui_home_setdlg.h" Home_SetDlg::Home_SetDlg(QWidget *parent) : QDialog(parent), ui(new Ui::Home_SetDlg) { ui->setupUi(this); groupBox_background_icon(this); mItem = Cfg::bulid()->item; QTimer::singleShot(5...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/logcom/log_datewidget.cpp
/* * log_datewidget.cpp * * Created on: 2017年10月11日 * Author: Lzy */ #include "log_datewidget.h" #include "ui_log_datewidget.h" LOG_DateWidget::LOG_DateWidget(QWidget *parent) : QWidget(parent), ui(new Ui::LOG_DateWidget) { ui->setupUi(this); mDateHash = new LOG_DateHash(); //mTreeWidge...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/smtpclient/email.cpp
/* * email.cpp * 发送邮件 * * Created on: 2016年10月11日 * Author: Lzy */ #include "email.h" #include <QHostInfo> Email::Email(QObject *parent) : QObject(parent) { mSet = email_get_setInfo(); } Email::~Email() { } int Email::sendMail(const QString &from, const QStringList &to, const QString &subject, con...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/json/json_build.cpp
/* * * * Created on: 2018年10月1日 * Author: Lzy */ #include "json_build.h" Json_Build::Json_Build() { QString product[PRODUCT_NUM]={"ZPDU","MPDU","RPDU","NPM-V","IP-PDU","SI-PDU","BM-PDU"}; for(int i = 0 ; i < PRODUCT_NUM ; i++) { mProduct.push_back(product[i]);//产品种类初始化 } } Json_Bu...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/setups/users/landinguser.cpp
<reponame>ChinaClever/PDU-MonitorTool<filename>PDU-MonitorTest/setups/users/landinguser.cpp /* * * Created on: 2020年10月1日 * Author: Lzy */ #include "landinguser.h" bool usr_land_jur() { return LandingUser::get()->user.jur; } QString user_land_name() { return LandingUser::get()->user.name; } Landi...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/home/home_mainwid.cpp
<gh_stars>0 /* * * Created on: 2020年10月1日 * Author: Lzy */ #include "home_mainwid.h" #include "ui_home_mainwid.h" Home_MainWid::Home_MainWid(QWidget *parent) : QWidget(parent), ui(new Ui::Home_MainWid) { ui->setupUi(this); groupBox_background_icon(this); initWid(); } Home_MainWid::~Home...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/setups/users/editusrdlg.cpp
/* * editusrdlg.cpp * 用户信息修改界面 * * Created on: 2016年10月11日 * Author: Lzy */ #include "editusrdlg.h" EditUsrDlg::EditUsrDlg(QWidget *parent) : NewUsrDlg(parent) { QString str = tr("编辑用户"); editTitle(str); } EditUsrDlg::~EditUsrDlg() { } void EditUsrDlg::setUsrId(int id) { mId = id; s...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/snmpclient/snmpdemo.cpp
#include "snmpdemo.h" namespace { const auto mib_2_OID = QString( ".1.3.6.1.2.1" ); const auto sysDescr_OID = mib_2_OID + ".1.1.0"; const auto sysUpTimeInstance_OID = mib_2_OID + ".1.3.0"; const auto sysName_OID = mib_2_OID + ".1.5.0"; const auto ifTable_OID = mib_2_OID + ".2.2"; const auto i...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/excel/execl_demo.cpp
<gh_stars>0 /* * execl_demo.cpp * Execl表操作 参考方法 * 提供二种操作Execl表类 * 1、BasicExcel类, * 2、QExcel类,代码简短 * * Created on: 2016年10月11日 * Author: Lzy */ #include "qexcel.h" #include <BasicExcel.hpp> using namespace YExcel; int BasicExcel_demo(void) { BasicExcel e; // Load a workbook with one sheet, displ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/setups/users/usermainwid.cpp
/* * * Created on: 2020年10月1日 * Author: Lzy */ #include "usermainwid.h" #include "ui_usermainwid.h" UserMainWid::UserMainWid(QWidget *parent) : QWidget(parent), ui(new Ui::UserMainWid) { ui->setupUi(this); LandingUser::get(); mBtnBar = new UserBtnBar; mDbTable = new SqlTableWid(ui->g...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/msgcom/msgcalendardlg.cpp
<gh_stars>0 /* * logcalendardlg.cpp * * * Created on: 2017年10月1日 * Author: Lzy */ #include "msgcalendardlg.h" #include "ui_msgcalendardlg.h" MsgCalendarDlg::MsgCalendarDlg(QWidget *parent) : QDialog(parent), ui(new Ui::MsgCalendarDlg) { ui->setupUi(this); this->setWindowTitle(tr("日期选择")); ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/statedata/td_mainwid.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "td_mainwid.h" #include "ui_td_mainwid.h" Td_MainWid::Td_MainWid(QWidget *parent) : QWidget(parent), ui(new Ui::Td_MainWid) { ui->setupUi(this); groupBox_background_icon(this); mStatusTabWid = new Td_StatusTabWid(ui->groupBox); co...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/cores/test_errrange.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "test_errrange.h" Test_ErrRange::Test_ErrRange(QObject *parent) : Test_Object(parent) { } void Test_ErrRange::initFunSlot() { mSourceDev = mPacket->getDev(0); } Test_ErrRange *Test_ErrRange::bulid(QObject *parent) { static Test_ErrRange* singt...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/common.cpp
/* * common.cpp * 公共方法接口 * * Created on: 2018年1月1日 * Author: Lzy */ #include "common.h" #include <QWidget> #include <QHeaderView> #include <time.h> #include <sys/time.h> #include <unistd.h> bool cm_pingNet(const QString& ip) { QProcess pingProcess; QString strArg = "ping " + ip + " -n 1 -i 2"; //s...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/snmpclient/snmplib/SetValueJob.cpp
#include "SetValueJob.h" #include "Session.h" namespace qtsnmpclient { SetValueJob::SetValueJob( Session*const session, const qint32 id, const QByteArray& community, const QString& oid, const int type, ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/logs/logquerydlg/log_logquerydlg.cpp
<gh_stars>0 /* * * Created on: 2020年10月1日 * Author: Lzy */ #include "log_logquerydlg.h" #include "ui_log_logquerydlg.h" Log_LogQueryDlg::Log_LogQueryDlg(QWidget *parent) : QDialog(parent), ui(new Ui::Log_LogQueryDlg) { ui->setupUi(this); this->setWindowTitle(tr("查询对话框")); groupBox_backgro...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/ctrls/ctrl_sirtu.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "ctrl_sirtu.h" Ctrl_SiRtu::Ctrl_SiRtu(QObject *parent) : Ctrl_Object(parent) { } Ctrl_SiRtu *Ctrl_SiRtu::bulid(QObject *parent) { static Ctrl_SiRtu* sington = nullptr; if(sington == nullptr) sington = new Ctrl_SiRtu(parent); return s...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/modbus/rtu_modbus.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "rtu_modbus.h" Rtu_Modbus::Rtu_Modbus(QObject *parent) : QObject(parent) { for(int i=0; i<RTU_RW_SIZE; ++i) { mRtuRw[i] = new RtuRw(this); } } Rtu_Modbus *Rtu_Modbus::bulid(QObject *parent) { static Rtu_Modbus* sington = nullptr; ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/dbcom/db_user.cpp
<reponame>ChinaClever/PDU-MonitorTool<filename>PDU-MonitorTest/common/dbcom/db_user.cpp /* * db_usr.cpp * 用户数据库表 * * Created on: 2020年10月11日 * Author: Lzy */ #include "db_user.h" DbUser::DbUser() { createTable(); tableTile = tr("用户管理"); hiddens << 1 << 2 << 5 << 9; headList << tr("用户") << t...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/sernum/sn_devtype.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "sn_devtype.h" #include "common/json/json_build.h" #include "common/json/json_recv.h" Sn_DevType::Sn_DevType() { sDevData *dev = sDataPacket::bulid()->getDev(); mDt = &(dev->devType); QJsonObject json; Json_Build::bulid()->getJson(json);...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/dbcom/dblogs.cpp
/* * * * Created on: 2020年10月11日 * Author: Lzy */ #include "dblogs.h" DbLogs::DbLogs() { createTable(); tableTile = tr("状态日志"); //hiddens << 9; headList << tr("设备类型") << tr("客户名称") << tr("操作员") << tr("结果") << tr("设备序列号"); } void DbLogs::createTable() { QString cmd = "create...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/sqlcom/sqltablewid.cpp
/* * * Created on: 2020年10月1日 * Author: Lzy */ #include "sqltablewid.h" #include "ui_sqltablewid.h" SqlTableWid::SqlTableWid(QWidget *parent) : QWidget(parent), ui(new Ui::SqlTableWid) { ui->setupUi(this); mExportDlg = new SqlExportDlg(this); QGridLayout *gridLayout = new QGridLayout(pa...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/setups/versiondlg.cpp
<reponame>ChinaClever/PDU-MonitorTool /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "versiondlg.h" #include "ui_versiondlg.h" #include <QtCore> #include "common.h" VersionDlg::VersionDlg(QWidget *parent) : QDialog(parent), ui(new Ui::VersionDlg) { ui->setupUi(this); groupBox_backgrou...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/snmpclient/snmplib/AbstractJob.cpp
#include "AbstractJob.h" #include "Session.h" namespace qtsnmpclient { AbstractJob::AbstractJob( Session*const session, const qint32 id ) : m_session( session ) , m_id( id ) { Q_ASSERT( session ); Q_ASSERT( m_id > 0 ); } AbstractJob::~AbstractJob() { // do nothing. just ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/modbus/rtu_read.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "rtu_read.h" Rtu_Read::Rtu_Read(QObject *parent) : Rtu_Serial(parent) { } /** * 功 能:发送数据打包 * 入口参数:pkt -> 发送结构体 * 出口参数:ptr -> 缓冲区 * 返回值:打包后的长度 */ int Rtu_Read::rtuPacket(sRtuItem *pkt, uchar *ptr) { uchar *buf = ptr; *(ptr++) = pkt->...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/cores/test_devctrl.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "test_devctrl.h" Test_DevCtrl::Test_DevCtrl(QObject *parent) : Test_Object(parent) { } Test_DevCtrl *Test_DevCtrl::bulid(QObject *parent) { static Test_DevCtrl* sington = nullptr; if(sington == nullptr) sington = new Test_DevCtrl(parent...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/home/home_thresholdtabwid.cpp
<filename>PDU-MonitorTest/home/home_thresholdtabwid.cpp<gh_stars>0 /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "home_thresholdtabwid.h" Home_ThresholdTabWid::Home_ThresholdTabWid(QWidget *parent) : ComTableWid(parent) { initWid(); mDev = sDataPacket::bulid()->getDev(); mData = &(mDev->...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/home/home_linetabwid.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "home_linetabwid.h" Home_LineTabWid::Home_LineTabWid(QWidget *parent) : ComTableWid(parent) { initWid(); mDev = sDataPacket::bulid()->getDev(); mData = &(mDev->line); } void Home_LineTabWid::initWid() { QString title = tr("相数据列表"); Q...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/backcolour/backcolourcom.cpp
<gh_stars>0 /* * * Created on: 2020年10月1日 * Author: Lzy */ #include "backcolourcom.h" /* 窗口背景色 */ #define WIDGET_BACK_COLOR 232,249,255 #define BUTTON_BACK_COLOR 232,238,250 #define DILAG_BACK_COLOR 85,152,215 #define DILAG_BUTTON_COLOR 255,255,255 /* 获得焦点BTN背景颜色 */ #define BTN...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/smtpclient/smtplib/mimepart.cpp
<filename>PDU-MonitorTest/common/smtpclient/smtplib/mimepart.cpp /* Copyright (c) 2011-2012 - <NAME> This file is part of SmtpClient for Qt. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foun...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/websocket/websocketclient.cpp
<reponame>ChinaClever/PDU-MonitorTool /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "websocketclient.h" WebSocketClient::WebSocketClient(QObject *parent) : QObject(parent) { isRun = false; isConnected = false; mSocket = new QWebSocket(); connect(mSocket, SIGNAL(connected()), this, S...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/smtpclient/emailthread.cpp
/* * emailthread.cpp * 邮件发送线程 * 1、实现,一份一份发送邮件功能 * 2、使用定时器发送邮件 * * Created on: 2016年10月11日 * Author: Lzy */ #include "emailthread.h" static QReadWriteLock *gLock = new QReadWriteLock(); static QStringList gSubjectList, gBodyList; // 所有的邮件信息,都会保存至此链表中 /** * @brief 发送邮件 调用此函数会把信息保存至发送区 邮件得一条一条的...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/sqlcom/sqlquerybase.cpp
/* * * Created on: 2020年10月1日 * Author: Lzy */ #include "sqlquerybase.h" SqlQueryBase::SqlQueryBase() { }
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/home/home_manualdlg.cpp
<reponame>ChinaClever/PDU-MonitorTool /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "home_manualdlg.h" #include "ui_home_manualdlg.h" Home_ManualDlg::Home_ManualDlg(QWidget *parent) : QDialog(parent), ui(new Ui::Home_ManualDlg) { ui->setupUi(this); groupBox_background_icon(this); } ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/setups/users/newusrdlg.cpp
<gh_stars>0 /* * newusrdlg.cpp * 用户增加界面 * 新用户信息增加 * * Created on: 2016年10月11日 * Author: Lzy */ #include "newusrdlg.h" #include "ui_newusrdlg.h" NewUsrDlg::NewUsrDlg(QWidget *parent) : QDialog(parent), ui(new Ui::NewUsrDlg) { ui->setupUi(this); groupBox_background_icon(this); QRegExp...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/cores/test_object.cpp
<filename>PDU-MonitorTest/cores/test_object.cpp<gh_stars>0 /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "test_object.h" Test_Object::Test_Object(QObject *parent) : QThread(parent) { isRun = false; mPacket = sDataPacket::bulid(); mItem = Cfg::bulid()->item; mPro = mPacket->getPro(); ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/sqlcom/sqlexportdlg.cpp
<reponame>ChinaClever/PDU-MonitorTool<filename>PDU-MonitorTest/common/sqlcom/sqlexportdlg.cpp /* * log_exportdlg.cpp * 导出窗口 * * Created on: 2017年10月11日 * Author: Lzy */ #include "sqlexportdlg.h" #include "ui_sqlexportdlg.h" SqlExportDlg::SqlExportDlg(QWidget *parent) : QDialog(parent), ui(new Ui::S...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/json/json_recv.cpp
/* * * * Created on: 2020年3月9日 * Author: Lzy */ #include "json_recv.h" Json_Recv::Json_Recv(QObject *parent) : QObject(parent) { mJsonSize = SN_TOTAL_NUM; } Json_Recv::~Json_Recv() { } Json_Recv *Json_Recv::bulid(QObject *parent) { static Json_Recv* sington = NULL; if(sington == NULL) { ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/ctrls/ctrl_iprtu.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "ctrl_iprtu.h" Ctrl_IpRtu::Ctrl_IpRtu(QObject *parent) : Ctrl_Object(parent) { mProcess = new QProcess(this); } Ctrl_IpRtu *Ctrl_IpRtu::bulid(QObject *parent) { static Ctrl_IpRtu* sington = nullptr; if(sington == nullptr) sington = n...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/devices/dev_source.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "dev_source.h" Dev_Source::Dev_Source(QObject *parent) : Dev_SiRtu(parent) { mRk = new Rk_Serial(this); mDev = sDataPacket::bulid()->getDev(0); init(); } Dev_Source *Dev_Source::bulid(QObject *parent) { static Dev_Source* sington = nullp...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/json/json_push.cpp
/* * * * Created on: 2018年10月1日 * Author: Lzy */ #include "json_push.h" #include "udp/sent/udpsentsocket.h" #include "json_recv.h" Json_Push::Json_Push(QObject *parent) : QObject(parent) { Json_Recv::bulid(this); mJson = Json_Build::bulid(); mItem = ConfigBase::bulid()->item; mSocket = WebS...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/snmpclient/snmplib/QtSnmpClient.cpp
#include "QtSnmpClient.h" #include "Session.h" #include "defines.h" Q_DECLARE_METATYPE( QHostAddress ) QtSnmpClient::QtSnmpClient( QObject*const parent ) : QObject( parent ) , m_session( new qtsnmpclient::Session( this ) ) { static bool once = true; if( once ) { qRegisterMetaType< QtSnmpDataLi...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/ctrls/ctrl_object.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "ctrl_object.h" Ctrl_Object::Ctrl_Object(QObject *parent) : Dev_Object(parent) { }
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/devices/dev_ipsnmp.cpp
<reponame>ChinaClever/PDU-MonitorTool<filename>PDU-MonitorTest/devices/dev_ipsnmp.cpp /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "dev_ipsnmp.h" Dev_IpSnmp::Dev_IpSnmp(QObject *parent) : QThread(parent) { mPacket = sDataPacket::bulid(); mItem = Cfg::bulid()->item; mPro = mPacket->getPr...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/statedata/td_statustabwid.cpp
<filename>PDU-MonitorTest/statedata/td_statustabwid.cpp /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "td_statustabwid.h" Td_StatusTabWid::Td_StatusTabWid(QWidget *parent) : ComTableWid(parent) { initWid(); mPro = sDataPacket::bulid()->getPro(); } void Td_StatusTabWid::initWid() { QStr...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/logcom/logbtnbar.cpp
/* * * Created on: 2020年10月1日 * Author: Lzy */ #include "logbtnbar.h" LogBtnBar::LogBtnBar(QWidget *parent) : SqlBtnBar(parent) { setNoEdit(); //clearHidden(); mQueryDlg = nullptr; } QString LogBtnBar::queryBtn() { QString str; if(mQueryDlg) { int ret = mQueryDlg->Exec(); ...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/msgcom/msgbox.cpp
<filename>PDU-MonitorTest/common/msgcom/msgbox.cpp /* * msgbox.cpp * 信息提示框 * Created on: 2016年10月11日 * Author: Lzy */ #include "msgbox.h" bool MsgBox::critical(QWidget *parent, const QString &str) { bool ret = false; QMessageBox::StandardButton reply; reply = QMessageBox::critical(parent, QOb...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/home/home_envtabwid.cpp
<filename>PDU-MonitorTest/home/home_envtabwid.cpp<gh_stars>0 /* * * Created on: 2021年1月1日 * Author: Lzy */ #include "home_envtabwid.h" Home_EnvTabWid::Home_EnvTabWid(QWidget *parent) : ComTableWid(parent) { initWid(); sDevData *dev = sDataPacket::bulid()->getDev(); mEnv = &(dev->env); } void Hom...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/logcom/logcomwid.cpp
/* * 日志窗口公共基类 * 只需要实现二个纯虚函数即可 * virtual BasicSql *getDb()=0; virtual void initTable()=0; * * Created on: 2018年1月1日 * Author: Lzy */ #include "logcomwid.h" #include "ui_logcomwid.h" LogComWid::LogComWid(QWidget *parent) : QWidget(parent), ui(new Ui::LogComWid) { ui->setupUi(...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/devices/dev_object.cpp
/* * * Created on: 2021年1月1日 * Author: Lzy */ #include "dev_object.h" Dev_Object::Dev_Object(QObject *parent) : QThread(parent) { mPacket = sDataPacket::bulid(); mItem = Cfg::bulid()->item; mPro = mPacket->getPro(); mDev = mPacket->getDev(); mDt = &(mDev->devType); QTimer::singleShot(...
ChinaClever/PDU-MonitorTool
PDU-MonitorTest/common/snmpclient/snmplib/Session.cpp
<gh_stars>0 #include "Session.h" #include "QtSnmpData.h" #include "RequestValuesJob.h" #include "RequestSubValuesJob.h" #include "SetValueJob.h" #include "defines.h" #include <QDateTime> #include <QHostAddress> #include <math.h> namespace qtsnmpclient { namespace { const int default_response_timeout = 10000; ...
rmlmcfadden/triumfpp
tests/codata_2014.cpp
<reponame>rmlmcfadden/triumfpp #define BOOST_TEST_MODULE CODATA_2014 #include <boost/test/included/unit_test.hpp> #include <cmath> #include <tuple> typedef std::tuple<float, double, long double> test_types; #include <triumf/constants/codata_2014.hpp> // {220} lattice spacing of silicon // (1.920155714e-10 ± 3.2e-18...
rmlmcfadden/triumfpp
tests/bnmr_slr.cpp
#define BOOST_TEST_MODULE BNMR_SLR #include <boost/test/included/unit_test.hpp> #include <cmath> #include <triumf/bnmr/nuclei.hpp> #include <triumf/bnmr/slr/bi_exp.hpp> #include <triumf/bnmr/slr/cbrt_exp.hpp> #include <triumf/bnmr/slr/exp.hpp> #include <triumf/bnmr/slr/gauss_dist_exp.hpp> #include <triumf/bnmr/slr/mag...
rmlmcfadden/triumfpp
include/triumf/superconductivity/gc.hpp
#ifndef TRIUMF_SUPERCONDUCTIVITY_GC_HPP #define TRIUMF_SUPERCONDUCTIVITY_GC_HPP #include <cmath> #include "triumf/superconductivity/phenomenology.hpp" // TRIUMF: Canada's particle accelerator centre namespace triumf { // namespace superconductivity { // Gorter-Casimir phenomenological two-fluid model namespace gc ...
rmlmcfadden/triumfpp
tests/srim_pdf.cpp
<filename>tests/srim_pdf.cpp #define BOOST_TEST_MODULE SRIM_PDF #include <boost/test/included/unit_test.hpp> #include <limits> #include <tuple> typedef std::tuple<float, double, long double> test_types; #include <triumf/srim/pdf.hpp> // BOOST_AUTO_TEST_CASE_TEMPLATE(modified_beta, T, test_types) { T alpha = 2.0; ...
rmlmcfadden/triumfpp
examples/plot_penetration_depth.cpp
<filename>examples/plot_penetration_depth.cpp #include <triumf/superconductivity/bcs.hpp> #include <triumf/superconductivity/phenomenology.hpp> double two_fluid_penetration_depth(const double *x, const double *par) { return triumf::superconductivity::phenomenology::penetration_depth<double>( *x, par[0], par[1]...
rmlmcfadden/triumfpp
include/triumf/bnmr/slr/exp.hpp
<reponame>rmlmcfadden/triumfpp #ifndef TRIUMF_BNMR_SLR_EXP_HPP #define TRIUMF_BNMR_SLR_EXP_HPP #include <cmath> #include <triumf/bnmr/slr/common.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // β-detected nuclear magnetic resonance (β-NMR) namespace bnmr { // spin-lattice relaxation (SLR) ...
rmlmcfadden/triumfpp
tests/codata_2002.cpp
<filename>tests/codata_2002.cpp<gh_stars>0 #define BOOST_TEST_MODULE CODATA_2002 #include <boost/test/included/unit_test.hpp> #include <cmath> #include <tuple> typedef std::tuple<float, double, long double> test_types; #include <triumf/constants/codata_2002.hpp> // Wien displacement law constant // (0.0028977685 ± ...
rmlmcfadden/triumfpp
include/triumf/statistical_mechanics/fermi_dirac.hpp
#ifndef TRIUMF_STATISTICAL_MECHANICS_FERMI_DIRAC_HPP #define TRIUMF_STATISTICAL_MECHANICS_FERMI_DIRAC_HPP #include <cmath> #include <boost/math/constants/constants.hpp> #include <triumf/constants/codata_2018.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // namespace statistical_mechanics ...
rmlmcfadden/triumfpp
include/triumf/superconductivity/bcs.hpp
<reponame>rmlmcfadden/triumfpp<filename>include/triumf/superconductivity/bcs.hpp #ifndef TRIUMF_SUPERCONDUCTIVITY_BCS_HPP #define TRIUMF_SUPERCONDUCTIVITY_BCS_HPP #include <cmath> #include <limits> #include <tuple> #include <boost/math/constants/constants.hpp> #include <boost/math/quadrature/ooura_fourier_integrals.h...
rmlmcfadden/triumfpp
include/triumf/bnmr/nuclei.hpp
<gh_stars>0 #ifndef TRIUMF_BNMR_NUCLEI_HPP #define TRIUMF_BNMR_NUCLEI_HPP #include <boost/math/constants/constants.hpp> #include <triumf/nmr/utilities.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // β-detected nuclear magnetic resonance (β-NMR) namespace bnmr { // β-NMR probe nuclei and ...
rmlmcfadden/triumfpp
include/triumf/numpy.hpp
#ifndef TRIUMF_NUMPY_HPP #define TRIUMF_NUMPY_HPP #include <cmath> #include <vector> // TRIUMF: Canada's particle accelerator centre namespace triumf { // NumPy inspired functions namespace numpy { /// \brief Return an array numbers spaced evenly on a linear scale. /// \details The array contains num values [start,...
rmlmcfadden/triumfpp
tmp/gauss_dist_exp.hpp
<filename>tmp/gauss_dist_exp.hpp #ifndef TRIUMF_BNMR_SLR_GAUSS_DIST_EXP_HPP #define TRIUMF_BNMR_SLR_GAUSS_DIST_EXP_HPP #include <boost/math/constants/constants.hpp> #include <cmath> #include <triumf/bnmr/slr/common.hpp> #include <triumf/math/faddeeva.hpp> #include <iostream> // TRIUMF: Canada's particle accelerator c...
rmlmcfadden/triumfpp
include/triumf/bnmr/slr/bi_exp.hpp
#ifndef TRIUMF_BNMR_SLR_BI_EXP_HPP #define TRIUMF_BNMR_SLR_BI_EXP_HPP #include <cmath> #include <triumf/bnmr/slr/exp.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // β-detected nuclear magnetic resonance (β-NMR) namespace bnmr { // spin-lattice relaxation (SLR) namespace slr { /// pulsed ...
rmlmcfadden/triumfpp
tests/superconductivity_bcs.cpp
<filename>tests/superconductivity_bcs.cpp #define BOOST_TEST_MODULE SRF #include <boost/test/included/unit_test.hpp> #include <array> #include <limits> #include <tuple> typedef std::tuple<float, double, long double> test_types; #include "triumf/superconductivity/bcs.hpp" // BOOST_AUTO_TEST_CASE_TEMPLATE(bcs_gap, T,...
rmlmcfadden/triumfpp
include/triumf/superconductivity/london.hpp
#ifndef TRIUMF_SUPERCONDUCTIVITY_LONDON_HPP #define TRIUMF_SUPERCONDUCTIVITY_LONDON_HPP #include <cmath> #include <triumf/superconductivity/phenomenology.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // namespace superconductivity { // London's phenomenological theory of superconductivity...
rmlmcfadden/triumfpp
include/triumf/bnmr/slr/magnesium_31/exp.hpp
#ifndef TRIUMF_BNMR_SLR_MAGNESIUM_31_EXP_HPP #define TRIUMF_BNMR_SLR_MAGNESIUM_31_EXP_HPP #include <triumf/bnmr/slr/exp.hpp> #include <triumf/bnmr/slr/magnesium_31/decay_corrections.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // β-detected nuclear magnetic resonance (β-NMR) namespace bnmr...
rmlmcfadden/triumfpp
examples/plot_depth_averaging4.cpp
<reponame>rmlmcfadden/triumfpp<gh_stars>0 // C++ standard library headers #include <algorithm> #include <cmath> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <numeric> #include <vector> // triumf++ headers #include <triumf/bnmr/srf/local.hpp> // #include <trium...
rmlmcfadden/triumfpp
include/triumf/nmr/nuclei.hpp
<filename>include/triumf/nmr/nuclei.hpp<gh_stars>0 #ifndef TRIUMF_NMR_NUCLEI_HPP #define TRIUMF_NMR_NUCLEI_HPP #include <boost/math/constants/constants.hpp> #include <triumf/nmr/utilities.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // nuclear magnetic resonance (NMR) namespace nmr { // ...
rmlmcfadden/triumfpp
include/triumf/superconductivity/pippard.hpp
<reponame>rmlmcfadden/triumfpp<filename>include/triumf/superconductivity/pippard.hpp #ifndef TRIUMF_SUPERCONDUCTIVITY_PIPPARD_HPP #define TRIUMF_SUPERCONDUCTIVITY_PIPPARD_HPP #include <cmath> // #include <boost/multiprecision/cpp_dec_float.hpp> #include <triumf/constants/codata_2018.hpp> #include <triumf/superconduc...
rmlmcfadden/triumfpp
include/triumf/constants/codata_2014.hpp
#ifndef TRIUMF_CONSTANTS_CODATA_2014_HPP #define TRIUMF_CONSTANTS_CODATA_2014_HPP #include <cmath> #include <type_traits> // TRIUMF: Canada's particle accelerator centre namespace triumf { // namespace constants { // Committee on Data (CODATA) of the International Science Council (ISC) // recommended values of fund...
rmlmcfadden/triumfpp
include/triumf/superconductivity/phenomenology.hpp
#ifndef TRIUMF_SUPERCONDUCTIVITY_PHENOMENOLOGY_HPP #define TRIUMF_SUPERCONDUCTIVITY_PHENOMENOLOGY_HPP #include <cmath> #include <boost/math/constants/constants.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // namespace superconductivity { // purely phenomenological relations in supercondu...
rmlmcfadden/triumfpp
examples/plot_hebel_slichter_peak.cpp
<reponame>rmlmcfadden/triumfpp #include <triumf/nmr/hebel_slichter.hpp> #include <triumf/superconductivity/bcs.hpp> double hebel_slichter_integrand(const double *x, const double *par) { return triumf::nmr::hebel_slichter::integrand<double>(*x, par[0], par[1], p...
rmlmcfadden/triumfpp
include/triumf/bnmr/slr/cbrt_exp.hpp
<reponame>rmlmcfadden/triumfpp<gh_stars>0 #ifndef TRIUMF_BNMR_SLR_CBRT_EXP_HPP #define TRIUMF_BNMR_SLR_CBRT_EXP_HPP #include <boost/math/quadrature/tanh_sinh.hpp> #include <cmath> #include <triumf/bnmr/slr/common.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // β-detected nuclear magnetic r...
rmlmcfadden/triumfpp
include/triumf/constants/codata_2010.hpp
#ifndef TRIUMF_CONSTANTS_CODATA_2010_HPP #define TRIUMF_CONSTANTS_CODATA_2010_HPP #include <cmath> #include <type_traits> // TRIUMF: Canada's particle accelerator centre namespace triumf { // namespace constants { // Committee on Data (CODATA) of the International Science Council (ISC) // recommended values of fund...
rmlmcfadden/triumfpp
include/triumf/constants/codata_2006.hpp
#ifndef TRIUMF_CONSTANTS_CODATA_2006_HPP #define TRIUMF_CONSTANTS_CODATA_2006_HPP #include <cmath> #include <type_traits> // TRIUMF: Canada's particle accelerator centre namespace triumf { // namespace constants { // Committee on Data (CODATA) of the International Science Council (ISC) // recommended values of fund...
rmlmcfadden/triumfpp
include/triumf/bnmr/slr/gauss_dist_exp.hpp
#ifndef TRIUMF_BNMR_SLR_GAUSS_DIST_EXP_HPP #define TRIUMF_BNMR_SLR_GAUSS_DIST_EXP_HPP #include <boost/math/constants/constants.hpp> #include <boost/math/quadrature/tanh_sinh.hpp> #include <cmath> #include <triumf/bnmr/slr/common.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // β-detected nu...
rmlmcfadden/triumfpp
include/triumf/bnmr/srf/nonlocal.hpp
<reponame>rmlmcfadden/triumfpp #ifndef TRIUMF_BNMR_SRF_NONLOCAL_HPP #define TRIUMF_BNMR_SRF_NONLOCAL_HPP // C++ standard library headers #include <algorithm> #include <cmath> #include <limits> #include <numeric> #include <vector> // Boost headers #include <boost/math/interpolators/pchip.hpp> #include <boost/math/quad...
rmlmcfadden/triumfpp
examples/bnmr_slr.cpp
#include <TF1.h> #include <triumf/bnmr/nuclei.hpp> #include <triumf/bnmr/slr/bi_exp.hpp> #include <triumf/bnmr/slr/cbrt_exp.hpp> #include <triumf/bnmr/slr/exp.hpp> #include <triumf/bnmr/slr/gauss_dist_exp.hpp> #include <triumf/bnmr/slr/magnesium_31/exp.hpp> #include <triumf/bnmr/slr/sq_exp.hpp> #include <triumf/bnmr/sl...
rmlmcfadden/triumfpp
include/triumf/nmr/utilities.hpp
#ifndef TRIUMF_NMR_UTILITIES_HPP #define TRIUMF_NMR_UTILITIES_HPP #include <boost/math/constants/constants.hpp> #include <triumf/constants/codata_2018.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // nuclear magnetic resonance namespace nmr { // miscellaneous helper functions namespace ut...
rmlmcfadden/triumfpp
examples/plot_dipole_dipole.cpp
<reponame>rmlmcfadden/triumfpp #include <triumf/nmr/dipole_dipole.hpp> #include <boost/math/constants/constants.hpp> #include <cmath> double dipole_dipole(const double *x, const double *par) { double omega_d = std::abs(par[2] * par[3] * par[0] * par[0]); double factor = par[1] * (3.0 / 10.0); double normalizat...