Modification au GUI de config du Watchdog vu que ce n'est pas un device dédié
This commit is contained in:
parent
8b3cc9d2b6
commit
41b19a7b58
BIN
ER-e50.v2.0.9-hotfix.6.5574651.tar
Normal file
BIN
ER-e50.v2.0.9-hotfix.6.5574651.tar
Normal file
Binary file not shown.
BIN
IP Mapping.xlsx
BIN
IP Mapping.xlsx
Binary file not shown.
268
OpenVPN/edgerouterchambly.ovpn
Normal file
268
OpenVPN/edgerouterchambly.ovpn
Normal file
@ -0,0 +1,268 @@
|
||||
##############################################
|
||||
# Sample client-side OpenVPN 2.0 config file #
|
||||
# for connecting to multi-client server. #
|
||||
# #
|
||||
# This configuration can be used by multiple #
|
||||
# clients, however each client should have #
|
||||
# its own cert and key files. #
|
||||
# #
|
||||
# On Windows, you might want to rename this #
|
||||
# file so it has a .ovpn extension #
|
||||
##############################################
|
||||
|
||||
# Specify that we are a client and that we
|
||||
# will be pulling certain config file directives
|
||||
# from the server.
|
||||
client
|
||||
|
||||
# Use the same setting as you are using on
|
||||
# the server.
|
||||
# On most systems, the VPN will not function
|
||||
# unless you partially or fully disable
|
||||
# the firewall for the TUN/TAP interface.
|
||||
;dev tap
|
||||
dev tun
|
||||
|
||||
# Windows needs the TAP-Win32 adapter name
|
||||
# from the Network Connections panel
|
||||
# if you have more than one. On XP SP2,
|
||||
# you may need to disable the firewall
|
||||
# for the TAP adapter.
|
||||
;dev-node MyTap
|
||||
|
||||
# Are we connecting to a TCP or
|
||||
# UDP server? Use the same setting as
|
||||
# on the server.
|
||||
;proto tcp
|
||||
proto udp
|
||||
|
||||
# The hostname/IP and port of the server.
|
||||
# You can have multiple remote entries
|
||||
# to load balance between the servers.
|
||||
remote vpn.yultek.dev 1194
|
||||
;remote my-server-2 1194
|
||||
|
||||
# Choose a random host from the remote
|
||||
# list for load-balancing. Otherwise
|
||||
# try hosts in the order specified.
|
||||
;remote-random
|
||||
|
||||
# Keep trying indefinitely to resolve the
|
||||
# host name of the OpenVPN server. Very useful
|
||||
# on machines which are not permanently connected
|
||||
# to the internet such as laptops.
|
||||
resolv-retry infinite
|
||||
|
||||
# Most clients don't need to bind to
|
||||
# a specific local port number.
|
||||
nobind
|
||||
|
||||
# Downgrade privileges after initialization (non-Windows only)
|
||||
;user nobody
|
||||
;group nobody
|
||||
|
||||
# Try to preserve some state across restarts.
|
||||
persist-key
|
||||
persist-tun
|
||||
|
||||
# If you are connecting through an
|
||||
# HTTP proxy to reach the actual OpenVPN
|
||||
# server, put the proxy server/IP and
|
||||
# port number here. See the man page
|
||||
# if your proxy server requires
|
||||
# authentication.
|
||||
;http-proxy-retry # retry on connection failures
|
||||
;http-proxy [proxy server] [proxy port #]
|
||||
|
||||
# Wireless networks often produce a lot
|
||||
# of duplicate packets. Set this flag
|
||||
# to silence duplicate packet warnings.
|
||||
;mute-replay-warnings
|
||||
|
||||
# SSL/TLS parms.
|
||||
# See the server config file for more
|
||||
# description. It's best to use
|
||||
# a separate .crt/.key file pair
|
||||
# for each client. A single ca
|
||||
# file can be used for all clients.
|
||||
;ca ca.crt
|
||||
;cert client.crt
|
||||
;key client.key
|
||||
|
||||
# Verify server certificate by checking that the
|
||||
# certificate has the correct key usage set.
|
||||
# This is an important precaution to protect against
|
||||
# a potential attack discussed here:
|
||||
# http://openvpn.net/howto.html#mitm
|
||||
#
|
||||
# To use this feature, you will need to generate
|
||||
# your server certificates with the keyUsage set to
|
||||
# digitalSignature, keyEncipherment
|
||||
# and the extendedKeyUsage to
|
||||
# serverAuth
|
||||
# EasyRSA can do this for you.
|
||||
remote-cert-tls server
|
||||
|
||||
# If a tls-auth key is used on the server
|
||||
# then every client must also have the key.
|
||||
;tls-auth ta.key 1
|
||||
|
||||
# Select a cryptographic cipher.
|
||||
# If the cipher option is used on the server
|
||||
# then you must also specify it here.
|
||||
# Note that v2.4 client/server will automatically
|
||||
# negotiate AES-256-GCM in TLS mode.
|
||||
# See also the data-ciphers option in the manpage
|
||||
cipher AES-256-GCM
|
||||
auth SHA256
|
||||
|
||||
# Enable compression on the VPN link.
|
||||
# Don't enable this unless it is also
|
||||
# enabled in the server config file.
|
||||
#comp-lzo
|
||||
|
||||
# Set log file verbosity.
|
||||
verb 3
|
||||
|
||||
# Silence repeating messages
|
||||
;mute 20
|
||||
|
||||
key-direction 1
|
||||
|
||||
|
||||
; script-security 2
|
||||
; up /etc/openvpn/update-resolv-conf
|
||||
; down /etc/openvpn/update-resolv-conf
|
||||
|
||||
|
||||
; script-security 2
|
||||
; up /etc/openvpn/update-systemd-resolved
|
||||
; down /etc/openvpn/update-systemd-resolved
|
||||
; down-pre
|
||||
; dhcp-option DOMAIN-ROUTE .
|
||||
<ca>
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDRTCCAi2gAwIBAgIUXe37kz2yqgyL2xXfvaGRzlz7ywYwDQYJKoZIhvcNAQEL
|
||||
BQAwFDESMBAGA1UEAwwJSkZfc2VydmVyMB4XDTIzMDIyMDIyMDkyMVoXDTMzMDIx
|
||||
NzIyMDkyMVowFDESMBAGA1UEAwwJSkZfc2VydmVyMIIBIjANBgkqhkiG9w0BAQEF
|
||||
AAOCAQ8AMIIBCgKCAQEAnLdVAj0W31TtWGxwdBeqsdIHyUdVAEG8bX+CcNZDP3M3
|
||||
R/gJOmenjqsqHYBe5gZcky1hkqWaD7l/LNmyzZDZ1lVEWpcAZqxbsUZKiHU30bxq
|
||||
84L5qtaAOpwTsumidq2hBqoDBMdBmh18e0QEW624mui7ckXTRRG3PA0ccXtXcTYU
|
||||
ntmhYtQ2oaPauSmfJZIUfZTfVZbB8FkCgu+zJtCx5hq46vIHm8KX0m1zLIeUtGsI
|
||||
hkly+5v52f3sEMlddyoZZkfjRddETk2co09q3oNaP1LYxN5G+TvZDhpdE+PrDsNT
|
||||
wO4uU2d9hVIP3T49heLieZ6KVxyp1FsDYzo0CNlIDwIDAQABo4GOMIGLMB0GA1Ud
|
||||
DgQWBBSKeJDl8FDnjHXkuMCh6OmbshqdMjBPBgNVHSMESDBGgBSKeJDl8FDnjHXk
|
||||
uMCh6OmbshqdMqEYpBYwFDESMBAGA1UEAwwJSkZfc2VydmVyghRd7fuTPbKqDIvb
|
||||
Fd+9oZHOXPvLBjAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0B
|
||||
AQsFAAOCAQEARIg2x4Tit/6ZydMlle6ku32t75OMCVQoe7fUkRjNe8pCkZjZXLy9
|
||||
QIRwoqW3FRT8+mQjctZk3NsyLStF8Rc/fFvpjGY/hiEQ/RV1K2/IZ9hcswp/LRzQ
|
||||
ElDwXhe4zlcDT10GjHYYx221SR+ijgicZcaXgb9f3uZKIrPgyb8qB4KCQS8gPtCV
|
||||
1VmPM5/svVCI93G+xT92XBHa47fgV5GEn7Snah2UgFol5h7/KX/Sa2q0pfBlzqmt
|
||||
CutfEbYcwSxkoLsEUIW8KMoEAIsO+KIsraS6EXlRdT82Ui+UZWVPZABlzifCl+AV
|
||||
LzBrLwt2OeoEI1h65EyzzE7gDsjrE3JR/Q==
|
||||
-----END CERTIFICATE-----
|
||||
</ca>
|
||||
<cert>
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
35:09:16:22:41:a8:78:05:b5:72:26:31:6e:c3:94:02
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Issuer: CN=JF_server
|
||||
Validity
|
||||
Not Before: Jul 3 19:11:30 2023 GMT
|
||||
Not After : Oct 5 19:11:30 2025 GMT
|
||||
Subject: CN=edgerouterchambly
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: id-ecPublicKey
|
||||
Public-Key: (384 bit)
|
||||
pub:
|
||||
04:0e:fd:1c:60:83:5f:a7:64:79:a0:35:74:df:c0:
|
||||
63:68:c5:3c:b1:02:95:a9:73:58:a9:a3:74:cc:d8:
|
||||
5b:d8:7a:ab:aa:d3:1f:41:2d:68:86:bd:2f:e3:6c:
|
||||
73:b5:e8:01:73:b4:12:f4:71:dd:dd:cb:9b:4e:b0:
|
||||
f1:d4:04:00:d1:60:cf:fe:ea:3c:a5:f2:ae:ee:aa:
|
||||
45:a3:21:71:e5:d2:b7:f0:22:30:c4:d4:27:58:79:
|
||||
96:6c:f0:5c:ba:96:19
|
||||
ASN1 OID: secp384r1
|
||||
NIST CURVE: P-384
|
||||
X509v3 extensions:
|
||||
X509v3 Basic Constraints:
|
||||
CA:FALSE
|
||||
X509v3 Subject Key Identifier:
|
||||
C1:2A:D4:21:E9:F3:08:CB:87:23:CC:2D:52:A3:DF:8F:BB:CF:BB:5A
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:8A:78:90:E5:F0:50:E7:8C:75:E4:B8:C0:A1:E8:E9:9B:B2:1A:9D:32
|
||||
DirName:/CN=JF_server
|
||||
serial:5D:ED:FB:93:3D:B2:AA:0C:8B:DB:15:DF:BD:A1:91:CE:5C:FB:CB:06
|
||||
X509v3 Extended Key Usage:
|
||||
TLS Web Client Authentication
|
||||
X509v3 Key Usage:
|
||||
Digital Signature
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Signature Value:
|
||||
2e:c6:3c:76:fd:64:a8:ab:c7:02:86:e8:80:d5:a6:8b:2f:ed:
|
||||
be:70:cd:96:23:a5:86:1f:19:0c:72:7b:0b:ec:d2:58:ad:39:
|
||||
1d:ee:63:52:55:a3:f2:47:87:12:56:ad:cd:a1:ed:0d:ed:27:
|
||||
55:4c:9b:47:cf:e8:d7:a2:70:d7:8a:d2:60:7e:57:b4:02:0d:
|
||||
96:46:57:9d:f9:05:cf:f1:91:5c:1e:e2:a7:79:e1:5b:fe:46:
|
||||
7a:1b:ab:bb:c0:0a:a5:70:68:83:88:1a:62:8a:36:4c:98:9c:
|
||||
85:31:40:6b:ad:a7:11:d3:a3:cb:d9:8a:f3:e8:d4:2c:bd:8a:
|
||||
66:57:ca:bb:ad:d9:b1:cf:6a:83:88:e3:5e:a4:2e:5b:7e:50:
|
||||
26:16:5c:34:cd:6c:9b:35:d9:61:ef:63:87:7c:2a:2d:f0:dd:
|
||||
ce:ab:9d:7e:14:46:98:d9:cb:9a:68:91:fb:a3:59:85:91:d5:
|
||||
4f:0c:ee:e3:47:df:7c:93:f8:05:ec:0a:d1:84:dc:21:0f:8e:
|
||||
6d:b5:14:e8:a3:bd:ea:21:1c:d1:5a:95:36:95:98:20:f0:0e:
|
||||
07:54:56:27:d9:6d:cc:c6:09:f1:98:1c:69:d7:1b:52:0c:54:
|
||||
38:32:fe:c6:50:07:74:ef:8c:05:03:bf:55:e0:c7:3b:e5:20:
|
||||
f2:84:3e:9f
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICrTCCAZWgAwIBAgIQNQkWIkGoeAW1ciYxbsOUAjANBgkqhkiG9w0BAQsFADAU
|
||||
MRIwEAYDVQQDDAlKRl9zZXJ2ZXIwHhcNMjMwNzAzMTkxMTMwWhcNMjUxMDA1MTkx
|
||||
MTMwWjAcMRowGAYDVQQDDBFlZGdlcm91dGVyY2hhbWJseTB2MBAGByqGSM49AgEG
|
||||
BSuBBAAiA2IABA79HGCDX6dkeaA1dN/AY2jFPLEClalzWKmjdMzYW9h6q6rTH0Et
|
||||
aIa9L+Nsc7XoAXO0EvRx3d3Lm06w8dQEANFgz/7qPKXyru6qRaMhceXSt/AiMMTU
|
||||
J1h5lmzwXLqWGaOBoDCBnTAJBgNVHRMEAjAAMB0GA1UdDgQWBBTBKtQh6fMIy4cj
|
||||
zC1So9+Pu8+7WjBPBgNVHSMESDBGgBSKeJDl8FDnjHXkuMCh6OmbshqdMqEYpBYw
|
||||
FDESMBAGA1UEAwwJSkZfc2VydmVyghRd7fuTPbKqDIvbFd+9oZHOXPvLBjATBgNV
|
||||
HSUEDDAKBggrBgEFBQcDAjALBgNVHQ8EBAMCB4AwDQYJKoZIhvcNAQELBQADggEB
|
||||
AC7GPHb9ZKirxwKG6IDVposv7b5wzZYjpYYfGQxyewvs0litOR3uY1JVo/JHhxJW
|
||||
rc2h7Q3tJ1VMm0fP6NeicNeK0mB+V7QCDZZGV535Bc/xkVwe4qd54Vv+Rnobq7vA
|
||||
CqVwaIOIGmKKNkyYnIUxQGutpxHTo8vZivPo1Cy9imZXyrut2bHPaoOI416kLlt+
|
||||
UCYWXDTNbJs12WHvY4d8Ki3w3c6rnX4URpjZy5pokfujWYWR1U8M7uNH33yT+AXs
|
||||
CtGE3CEPjm21FOijveohHNFalTaVmCDwDgdUVifZbczGCfGYHGnXG1IMVDgy/sZQ
|
||||
B3TvjAUDv1XgxzvlIPKEPp8=
|
||||
-----END CERTIFICATE-----
|
||||
</cert>
|
||||
<key>
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDBqi8oQrEZFRfpOG5wQ
|
||||
SmAudNxbJ/KbfK5rdFM5uEhzVoz+kc3hk/7sQU+pBESv14uhZANiAAQO/Rxgg1+n
|
||||
ZHmgNXTfwGNoxTyxApWpc1ipo3TM2FvYequq0x9BLWiGvS/jbHO16AFztBL0cd3d
|
||||
y5tOsPHUBADRYM/+6jyl8q7uqkWjIXHl0rfwIjDE1CdYeZZs8Fy6lhk=
|
||||
-----END PRIVATE KEY-----
|
||||
</key>
|
||||
<tls-crypt>
|
||||
#
|
||||
# 2048 bit OpenVPN static key
|
||||
#
|
||||
-----BEGIN OpenVPN Static key V1-----
|
||||
4c828cbf0e58f927758e9471c1b6f03b
|
||||
2e77b2c634bad76df0570dd8f47184d6
|
||||
3921e25c6e6cbe4af4b64aad89d12425
|
||||
a9fca69ae08802b5ed583632c26678b0
|
||||
cc28c481c3831d1b2204dc30cd466395
|
||||
ccb8cd82cd2259c956b510c9a56e842a
|
||||
8693c44dca462f0ab7be3856abe9bbe1
|
||||
95a6ffd3b0237225b9497c7a0df05ad8
|
||||
2f2e0a8bff97c927d2890906d0105947
|
||||
fa3430fc779583772382534fb880add6
|
||||
8d5592fa4ff384d3e96c560019b5835f
|
||||
095da9b2fb33dbfbc1ffce9560908271
|
||||
ee96e02ccecc9d51b9dda79a77704a1d
|
||||
4407d7c805e6950854fe232adee02a12
|
||||
b09af2d9bfe04868a9e2e942dc64eb81
|
||||
9e062ab9f781e52d263195a58db72ebe
|
||||
-----END OpenVPN Static key V1-----
|
||||
</tls-crypt>
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,9 @@ CCANDeviceConfig::CCANDeviceConfig()
|
||||
mDeviceDescription = "Description du module";
|
||||
mDeviceName = "Nom du module";
|
||||
mDevicePollPeriod = 200;
|
||||
mDeviceWatchdogActivated = false;
|
||||
mWatchdogCANMsgID = 0x5050;
|
||||
mWatchdogPeriod = 4000;
|
||||
}
|
||||
|
||||
CCANDeviceConfig::CCANDeviceConfig(CCANDeviceConfig &Other)
|
||||
@ -25,7 +28,11 @@ QDataStream &operator>>(QDataStream &in, CCANDeviceConfig &dest)
|
||||
>> dest.mCANDeviceDatabaseFilename
|
||||
>> dest.mDeviceDescription
|
||||
>> dest.mDeviceName
|
||||
>> dest.mDevicePollPeriod;
|
||||
>> dest.mDevicePollPeriod
|
||||
>> dest.mDeviceWatchdogActivated
|
||||
>> dest.mWatchdogCANMsgID
|
||||
>> dest.mWatchdogPeriod
|
||||
;
|
||||
|
||||
return in;
|
||||
}
|
||||
@ -36,7 +43,11 @@ QDataStream &operator<<(QDataStream &out, const CCANDeviceConfig &source)
|
||||
<< source.mCANDeviceDatabaseFilename
|
||||
<< source.mDeviceDescription
|
||||
<< source.mDeviceName
|
||||
<< source.mDevicePollPeriod;
|
||||
<< source.mDevicePollPeriod
|
||||
<< source.mDeviceWatchdogActivated
|
||||
<< source.mWatchdogCANMsgID
|
||||
<< source.mWatchdogPeriod
|
||||
;
|
||||
return out;
|
||||
}
|
||||
|
||||
@ -53,6 +64,9 @@ CCANDeviceConfig& CCANDeviceConfig::operator=(const CCANDeviceConfig &source)
|
||||
this->mDeviceDescription = source.mDeviceDescription;
|
||||
this->mDeviceName = source.mDeviceName;
|
||||
this->mDevicePollPeriod = source.mDevicePollPeriod;
|
||||
this->mDeviceWatchdogActivated = source.mDeviceWatchdogActivated;
|
||||
this->mWatchdogCANMsgID = source.mWatchdogCANMsgID;
|
||||
this->mWatchdogPeriod = source.mWatchdogPeriod;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -18,6 +18,9 @@ public:
|
||||
QString mDeviceDescription;
|
||||
QString mDeviceName;
|
||||
unsigned int mDevicePollPeriod;
|
||||
bool mDeviceWatchdogActivated;
|
||||
unsigned int mWatchdogCANMsgID;
|
||||
unsigned int mWatchdogPeriod;
|
||||
|
||||
CCANDeviceConfig &operator=(const CCANDeviceConfig &source);
|
||||
};
|
||||
|
||||
@ -69,6 +69,9 @@ CCANbusSettingsPage::CCANbusSettingsPage(QWidget *parent) :
|
||||
ui->mDevicePollPeriodSpinBx->setEnabled(false);
|
||||
ui->mCancelModifyParamsBtn->hide();
|
||||
ui->mDeviceNameEditBx->setEnabled(false);
|
||||
ui->mWatchdogPollPeriodSpinBx->setEnabled(false);
|
||||
ui->mWatchdogMsgIDSpinBx->setEnabled(false);
|
||||
ui->mCANDeviceWatchdogActivateChkBx->setEnabled(false);
|
||||
|
||||
|
||||
connect(ui->mDevicesList,&QListWidget::itemSelectionChanged,this,&CCANbusSettingsPage::DeviceSelectionChanged);
|
||||
@ -78,6 +81,7 @@ CCANbusSettingsPage::CCANbusSettingsPage(QWidget *parent) :
|
||||
connect(ui->mDatabaseFileSelectBtn,&QPushButton::clicked,this,&CCANbusSettingsPage::SelectDBFileBtnPressed);
|
||||
connect(ui->mAddDeviceBtn,&QPushButton::clicked,this,&CCANbusSettingsPage::AddDeviceBtnPressed);
|
||||
connect(ui->mDeleteDeviceBtn,&QPushButton::clicked,this,&CCANbusSettingsPage::DeleteDeviceBtnPressed);
|
||||
connect(ui->mCANDeviceWatchdogActivateChkBx,&QCheckBox::stateChanged,this,&CCANbusSettingsPage::WatchdogActivationBoxChanged);
|
||||
|
||||
|
||||
}
|
||||
@ -161,6 +165,24 @@ int CCANbusSettingsPage::UpdatePage()
|
||||
// ui->mDatabaseFileNameLbl->setText(QString("%1").arg(Device->mCANDeviceDatabaseFilename));
|
||||
|
||||
ui->mDevicePollPeriodSpinBx->setValue(DevConfigInfo->mDevicePollPeriod);
|
||||
|
||||
if(DevConfigInfo->mDeviceWatchdogActivated == true)
|
||||
{
|
||||
disconnect(ui->mCANDeviceWatchdogActivateChkBx,&QCheckBox::stateChanged,this,&CCANbusSettingsPage::WatchdogActivationBoxChanged);
|
||||
ui->mCANDeviceWatchdogActivateChkBx->setCheckState(Qt::Checked);
|
||||
connect(ui->mCANDeviceWatchdogActivateChkBx,&QCheckBox::stateChanged,this,&CCANbusSettingsPage::WatchdogActivationBoxChanged);
|
||||
ui->mWatchdogMsgIDSpinBx->setValue(DevConfigInfo->mWatchdogCANMsgID);
|
||||
ui->mWatchdogPollPeriodSpinBx->setValue(DevConfigInfo->mWatchdogPeriod);
|
||||
}
|
||||
else
|
||||
{
|
||||
disconnect(ui->mCANDeviceWatchdogActivateChkBx,&QCheckBox::stateChanged,this,&CCANbusSettingsPage::WatchdogActivationBoxChanged);
|
||||
ui->mCANDeviceWatchdogActivateChkBx->setCheckState(Qt::Unchecked);
|
||||
connect(ui->mCANDeviceWatchdogActivateChkBx,&QCheckBox::stateChanged,this,&CCANbusSettingsPage::WatchdogActivationBoxChanged);
|
||||
ui->mWatchdogMsgIDSpinBx->setValue(1);
|
||||
ui->mWatchdogPollPeriodSpinBx->setValue(100);
|
||||
}
|
||||
|
||||
//update device database information
|
||||
ui->mDBMessagesListWidget->clear();
|
||||
ui->mDBSignalDetailsTable->clearContents();
|
||||
@ -184,6 +206,8 @@ int CCANbusSettingsPage::UpdatePage()
|
||||
|
||||
ui->mDBMessagesListWidget->setCurrentRow(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -374,6 +398,9 @@ int CCANbusSettingsPage::ModifyDeviceConfig()
|
||||
ModifiedDevice->mDeviceDescription = ui->mDeviceDescriptionTxtEdit->toPlainText();
|
||||
ModifiedDevice->mDeviceName = ui->mDeviceNameEditBx->toPlainText();
|
||||
ModifiedDevice->mDevicePollPeriod = ui->mDevicePollPeriodSpinBx->value();
|
||||
ModifiedDevice->mDeviceWatchdogActivated = ui->mCANDeviceWatchdogActivateChkBx->isChecked();
|
||||
ModifiedDevice->mWatchdogCANMsgID = ui->mWatchdogMsgIDSpinBx->value();
|
||||
ModifiedDevice->mWatchdogPeriod = ui->mWatchdogPollPeriodSpinBx->value();
|
||||
|
||||
mProgramPtr->SaveCANDevicesConfigRequest(&mDeviceConfigList);
|
||||
}
|
||||
@ -391,6 +418,9 @@ int CCANbusSettingsPage::ModifyDeviceConfig()
|
||||
ui->mCancelModifyParamsBtn->hide();
|
||||
ui->mDeviceNameEditBx->setEnabled(false);
|
||||
mDeviceChangeModeEnabled = false;
|
||||
ui->mWatchdogPollPeriodSpinBx->setEnabled(false);
|
||||
ui->mWatchdogMsgIDSpinBx->setEnabled(false);
|
||||
ui->mCANDeviceWatchdogActivateChkBx->setEnabled(false);
|
||||
ui->mAddDeviceBtn->setEnabled(true);
|
||||
|
||||
|
||||
@ -412,6 +442,13 @@ int CCANbusSettingsPage::ModifyDeviceConfig()
|
||||
ui->mCancelModifyParamsBtn->show();
|
||||
ui->mDeviceNameEditBx->setEnabled(true);
|
||||
ui->mAddDeviceBtn->setEnabled(true);
|
||||
ui->mCANDeviceWatchdogActivateChkBx->setEnabled(true);
|
||||
if(ui->mCANDeviceWatchdogActivateChkBx->isChecked())
|
||||
{
|
||||
ui->mWatchdogPollPeriodSpinBx->setEnabled(true);
|
||||
ui->mWatchdogMsgIDSpinBx->setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
mDeviceChangeModeEnabled = true;
|
||||
}
|
||||
@ -433,6 +470,9 @@ void CCANbusSettingsPage::CancelModifyDevBtnPressed()
|
||||
ui->mCancelModifyParamsBtn->hide();
|
||||
ui->mDeviceNameEditBx->setEnabled(false);
|
||||
ui->mAddDeviceBtn->setEnabled(true);
|
||||
ui->mWatchdogPollPeriodSpinBx->setEnabled(false);
|
||||
ui->mWatchdogMsgIDSpinBx->setEnabled(false);
|
||||
ui->mCANDeviceWatchdogActivateChkBx->setEnabled(false);
|
||||
mDeviceChangeModeEnabled = false;
|
||||
|
||||
UpdatePage();
|
||||
@ -518,3 +558,19 @@ int CCANbusSettingsPage::PopulateDevicesConfigList()
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
void CCANbusSettingsPage::WatchdogActivationBoxChanged()
|
||||
{
|
||||
if(ui->mCANDeviceWatchdogActivateChkBx->isChecked())
|
||||
{
|
||||
ui->mWatchdogMsgIDSpinBx->setEnabled(true);
|
||||
ui->mWatchdogPollPeriodSpinBx->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->mWatchdogMsgIDSpinBx->setValue(1);
|
||||
ui->mWatchdogPollPeriodSpinBx->setValue(100);
|
||||
ui->mWatchdogMsgIDSpinBx->setEnabled(false);
|
||||
ui->mWatchdogPollPeriodSpinBx->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,6 +50,7 @@ public slots:
|
||||
void SelectDBFileBtnPressed();
|
||||
void AddDeviceBtnPressed();
|
||||
void DeleteDeviceBtnPressed();
|
||||
void WatchdogActivationBoxChanged();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
<x>270</x>
|
||||
<y>100</y>
|
||||
<width>321</width>
|
||||
<height>371</height>
|
||||
<height>461</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
@ -118,8 +118,8 @@
|
||||
<widget class="QPushButton" name="mModifyDevParamsBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>330</y>
|
||||
<x>210</x>
|
||||
<y>420</y>
|
||||
<width>80</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -215,8 +215,8 @@
|
||||
<widget class="QPushButton" name="mCancelModifyParamsBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>330</y>
|
||||
<x>20</x>
|
||||
<y>420</y>
|
||||
<width>80</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -256,6 +256,120 @@
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mCANDeviceWatchdogActivateChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>320</y>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Activer Watchdog</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="mWatchdogPollPeriodSpinBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>350</y>
|
||||
<width>91</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="displayIntegerBase">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mRefreshRateLbl_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>350</y>
|
||||
<width>181</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Période rafraîchissement (ms):</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mWatchdogMsgIDLbl">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>380</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CAN Msg ID (HEX):</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mWatchdogMsgIDPrefixLbl">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>380</y>
|
||||
<width>30</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0x</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="mWatchdogMsgIDSpinBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>380</y>
|
||||
<width>91</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="displayIntegerBase">
|
||||
<number>16</number>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="mDatabaseGroupBox">
|
||||
<property name="geometry">
|
||||
|
||||
Binary file not shown.
@ -11,6 +11,7 @@
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QGroupBox>
|
||||
#include <QtWidgets/QHeaderView>
|
||||
@ -45,6 +46,12 @@ public:
|
||||
QPushButton *mCancelModifyParamsBtn;
|
||||
QPlainTextEdit *mDeviceNameEditBx;
|
||||
QSpinBox *mCANDeviceIDSpinBx;
|
||||
QCheckBox *mCANDeviceWatchdogActivateChkBx;
|
||||
QSpinBox *mWatchdogPollPeriodSpinBx;
|
||||
QLabel *mRefreshRateLbl_2;
|
||||
QLabel *mWatchdogMsgIDLbl;
|
||||
QLabel *mWatchdogMsgIDPrefixLbl;
|
||||
QSpinBox *mWatchdogMsgIDSpinBx;
|
||||
QGroupBox *mDatabaseGroupBox;
|
||||
QLabel *mDBMessageNameLbl;
|
||||
QLabel *mDBMessageIDLbl;
|
||||
@ -77,7 +84,7 @@ public:
|
||||
label_2->setGeometry(QRect(52, 100, 81, 16));
|
||||
mDeviceParamsGroupBox = new QGroupBox(CCANbusSettingsPage);
|
||||
mDeviceParamsGroupBox->setObjectName(QString::fromUtf8("mDeviceParamsGroupBox"));
|
||||
mDeviceParamsGroupBox->setGeometry(QRect(270, 100, 321, 371));
|
||||
mDeviceParamsGroupBox->setGeometry(QRect(270, 100, 321, 461));
|
||||
mCANIDLbl = new QLabel(mDeviceParamsGroupBox);
|
||||
mCANIDLbl->setObjectName(QString::fromUtf8("mCANIDLbl"));
|
||||
mCANIDLbl->setGeometry(QRect(10, 66, 121, 16));
|
||||
@ -94,7 +101,7 @@ public:
|
||||
mCANBaudrateComboBx->setGeometry(QRect(100, 90, 131, 21));
|
||||
mModifyDevParamsBtn = new QPushButton(mDeviceParamsGroupBox);
|
||||
mModifyDevParamsBtn->setObjectName(QString::fromUtf8("mModifyDevParamsBtn"));
|
||||
mModifyDevParamsBtn->setGeometry(QRect(220, 330, 80, 22));
|
||||
mModifyDevParamsBtn->setGeometry(QRect(210, 420, 80, 22));
|
||||
mDeviceDescriptionTxtEdit = new QTextEdit(mDeviceParamsGroupBox);
|
||||
mDeviceDescriptionTxtEdit->setObjectName(QString::fromUtf8("mDeviceDescriptionTxtEdit"));
|
||||
mDeviceDescriptionTxtEdit->setGeometry(QRect(10, 210, 291, 101));
|
||||
@ -121,7 +128,7 @@ public:
|
||||
mDevicePollPeriodSpinBx->setGeometry(QRect(200, 180, 91, 22));
|
||||
mCancelModifyParamsBtn = new QPushButton(mDeviceParamsGroupBox);
|
||||
mCancelModifyParamsBtn->setObjectName(QString::fromUtf8("mCancelModifyParamsBtn"));
|
||||
mCancelModifyParamsBtn->setGeometry(QRect(30, 330, 80, 22));
|
||||
mCancelModifyParamsBtn->setGeometry(QRect(20, 420, 80, 22));
|
||||
mDeviceNameEditBx = new QPlainTextEdit(mDeviceParamsGroupBox);
|
||||
mDeviceNameEditBx->setObjectName(QString::fromUtf8("mDeviceNameEditBx"));
|
||||
mDeviceNameEditBx->setGeometry(QRect(13, 23, 281, 31));
|
||||
@ -131,6 +138,36 @@ public:
|
||||
mCANDeviceIDSpinBx->setGeometry(QRect(130, 60, 71, 22));
|
||||
mCANDeviceIDSpinBx->setMinimum(1);
|
||||
mCANDeviceIDSpinBx->setMaximum(255);
|
||||
mCANDeviceWatchdogActivateChkBx = new QCheckBox(mDeviceParamsGroupBox);
|
||||
mCANDeviceWatchdogActivateChkBx->setObjectName(QString::fromUtf8("mCANDeviceWatchdogActivateChkBx"));
|
||||
mCANDeviceWatchdogActivateChkBx->setGeometry(QRect(10, 320, 131, 20));
|
||||
mWatchdogPollPeriodSpinBx = new QSpinBox(mDeviceParamsGroupBox);
|
||||
mWatchdogPollPeriodSpinBx->setObjectName(QString::fromUtf8("mWatchdogPollPeriodSpinBx"));
|
||||
mWatchdogPollPeriodSpinBx->setGeometry(QRect(200, 350, 91, 20));
|
||||
mWatchdogPollPeriodSpinBx->setMinimum(100);
|
||||
mWatchdogPollPeriodSpinBx->setMaximum(999999);
|
||||
mWatchdogPollPeriodSpinBx->setValue(100);
|
||||
mWatchdogPollPeriodSpinBx->setDisplayIntegerBase(10);
|
||||
mRefreshRateLbl_2 = new QLabel(mDeviceParamsGroupBox);
|
||||
mRefreshRateLbl_2->setObjectName(QString::fromUtf8("mRefreshRateLbl_2"));
|
||||
mRefreshRateLbl_2->setGeometry(QRect(10, 350, 181, 16));
|
||||
mRefreshRateLbl_2->setFont(font1);
|
||||
mWatchdogMsgIDLbl = new QLabel(mDeviceParamsGroupBox);
|
||||
mWatchdogMsgIDLbl->setObjectName(QString::fromUtf8("mWatchdogMsgIDLbl"));
|
||||
mWatchdogMsgIDLbl->setGeometry(QRect(10, 380, 111, 16));
|
||||
mWatchdogMsgIDLbl->setFont(font1);
|
||||
mWatchdogMsgIDPrefixLbl = new QLabel(mDeviceParamsGroupBox);
|
||||
mWatchdogMsgIDPrefixLbl->setObjectName(QString::fromUtf8("mWatchdogMsgIDPrefixLbl"));
|
||||
mWatchdogMsgIDPrefixLbl->setGeometry(QRect(110, 380, 30, 20));
|
||||
mWatchdogMsgIDPrefixLbl->setFont(font1);
|
||||
mWatchdogMsgIDPrefixLbl->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
|
||||
mWatchdogMsgIDSpinBx = new QSpinBox(mDeviceParamsGroupBox);
|
||||
mWatchdogMsgIDSpinBx->setObjectName(QString::fromUtf8("mWatchdogMsgIDSpinBx"));
|
||||
mWatchdogMsgIDSpinBx->setGeometry(QRect(140, 380, 91, 20));
|
||||
mWatchdogMsgIDSpinBx->setMinimum(1);
|
||||
mWatchdogMsgIDSpinBx->setMaximum(999999);
|
||||
mWatchdogMsgIDSpinBx->setValue(1);
|
||||
mWatchdogMsgIDSpinBx->setDisplayIntegerBase(16);
|
||||
mDatabaseGroupBox = new QGroupBox(CCANbusSettingsPage);
|
||||
mDatabaseGroupBox->setObjectName(QString::fromUtf8("mDatabaseGroupBox"));
|
||||
mDatabaseGroupBox->setGeometry(QRect(620, 100, 711, 491));
|
||||
@ -196,6 +233,10 @@ public:
|
||||
mDatabaseFileNameLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Fichier...", nullptr));
|
||||
mDatabaseFileSelectBtn->setText(QCoreApplication::translate("CCANbusSettingsPage", "...", nullptr));
|
||||
mCancelModifyParamsBtn->setText(QCoreApplication::translate("CCANbusSettingsPage", "Annuler", nullptr));
|
||||
mCANDeviceWatchdogActivateChkBx->setText(QCoreApplication::translate("CCANbusSettingsPage", "Activer Watchdog", nullptr));
|
||||
mRefreshRateLbl_2->setText(QCoreApplication::translate("CCANbusSettingsPage", "P\303\251riode rafra\303\256chissement (ms):", nullptr));
|
||||
mWatchdogMsgIDLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "CAN Msg ID (HEX):", nullptr));
|
||||
mWatchdogMsgIDPrefixLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "0x", nullptr));
|
||||
mDatabaseGroupBox->setTitle(QCoreApplication::translate("CCANbusSettingsPage", "Database", nullptr));
|
||||
mDBMessageNameLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Message Name: ", nullptr));
|
||||
mDBMessageIDLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Message ID: ", nullptr));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user