Compare commits

..

10 Commits

64 changed files with 27591 additions and 10117 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -140,6 +140,7 @@ ifconfig-pool-persist /var/log/openvpn/ipp.txt
# address pool (10.8.0.0/255.255.255.0) # address pool (10.8.0.0/255.255.255.0)
# back to the OpenVPN server. # back to the OpenVPN server.
push "route 192.168.10.0 255.255.255.0" push "route 192.168.10.0 255.255.255.0"
push "route 192.168.11.0 255.255.255.0"
;push "route 192.168.30.0 255.255.255.0" ;push "route 192.168.30.0 255.255.255.0"
# To assign specific IP addresses to specific # To assign specific IP addresses to specific
@ -156,6 +157,7 @@ push "route 192.168.10.0 255.255.255.0"
client-config-dir ccd client-config-dir ccd
;route 192.168.40.128 255.255.255.248 ;route 192.168.40.128 255.255.255.248
route 192.168.10.0 255.255.255.0 route 192.168.10.0 255.255.255.0
route 192.168.11.0 255.255.255.0
# Then create a file ccd/Thelonious with this line: # Then create a file ccd/Thelonious with this line:
# iroute 192.168.40.128 255.255.255.248 # iroute 192.168.40.128 255.255.255.248

269
OpenVPN/stationKA2401.ovpn Normal file
View File

@ -0,0 +1,269 @@
##############################################
# 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 138.197.151.172 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:
78:5e:57:99:93:be:f2:47:da:cc:6c:8e:0d:71:3d:f8
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=JF_server
Validity
Not Before: May 5 13:33:22 2024 GMT
Not After : Aug 8 13:33:22 2026 GMT
Subject: CN=stationKA2401
Subject Public Key Info:
Public Key Algorithm: id-ecPublicKey
Public-Key: (384 bit)
pub:
04:8f:4f:26:6b:af:cb:49:0b:74:3e:65:aa:0e:9a:
9a:57:99:b1:f6:bf:dc:74:ae:d6:72:ed:d3:a8:04:
2f:a8:a0:43:63:f6:c8:e2:cd:dc:d8:fd:bf:69:93:
09:d7:bd:11:ab:d9:c5:ae:20:bc:00:ac:d7:ad:ea:
fb:c0:1e:44:6f:ba:20:63:9d:32:f7:38:8f:c0:d7:
bf:b4:23:15:16:4d:84:59:13:d5:4b:de:9e:7b:46:
d3:ce:ba:5d:d9:53:c4
ASN1 OID: secp384r1
NIST CURVE: P-384
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
68:18:F5:54:75:30:27:4D:B5:96:D3:34:8E:1C:3B:58:1E:BC:1B:78
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:
67:97:34:79:07:29:c3:cd:a6:7c:86:82:aa:94:0b:ca:69:ef:
79:5e:a6:35:97:c3:31:07:9f:cd:aa:89:95:e3:b1:26:4b:e9:
88:50:1f:3e:10:eb:d2:82:c5:6e:56:18:1e:ff:72:60:c1:de:
11:af:b8:e6:b6:bb:de:7d:52:f5:ba:1b:9b:4e:49:b2:05:25:
0a:e9:8a:f8:85:f7:0e:c8:db:fd:c4:b9:e9:a9:6f:85:0a:cb:
63:a3:d0:a7:77:e0:7f:ff:34:29:90:80:66:a7:8d:80:6a:bf:
23:74:80:77:ad:53:2d:5e:f6:02:d1:05:3f:9f:fa:17:11:8f:
7f:b4:a5:44:74:2b:57:1e:4b:7e:29:c8:95:48:a6:3a:fc:ae:
82:c2:7b:b2:26:4f:92:d5:af:73:71:30:8e:b6:b9:6a:f2:b0:
00:df:44:a2:3f:cd:4a:45:7e:ed:43:4b:d4:0e:07:25:94:37:
e0:5d:8d:0b:1b:fb:76:07:d0:41:da:c9:f3:19:fa:28:8b:46:
df:5a:19:82:ee:1e:e0:1a:be:39:c1:a9:65:b1:02:92:32:96:
2c:7e:3f:4e:ce:9e:b0:66:57:b4:74:2c:98:de:13:da:b2:27:
e5:7a:5b:30:df:3e:46:1b:6c:92:53:6f:c6:0e:88:6f:0d:ae:
89:ca:ea:ea
-----BEGIN CERTIFICATE-----
MIICqTCCAZGgAwIBAgIQeF5XmZO+8kfazGyODXE9+DANBgkqhkiG9w0BAQsFADAU
MRIwEAYDVQQDDAlKRl9zZXJ2ZXIwHhcNMjQwNTA1MTMzMzIyWhcNMjYwODA4MTMz
MzIyWjAYMRYwFAYDVQQDDA1zdGF0aW9uS0EyNDAxMHYwEAYHKoZIzj0CAQYFK4EE
ACIDYgAEj08ma6/LSQt0PmWqDpqaV5mx9r/cdK7Wcu3TqAQvqKBDY/bI4s3c2P2/
aZMJ170Rq9nFriC8AKzXrer7wB5Eb7ogY50y9ziPwNe/tCMVFk2EWRPVS96ee0bT
zrpd2VPEo4GgMIGdMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGgY9VR1MCdNtZbTNI4c
O1gevBt4ME8GA1UdIwRIMEaAFIp4kOXwUOeMdeS4wKHo6ZuyGp0yoRikFjAUMRIw
EAYDVQQDDAlKRl9zZXJ2ZXKCFF3t+5M9sqoMi9sV372hkc5c+8sGMBMGA1UdJQQM
MAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0BAQsFAAOCAQEAZ5c0
eQcpw82mfIaCqpQLymnveV6mNZfDMQefzaqJleOxJkvpiFAfPhDr0oLFblYYHv9y
YMHeEa+45ra73n1S9bobm05JsgUlCumK+IX3Dsjb/cS56alvhQrLY6PQp3fgf/80
KZCAZqeNgGq/I3SAd61TLV72AtEFP5/6FxGPf7SlRHQrVx5LfinIlUimOvyugsJ7
siZPktWvc3Ewjra5avKwAN9Eoj/NSkV+7UNL1A4HJZQ34F2NCxv7dgfQQdrJ8xn6
KItG31oZgu4e4Bq+OcGpZbECkjKWLH4/Ts6esGZXtHQsmN4T2rIn5XpbMN8+Rhts
klNvxg6Ibw2uicrq6g==
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDCqirzGpSX6ei53uFLm
GTcOHVuwJL0ut2FF+GghDE9CAc/up9n1u8xmfvI0/KEueYehZANiAASPTyZrr8tJ
C3Q+ZaoOmppXmbH2v9x0rtZy7dOoBC+ooENj9sjizdzY/b9pkwnXvRGr2cWuILwA
rNet6vvAHkRvuiBjnTL3OI/A17+0IxUWTYRZE9VL3p57RtPOul3ZU8Q=
-----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.

View File

@ -3644,3 +3644,61 @@ Démarrage du logiciel Otarcik CAN le 2023-12-02 à 08:31:39
2023-12-02 08:31:39 Initialisation du dispositif [MasterCAN] 2023-12-02 08:31:39 Initialisation du dispositif [MasterCAN]
2023-12-02 08:31:39 Démarrage d'un module CAN... 2023-12-02 08:31:39 Démarrage d'un module CAN...
2023-12-02 08:31:39 Impossible de trouver le module CAN sur le channel 1 2023-12-02 08:31:39 Impossible de trouver le module CAN sur le channel 1
********************************************************************
Démarrage du logiciel Otarcik CAN le 2024-07-18 à 06:05:00
********************************************************************
2024-07-18 06:05:00 Chargement de la configuration système...
2024-07-18 06:05:00 Configuration système chargée avec succès!
2024-07-18 06:05:00 Initialisation du dispositif [MasterCAN]
2024-07-18 06:05:00 Démarrage d'un module CAN...
2024-07-18 06:05:00 Impossible de trouver le module CAN sur le channel 1
********************************************************************
Démarrage du logiciel Otarcik CAN le 2024-07-18 à 06:13:46
********************************************************************
2024-07-18 06:13:46 Librairie Axiomtek chargée avec succès
2024-07-18 06:13:46 Watchdog CPU arrêté
2024-07-18 06:13:46 Chargement de la configuration système...
2024-07-18 06:13:46 Configuration système chargée avec succès!
2024-07-18 06:13:46 Initialisation du dispositif [MasterCAN]
2024-07-18 06:13:46 Démarrage d'un module CAN...
2024-07-18 06:13:46 Impossible de trouver le module CAN sur le channel 1
********************************************************************
Démarrage du logiciel Otarcik CAN le 2024-07-18 à 06:19:05
********************************************************************
2024-07-18 06:19:06 Librairie Axiomtek chargée avec succès
2024-07-18 06:19:06 Watchdog CPU arrêté
2024-07-18 06:19:06 Chargement de la configuration système...
2024-07-18 06:19:06 Configuration système chargée avec succès!
2024-07-18 06:19:06 Initialisation du dispositif [MasterCAN]
2024-07-18 06:19:06 Démarrage d'un module CAN...
2024-07-18 06:19:06 Impossible de trouver le module CAN sur le channel 1
********************************************************************
Démarrage du logiciel Otarcik CAN le 2024-07-18 à 06:19:16
********************************************************************
2024-07-18 06:19:16 Librairie Axiomtek chargée avec succès
2024-07-18 06:19:16 Watchdog CPU arrêté
2024-07-18 06:19:16 Chargement de la configuration système...
2024-07-18 06:19:16 Configuration système chargée avec succès!
2024-07-18 06:19:16 Initialisation du dispositif [MasterCAN]
2024-07-18 06:19:16 Démarrage d'un module CAN...
2024-07-18 06:19:16 Impossible de trouver le module CAN sur le channel 1
********************************************************************
Démarrage du logiciel Otarcik CAN le 2024-07-18 à 06:27:00
********************************************************************
2024-07-18 06:27:00 Librairie Axiomtek chargée avec succès
2024-07-18 06:27:00 Watchdog CPU arrêté
2024-07-18 06:27:00 Chargement de la configuration système...
2024-07-18 06:27:00 Configuration système chargée avec succès!
2024-07-18 06:27:00 Initialisation du dispositif [MasterCAN]
2024-07-18 06:27:00 Démarrage d'un module CAN...
2024-07-18 06:27:00 Impossible de trouver le module CAN sur le channel 1

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -3,16 +3,16 @@
# Generated by qmake (3.1) (Qt 5.14.2) # Generated by qmake (3.1) (Qt 5.14.2)
# Project: Otarcik_CAN.pro # Project: Otarcik_CAN.pro
# Template: app # Template: app
# Command: C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\qmake.exe -o Makefile Otarcik_CAN.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" # Command: C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\qmake.exe -o Makefile Otarcik_CAN.pro -spec win32-g++
############################################################################# #############################################################################
MAKEFILE = Makefile MAKEFILE = Makefile
EQ = = EQ = =
first: debug first: release
install: debug-install install: release-install
uninstall: debug-uninstall uninstall: release-uninstall
QMAKE = C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\qmake.exe QMAKE = C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin\qmake.exe
DEL_FILE = del DEL_FILE = del
CHK_DIR_EXISTS= if not exist CHK_DIR_EXISTS= if not exist
@ -37,24 +37,10 @@ RES_FILE =
SED = $(QMAKE) -install sed SED = $(QMAKE) -install sed
MOVE = move MOVE = move
SUBTARGETS = \ SUBTARGETS = \
debug \ release \
release debug
debug: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_first: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-all: FORCE
$(MAKE) -f $(MAKEFILE).Debug all
debug-clean: FORCE
$(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: FORCE
$(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: FORCE
$(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Debug uninstall
release: FORCE release: FORCE
$(MAKE) -f $(MAKEFILE).Release $(MAKE) -f $(MAKEFILE).Release
release-make_first: FORCE release-make_first: FORCE
@ -69,6 +55,20 @@ release-install: FORCE
$(MAKE) -f $(MAKEFILE).Release install $(MAKE) -f $(MAKEFILE).Release install
release-uninstall: FORCE release-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Release uninstall $(MAKE) -f $(MAKEFILE).Release uninstall
debug: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_first: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-all: FORCE
$(MAKE) -f $(MAKEFILE).Debug all
debug-clean: FORCE
$(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: FORCE
$(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: FORCE
$(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Debug uninstall
Makefile: Otarcik_CAN.pro C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++/qmake.conf C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf \ Makefile: Otarcik_CAN.pro C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++/qmake.conf C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/qdevice.pri \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/qdevice.pri \
@ -220,6 +220,8 @@ Makefile: Otarcik_CAN.pro C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++/qma
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_windowsuiautomation_support_private.pri \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_windowsuiautomation_support_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras.pri \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras_private.pri \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xlsx.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xlsx_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml.pri \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml_private.pri \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml_private.pri \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xmlpatterns.pri \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xmlpatterns.pri \
@ -237,7 +239,6 @@ Makefile: Otarcik_CAN.pro C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++/qma
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resolve_config.prf \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resolve_config.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exclusive_builds_post.prf \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exclusive_builds_post.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/default_post.prf \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/default_post.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qml_debug.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/precompile_header.prf \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/precompile_header.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/warn_on.prf \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/warn_on.prf \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt.prf \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt.prf \
@ -258,11 +259,10 @@ Makefile: Otarcik_CAN.pro C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/win32-g++/qma
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Gui.prl \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Gui.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Mqtt.prl \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Mqtt.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Network.prl \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Network.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5SerialPort.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Core.prl \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Core.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/qtmain.prl \ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/qtmain.prl \
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/build_pass.prf C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/build_pass.prf
$(QMAKE) -o Makefile Otarcik_CAN.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" $(QMAKE) -o Makefile Otarcik_CAN.pro -spec win32-g++
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/qdevice.pri: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/qdevice.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/device_config.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/device_config.prf:
@ -413,6 +413,8 @@ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_widgets_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_windowsuiautomation_support_private.pri: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_windowsuiautomation_support_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras.pri: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras_private.pri: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_winextras_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xlsx.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xlsx_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml.pri: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml_private.pri: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xml_private.pri:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xmlpatterns.pri: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/modules/qt_lib_xmlpatterns.pri:
@ -430,7 +432,6 @@ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/win32/default_pre.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resolve_config.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/resolve_config.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exclusive_builds_post.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/exclusive_builds_post.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/default_post.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/default_post.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qml_debug.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/precompile_header.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/precompile_header.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/warn_on.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/warn_on.prf:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/qt.prf:
@ -451,37 +452,36 @@ C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Widgets.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Gui.prl: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Gui.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Mqtt.prl: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Mqtt.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Network.prl: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Network.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5SerialPort.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Core.prl: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/Qt5Core.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/qtmain.prl: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib/qtmain.prl:
C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/build_pass.prf: C:/Qt/Qt5.14.2/5.14.2/mingw73_64/mkspecs/features/build_pass.prf:
qmake: FORCE qmake: FORCE
@$(QMAKE) -o Makefile Otarcik_CAN.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" @$(QMAKE) -o Makefile Otarcik_CAN.pro -spec win32-g++
qmake_all: FORCE qmake_all: FORCE
make_first: debug-make_first release-make_first FORCE make_first: release-make_first debug-make_first FORCE
all: debug-all release-all FORCE all: release-all debug-all FORCE
clean: debug-clean release-clean FORCE clean: release-clean debug-clean FORCE
distclean: debug-distclean release-distclean FORCE distclean: release-distclean debug-distclean FORCE
-$(DEL_FILE) Makefile -$(DEL_FILE) Makefile
debug-mocclean:
$(MAKE) -f $(MAKEFILE).Debug mocclean
release-mocclean: release-mocclean:
$(MAKE) -f $(MAKEFILE).Release mocclean $(MAKE) -f $(MAKEFILE).Release mocclean
mocclean: debug-mocclean release-mocclean debug-mocclean:
$(MAKE) -f $(MAKEFILE).Debug mocclean
mocclean: release-mocclean debug-mocclean
debug-mocables:
$(MAKE) -f $(MAKEFILE).Debug mocables
release-mocables: release-mocables:
$(MAKE) -f $(MAKEFILE).Release mocables $(MAKE) -f $(MAKEFILE).Release mocables
mocables: debug-mocables release-mocables debug-mocables:
$(MAKE) -f $(MAKEFILE).Debug mocables
mocables: release-mocables debug-mocables
check: first check: first
benchmark: first benchmark: first
FORCE: FORCE:
$(MAKEFILE).Debug: Makefile
$(MAKEFILE).Release: Makefile $(MAKEFILE).Release: Makefile
$(MAKEFILE).Debug: Makefile

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
# #
#------------------------------------------------- #-------------------------------------------------
QT += gui network serialport mqtt QT += gui network mqtt
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@ -66,7 +66,7 @@ SOURCES += Sources/main.cpp \
Sources/DeviceDetectionConfig.cpp \ Sources/DeviceDetectionConfig.cpp \
Sources/LANDevicePresenceConfig.cpp \ Sources/LANDevicePresenceConfig.cpp \
Sources/LANDeviceMonitor.cpp \ Sources/LANDeviceMonitor.cpp \
Sources/LANDevicesPresenceMonitor.cpp Sources/LANDevicesPresenceMonitor.cpp \
HEADERS += Sources/MainWindow.h \ HEADERS += Sources/MainWindow.h \
Sources/PCANInterface.h \ Sources/PCANInterface.h \
@ -103,7 +103,8 @@ HEADERS += Sources/MainWindow.h \
Sources/DeviceDetectionConfig.h \ Sources/DeviceDetectionConfig.h \
Sources/LANDevicePresenceConfig.h \ Sources/LANDevicePresenceConfig.h \
Sources/LANDeviceMonitor.h \ Sources/LANDeviceMonitor.h \
Sources/LANDevicesPresenceMonitor.h Sources/LANDevicesPresenceMonitor.h \
FORMS += Sources/Gui/MainWindow.ui \ FORMS += Sources/Gui/MainWindow.ui \
Sources/Gui/GeneralStatusPage.ui \ Sources/Gui/GeneralStatusPage.ui \
@ -122,5 +123,5 @@ DEPENDPATH += $$PWD/Sources/PCAN \
$$PWD/Sources/Axiomtek \ $$PWD/Sources/Axiomtek \
win32: LIBS += -L$$PWD/Sources/KVASER/ -lkvaDbLib win32: LIBS += -L$$PWD/Sources/KVASER/ -lkvaDbLib
win32: LIBS += -L$$PWD/Sources/Axiomtek/ -lAxUfiAPIx64 #win32: LIBS += -L$$PWD/Sources/Axiomtek/ -lAxUfiAPIx64 #Commenter cette ligne si ENABLE_CHIPSET_DRIVER n'est pas défini dans defines.h

View File

@ -123,8 +123,16 @@
[START_SIGNALS] batt1_high_cell_t,8,1,0,I,127,-128,1,0.000000,1.000000,°C, [START_SIGNALS] batt1_high_cell_t,8,1,0,I,127,-128,1,0.000000,1.000000,°C,
[END_MSG] [END_MSG]
[START_MSG] PC_dateTime,768,8,1,1,S [START_MSG] PC_dateTime,768,8,9,1,S
[START_SIGNALS] internetSeemsDead,1,5,0,B,1,0,1,0.000000,1.000000,, [START_SIGNALS] internetSeemsDead,1,5,0,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] MQTTSeemsDead,1,5,1,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] LANDevice1SeemsDead,1,5,2,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] LANDevice2SeemsDead,1,5,3,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] LANDevice3SeemsDead,1,5,4,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] LANDevice4SeemsDead,1,5,5,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] LANDevice5SeemsDead,1,5,6,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] PC_Time,16,3,0,U,65535,0,1,0.000000,0.001000,,
[START_SIGNALS] PC_Date,16,1,0,U,65535,0,1,0.000000,1.000000,d,
[END_MSG] [END_MSG]
[START_MSG] WDT_state,512,8,0,1,S [START_MSG] WDT_state,512,8,0,1,S

View File

@ -93,17 +93,6 @@ int CCANDevice::Init()
return RET_GENERAL_ERROR; return RET_GENERAL_ERROR;
} }
if(mDeviceConfigInfo.mDeviceWatchdogActivated == true)
{
if(mCANWatchdog.Init(mCANDriverIF,mDeviceHandle,mDeviceConfigInfo.mWatchdogPeriod,mDeviceConfigInfo.mWatchdogCANMsgID) != RET_OK)
{
CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Impossible d'initialiser un watchdog CAN","CCANDevice",true,1,CGeneralMessagesLogDispatcher::GEN_MSG_TXT_ERROR_STATUS);
}
mCANWatchdog.StartWDT();
QString Log = QString("Watchdog CAN initialisé pour le module sur le channel %1").arg(mDeviceConfigInfo.mCANDeviceID);
CGeneralMessagesLogDispatcher::instance()->AddLogMessage(Log,"CCANDevice",true,1,CGeneralMessagesLogDispatcher::GEN_MSG_TXT_SUCCESS_STATUS);
}
mIsCANInitialized = true; mIsCANInitialized = true;
@ -120,6 +109,25 @@ int CCANDevice::Init()
return RET_OK; return RET_OK;
} }
int CCANDevice::StartWatchdog(CDeviceDetectionConfig *DeviceMonitorConfig)
{
if(mDeviceConfigInfo.mDeviceWatchdogActivated == true)
{
if(mCANWatchdog.Init(mCANDriverIF,mDeviceHandle,mDeviceConfigInfo.mWatchdogPeriod,DeviceMonitorConfig) != RET_OK)
{
CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Impossible d'initialiser un watchdog CAN","CCANDevice",true,1,CGeneralMessagesLogDispatcher::GEN_MSG_TXT_ERROR_STATUS);
}
else
{
mCANWatchdog.StartWDT();
QString Log = QString("Watchdog CAN initialisé pour le module sur le channel %1").arg(mDeviceConfigInfo.mCANDeviceID);
CGeneralMessagesLogDispatcher::instance()->AddLogMessage(Log,"CCANDevice",true,1,CGeneralMessagesLogDispatcher::GEN_MSG_TXT_SUCCESS_STATUS);
}
}
}
int CCANDevice::Init(QString DatabaseFileName, TPCANHandle CANDeviceID, TPCANBaudrate CANDeviceBaudRate, QString DevDescription, QString DeviceName, unsigned int DevicePollPeriod) int CCANDevice::Init(QString DatabaseFileName, TPCANHandle CANDeviceID, TPCANBaudrate CANDeviceBaudRate, QString DevDescription, QString DeviceName, unsigned int DevicePollPeriod)
{ {
mDeviceConfigInfo.mCANDeviceID = CANDeviceID; mDeviceConfigInfo.mCANDeviceID = CANDeviceID;

View File

@ -13,10 +13,11 @@
#include "CANDataLogger.h" #include "CANDataLogger.h"
#include "MQTTMessage.h" #include "MQTTMessage.h"
#include "CANWatchdog.h" #include "CANWatchdog.h"
//#include "MQTTClientWrapper.h"
class CMQTTClientWrapper; class CMQTTClientWrapper;
class COtarcikCan; class COtarcikCan;
class CDeviceDetectionConfig;
class CCANDevice : public QObject class CCANDevice : public QObject
{ {
@ -28,6 +29,7 @@ public:
int Init(QString DatabaseFileName, TPCANHandle CANDeviceID, TPCANBaudrate CANDeviceBaudRate, QString DevDescription, QString DeviceName, unsigned int DevicePollPeriod); int Init(QString DatabaseFileName, TPCANHandle CANDeviceID, TPCANBaudrate CANDeviceBaudRate, QString DevDescription, QString DeviceName, unsigned int DevicePollPeriod);
int Init(); int Init();
int StartWatchdog(CDeviceDetectionConfig *DeviceMonitorConfig);
QList<CCANMessage*> *GetCANMessagesList(){return &mMessageList;} QList<CCANMessage*> *GetCANMessagesList(){return &mMessageList;}
public: public:

View File

@ -23,6 +23,7 @@ public:
unsigned int mWatchdogPeriod; unsigned int mWatchdogPeriod;
CCANDeviceConfig &operator=(const CCANDeviceConfig &source); CCANDeviceConfig &operator=(const CCANDeviceConfig &source);
}; };
QDataStream &operator<<(QDataStream &out, const CCANDeviceConfig &source); QDataStream &operator<<(QDataStream &out, const CCANDeviceConfig &source);

View File

@ -4,21 +4,29 @@
#include <QDate> #include <QDate>
#include <QTime> #include <QTime>
#include <QFloat16> #include <QFloat16>
#include "MQTTClientWrapper.h"
#include "InternetMonitor.h"
#include "LANDevicesPresenceMonitor.h"
#include "DeviceDetectionConfig.h"
CCANWatchdog::CCANWatchdog() CCANWatchdog::CCANWatchdog()
{ {
mCANDriverIF = new CPCANInterface; //mCANDriverIF = new CPCANInterface;
mIsCANInitialized = false; mIsCANInitialized = false;
mWatchdogTimer = new QTimer; mWatchdogTimer = new QTimer;
mWatchdogTimer->setSingleShot(false); mWatchdogTimer->setSingleShot(false);
mCANDriverIF = 0; mCANDriverIF = 0;
mWDTInitialized = false; mWDTInitialized = false;
// mMQTTPresenceMonitor = 0;
// mLANDevicesMonitor = 0;
// mInternetMonitor = 0;
mDevicesMonitorConfig = 0;
connect(mWatchdogTimer,&QTimer::timeout,this,&CCANWatchdog::WatchdogTimeoutTimerExpired); connect(mWatchdogTimer,&QTimer::timeout,this,&CCANWatchdog::WatchdogTimeoutTimerExpired);
} }
int CCANWatchdog::Init(CPCANInterface *CANDriverIF, TPCANHandle CANDeviceHandle, unsigned int WDTPeriod, unsigned int CANMsgID) int CCANWatchdog::Init(CPCANInterface *CANDriverIF, TPCANHandle CANDeviceHandle, unsigned int WDTPeriod, CDeviceDetectionConfig *DevicesMonitorConfig)
{ {
if(WDTPeriod < 200) if(WDTPeriod < 200)
{ {
@ -27,6 +35,7 @@ int CCANWatchdog::Init(CPCANInterface *CANDriverIF, TPCANHandle CANDeviceHandle,
return RET_GENERAL_ERROR; return RET_GENERAL_ERROR;
} }
mDevicesMonitorConfig = DevicesMonitorConfig;
mCANDeviceHandle = CANDeviceHandle; mCANDeviceHandle = CANDeviceHandle;
mWDTPeriod = WDTPeriod; mWDTPeriod = WDTPeriod;
mCANDriverIF = CANDriverIF; mCANDriverIF = CANDriverIF;
@ -35,7 +44,7 @@ int CCANWatchdog::Init(CPCANInterface *CANDriverIF, TPCANHandle CANDeviceHandle,
mWatchdogTimer->setInterval(mWDTPeriod); mWatchdogTimer->setInterval(mWDTPeriod);
mWatchdogTimer->setSingleShot(false); mWatchdogTimer->setSingleShot(false);
mWDTCANMsg.mCANMsgID = CANMsgID; mWDTCANMsg.mCANMsgID = DevicesMonitorConfig->mReportingCANMsgID;
mWDTCANMsg.mCANMsgLength = 8; mWDTCANMsg.mCANMsgLength = 8;
mWDTCANMsg.mCANMsgData.clear(); mWDTCANMsg.mCANMsgData.clear();
mWDTCANMsg.mCANMsgData.append(8,(char)0x00); mWDTCANMsg.mCANMsgData.append(8,(char)0x00);
@ -65,7 +74,30 @@ void CCANWatchdog::WatchdogTimeoutTimerExpired()
// BigData |= 0x100000000; // BigData |= 0x100000000;
BigData = GetCANDateTimeBuffer(); BigData = GetCANDateTimeBuffer();
if(mDevicesMonitorConfig != 0)
{
if(mDevicesMonitorConfig->mInternetMonitor != 0)
{
BigData |= mDevicesMonitorConfig->mInternetMonitor->GetCANInternetStatusMask();
}
}
if(mDevicesMonitorConfig != 0)
{
if(mDevicesMonitorConfig->mMQTTPresenceMonitor != 0)
{
BigData |= mDevicesMonitorConfig->mMQTTPresenceMonitor->GetMQTTServerPresenceCANMask();
}
}
if(mDevicesMonitorConfig != 0)
{
if(mDevicesMonitorConfig->mLANDevicesMonitor != 0)
{
BigData |= mDevicesMonitorConfig->mLANDevicesMonitor->GetDevicesPresenceCANMask();
}
}
mWDTCANMsg.mCANMsgID = mDevicesMonitorConfig->mReportingCANMsgID;
mWDTCANMsg.SetRawData(BigData,CCANSignal::CAN_SIGNAL_ENCODING_INTEL); mWDTCANMsg.SetRawData(BigData,CCANSignal::CAN_SIGNAL_ENCODING_INTEL);
mCANDriverIF->SendCANMessage(mCANDeviceHandle,mWDTCANMsg); mCANDriverIF->SendCANMessage(mCANDeviceHandle,mWDTCANMsg);
@ -93,6 +125,11 @@ quint64 CCANWatchdog::GetCANDateTimeBuffer()
return OutputBuffer; return OutputBuffer;
} }
int CCANWatchdog::SetDevicesDetectionConfig(CDeviceDetectionConfig *DeviceMonitoringConfig)
{
mDevicesMonitorConfig = DeviceMonitoringConfig;
}
int CCANWatchdog::StartWDT() int CCANWatchdog::StartWDT()
{ {
if(mWDTInitialized == false) if(mWDTInitialized == false)

View File

@ -11,6 +11,11 @@
//Parker controller. This controller uses this update as a watchdog signal, but the register contains //Parker controller. This controller uses this update as a watchdog signal, but the register contains
//some useful data for the Parker controller as well. //some useful data for the Parker controller as well.
class CMQTTClientWrapper;
class CLANDevicesPresenceMonitor;
class CInternetMonitor;
class CDeviceDetectionConfig;
class CCANWatchdog: public QObject class CCANWatchdog: public QObject
{ {
Q_OBJECT Q_OBJECT
@ -18,11 +23,12 @@ class CCANWatchdog: public QObject
public: public:
CCANWatchdog(); CCANWatchdog();
int Init(CPCANInterface *CANDriverIF, TPCANHandle CANDeviceHandle, unsigned int WDTPeriod,unsigned int CANMsgID); int Init(CPCANInterface *CANDriverIF, TPCANHandle CANDeviceHandle, unsigned int WDTPeriod, CDeviceDetectionConfig *DevicesMonitorConfig);
int StartWDT(); int StartWDT();
int StopWDT(); int StopWDT();
bool IsInitialized(){return mWDTInitialized;} bool IsInitialized(){return mWDTInitialized;}
quint64 GetCANDateTimeBuffer(); quint64 GetCANDateTimeBuffer();
int SetDevicesDetectionConfig(CDeviceDetectionConfig *DeviceMonitoringConfig);
CPCANInterface *mCANDriverIF; CPCANInterface *mCANDriverIF;
unsigned int mWDTPeriod; unsigned int mWDTPeriod;
@ -30,10 +36,17 @@ public:
bool mWDTInitialized; bool mWDTInitialized;
CCANMessage mWDTCANMsg; CCANMessage mWDTCANMsg;
private: private:
bool mIsCANInitialized; bool mIsCANInitialized;
TPCANHandle mCANDeviceHandle; TPCANHandle mCANDeviceHandle;
// CMQTTClientWrapper *mMQTTPresenceMonitor;
// CLANDevicesPresenceMonitor *mLANDevicesMonitor;
// CInternetMonitor *mInternetMonitor;
CDeviceDetectionConfig *mDevicesMonitorConfig;
public slots: public slots:
void WatchdogTimeoutTimerExpired(); void WatchdogTimeoutTimerExpired();

View File

@ -2,13 +2,18 @@
#include "OtarcikCan.h" #include "OtarcikCan.h"
#include "CANDevice.h" #include "CANDevice.h"
#include "defines.h" #include "defines.h"
#ifdef ENABLE_CHIPSET_DRIVER
#include "ComputerBoardInterface.h" #include "ComputerBoardInterface.h"
#endif
CMQTTClientWrapper::CMQTTClientWrapper() CMQTTClientWrapper::CMQTTClientWrapper()
{ {
connect(&mMQTTClient,&QMqttClient::stateChanged,this,&CMQTTClientWrapper::StateChanged); connect(&mMQTTClient,&QMqttClient::stateChanged,this,&CMQTTClientWrapper::StateChanged);
connect(&mMQTTClient,&QMqttClient::errorChanged,this,&CMQTTClientWrapper::MQTTClientError); connect(&mMQTTClient,&QMqttClient::errorChanged,this,&CMQTTClientWrapper::MQTTClientError);
connect(&mMQTTClient,&QMqttClient::messageSent,this,&CMQTTClientWrapper::MQTTMessageSent); connect(&mMQTTClient,&QMqttClient::messageSent,this,&CMQTTClientWrapper::MQTTMessageSent);
// connect(&mMQTTClient,SIGNAL(messageSent(qint32)),this,SLOT(MQTTMessageSent(qint32)));
// connect(&mMQTTClient,&QMqttClient::messageStatusChanged,this,&CMQTTClientWrapper::MQTTMessageStatusChanged);
// connect(&mMQTTClient,SIGNAL(messageStatusChanged(qint32,QMqtt::MessageStatus,QMqttMessageStatusProperties)),this,SLOT(MQTTMessageStatusChanged(qint32,QMqtt::MessageStatus,QMqttMessageStatusProperties)));
mMQTTRefreshTimer = new QTimer; mMQTTRefreshTimer = new QTimer;
mMQTTRefreshTimer->setSingleShot(true); mMQTTRefreshTimer->setSingleShot(true);
connect(mMQTTRefreshTimer,&QTimer::timeout,this,&CMQTTClientWrapper::MQTTSendTimerExpired); connect(mMQTTRefreshTimer,&QTimer::timeout,this,&CMQTTClientWrapper::MQTTSendTimerExpired);
@ -24,14 +29,18 @@ CMQTTClientWrapper::CMQTTClientWrapper()
mMQTTQueueFlushTimer->stop(); mMQTTQueueFlushTimer->stop();
mProgramPtr = 0; mProgramPtr = 0;
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface = 0; mCPUInterface = 0;
#endif
mMQTTPresenceCANBit = 0;
mMessagesQueueMode = MQTT_DROP_MSG_MODE; mMessagesQueueMode = MQTT_DROP_MSG_MODE;
mDisconnectionIsVoluntary = false; mDisconnectionIsVoluntary = false;
mIsClientConnecting = false; mIsClientConnecting = false;
mCircularBufferStatusText = mBufferingModeText = mUploadTimeText = ""; mCircularBufferStatusText = mBufferingModeText = mUploadTimeText = "";
#ifdef MQTT_USE_TIMER_TO_FLUSH_QUEUE #ifdef ENABLE_DEVELOPMENT_DEBUG_TOOLS
mMQTTDisconnectionForced = false;
#endif #endif
} }
@ -48,9 +57,18 @@ int CMQTTClientWrapper::SetMQTTParams(CCloudParams *Params)
return RET_OK; return RET_OK;
} }
#ifdef ENABLE_CHIPSET_DRIVER
int CMQTTClientWrapper::SetCPUInterface(CComputerBoardInterface *CPUIF) int CMQTTClientWrapper::SetCPUInterface(CComputerBoardInterface *CPUIF)
{ {
mCPUInterface = CPUIF; mCPUInterface = CPUIF;
return RET_OK;
}
#endif
int CMQTTClientWrapper::SetMQTTServerPresenceCANBit(quint64 CANBit)
{
mMQTTPresenceCANBit = CANBit;
return RET_OK;
} }
int CMQTTClientWrapper::StartMQTTClient() int CMQTTClientWrapper::StartMQTTClient()
@ -83,15 +101,29 @@ int CMQTTClientWrapper::ConnectToBroker()
int CMQTTClientWrapper::DisconnectFromBroker() int CMQTTClientWrapper::DisconnectFromBroker()
{ {
#ifndef ENABLE_DEVELOPMENT_DEBUG_TOOLS
mMQTTClient.disconnectFromHost(); mMQTTClient.disconnectFromHost();
mDisconnectionIsVoluntary = true; mDisconnectionIsVoluntary = true;
mMessagesQueueMode = MQTT_DROP_MSG_MODE; //It's a voluntary disconnection... don't queue the CAN messages. mMessagesQueueMode = MQTT_DROP_MSG_MODE; //It's a voluntary disconnection... don't queue the CAN messages.
#else
mMQTTClient.disconnectFromHost();
if(mMQTTDisconnectionForced == true)
{
mDisconnectionIsVoluntary = false; //emulate an involuntary disconnection
}
else
{
mDisconnectionIsVoluntary = true;
mMessagesQueueMode = MQTT_DROP_MSG_MODE; //It's a voluntary disconnection... don't queue the CAN messages.
}
#endif
return RET_OK; return RET_OK;
} }
int CMQTTClientWrapper::NewMQTTMessages(QList<CMQTTMessage> MessagesList) int CMQTTClientWrapper::NewMQTTMessages(QList<CMQTTMessage> MessagesList)
{ {
Q_UNUSED(MessagesList)
// if(mMQTTClient.state() != QMqttClient::Connected) // if(mMQTTClient.state() != QMqttClient::Connected)
// { // {
// return RET_GENERAL_ERROR; // return RET_GENERAL_ERROR;
@ -120,6 +152,19 @@ int CMQTTClientWrapper::NewMQTTMessages(QList<CMQTTMessage> MessagesList)
return RET_OK; return RET_OK;
} }
quint64 CMQTTClientWrapper::GetMQTTServerPresenceCANMask()
{
if(mMQTTClient.state() == QMqttClient::Connected)
{
return 0;
}
quint64 Mask = 1;
Mask <<= mMQTTPresenceCANBit;
return Mask;
}
void CMQTTClientWrapper::StateChanged() void CMQTTClientWrapper::StateChanged()
{ {
switch(mMQTTClient.state()) switch(mMQTTClient.state())
@ -136,7 +181,14 @@ void CMQTTClientWrapper::StateChanged()
{ {
CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Client MQTT déconnecté.","CMQTTClientWrapper",true,1); CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Client MQTT déconnecté.","CMQTTClientWrapper",true,1);
mProgramPtr->SetMQTTConnectionSatusRequest(false); mProgramPtr->SetMQTTConnectionSatusRequest(false);
#ifndef ENABLE_DEVELOPMENT_DEBUG_TOOLS
mMQTTReconnectTimer->start(MQTT_CLIENT_RECONNECT_TIMEOUT); mMQTTReconnectTimer->start(MQTT_CLIENT_RECONNECT_TIMEOUT);
#else
if(mMQTTDisconnectionForced == false)
{
mMQTTReconnectTimer->start(MQTT_CLIENT_RECONNECT_TIMEOUT);
}
#endif
#ifdef MQTT_USE_TIMER_TO_FLUSH_QUEUE #ifdef MQTT_USE_TIMER_TO_FLUSH_QUEUE
mMQTTQueueFlushTimer->stop(); mMQTTQueueFlushTimer->stop();
#endif #endif
@ -221,16 +273,18 @@ void CMQTTClientWrapper::MQTTSendTimerExpired()
{ {
CCANDevice *Device = mCANDevicesList->at(j); CCANDevice *Device = mCANDevicesList->at(j);
QList<CMQTTMessage> *MessagesList = Device->GetMQTTMessagesList(); QList<CMQTTMessage> *MessagesList = Device->GetMQTTMessagesList();
if(mCPUInterface) #ifdef ENABLE_CHIPSET_DRIVER
if(mCPUInterface != 0)
{ {
CComputerBoardState tmp =mCPUInterface->GetComputerBoardState(); MessagesList->append(GetSystemStatusMessage());
} }
#endif
if(MessagesList != 0) if(MessagesList != 0)
{ {
for(int i = 0; i < MessagesList->size(); i++) for(int i = 0; i < MessagesList->size(); i++)
{ {
qint32 res = mMQTTClient.publish(MessagesList->at(i).mMessageTopic,MessagesList->at(i).mMessagePayload.toLocal8Bit(),0,true); qint32 res = mMQTTClient.publish(MessagesList->at(i).mMessageTopic,MessagesList->at(i).mMessagePayload.toLocal8Bit(),1,true);
QString LogMsg = QString("Envoi d'un message MQTT. Topic: %1 Payload: %2 Result: %3").arg(MessagesList->at(i).mMessageTopic).arg(MessagesList->at(i).mMessagePayload).arg(res); QString LogMsg = QString("Envoi d'un message MQTT. Topic: %1 Payload: %2 Result: %3").arg(MessagesList->at(i).mMessageTopic).arg(MessagesList->at(i).mMessagePayload).arg(res);
CGeneralMessagesLogDispatcher::instance()->AddLogMessage(LogMsg,"CMQTTClientWrapper",true,3); CGeneralMessagesLogDispatcher::instance()->AddLogMessage(LogMsg,"CMQTTClientWrapper",true,3);
@ -243,10 +297,12 @@ void CMQTTClientWrapper::MQTTSendTimerExpired()
{ {
CCANDevice *Device = mCANDevicesList->at(j); CCANDevice *Device = mCANDevicesList->at(j);
QList<CMQTTMessage> *MessagesList = Device->GetMQTTMessagesList(); QList<CMQTTMessage> *MessagesList = Device->GetMQTTMessagesList();
if(mCPUInterface) #ifdef ENABLE_CHIPSET_DRIVER
if(mCPUInterface != 0)
{ {
CComputerBoardState tmp =mCPUInterface->GetComputerBoardState(); MessagesList->append(GetSystemStatusMessage());
} }
#endif
if(MessagesList != 0) if(MessagesList != 0)
{ {
@ -269,6 +325,8 @@ void CMQTTClientWrapper::MQTTSendTimerExpired()
} }
break; break;
} }
case MQTT_DROP_MSG_MODE://Just to please the compiler.
break;
} }
} }
@ -307,8 +365,16 @@ void CMQTTClientWrapper::MQTTQueueFlushTimerExipred()
int CMQTTClientWrapper::SendNextQueueMessage() int CMQTTClientWrapper::SendNextQueueMessage()
{ {
if(mMQTTMessagesQueue.size() == 0)
{
//Should not happen, this is a logical problem with the program
mMessagesQueueMode = MQTT_TRANSMIT_MSG_MODE;
CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Erreur de logique dans SendNextQueueMessage(). MessageQueue vide!","CMQTTClientWrapper",true,2);
return RET_GENERAL_ERROR;
}
CMQTTMessage *Msg = mMQTTMessagesQueue.takeFirst(); CMQTTMessage *Msg = mMQTTMessagesQueue.takeFirst();
qint32 res = mMQTTClient.publish(Msg->mMessageTopic,Msg->mMessagePayload.toLocal8Bit(),0,true); mMQTTClient.publish(Msg->mMessageTopic,Msg->mMessagePayload.toLocal8Bit(),1,true);
QString LogMsg = QString("Envoi d'un message MQTT provenant du buffer. Topic: %1 Payload: %2 FIFO Size: %3").arg(Msg->mMessageTopic).arg(Msg->mMessagePayload).arg(mMQTTMessagesQueue.size()); QString LogMsg = QString("Envoi d'un message MQTT provenant du buffer. Topic: %1 Payload: %2 FIFO Size: %3").arg(Msg->mMessageTopic).arg(Msg->mMessagePayload).arg(mMQTTMessagesQueue.size());
CGeneralMessagesLogDispatcher::instance()->AddLogMessage(LogMsg,"CMQTTClientWrapper",true,3); CGeneralMessagesLogDispatcher::instance()->AddLogMessage(LogMsg,"CMQTTClientWrapper",true,3);
@ -323,12 +389,24 @@ int CMQTTClientWrapper::SendNextQueueMessage()
CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Tous les messages MQTT de la FIFO ont été envoyés au serveur, passage en mode de transmission normal","CMQTTClientWrapper",true,2); CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Tous les messages MQTT de la FIFO ont été envoyés au serveur, passage en mode de transmission normal","CMQTTClientWrapper",true,2);
} }
UpdateGUIBufferingStatus();
return RET_OK; return RET_OK;
} }
int CMQTTClientWrapper::UpdateGUIBufferingStatus() int CMQTTClientWrapper::UpdateGUIBufferingStatus()
{ {
//mProgramPtr->UpdateMQTTBufferingStatusRequest(mBufferingModeText,mCircularBufferStatusText,mRemainingBufferingTimeText); if(mMessagesQueueMode == MQTT_QUEUE_MSG_MODE)
{
mBufferingModeText = "Buffering";
}
else
{
mBufferingModeText = "Transmitting";
}
mCircularBufferStatusText = QString("%1").arg(mMQTTMessagesQueue.size());
mProgramPtr->UpdateMQTTBufferingStatusRequest(mBufferingModeText,mCircularBufferStatusText,0);
return RET_OK;
} }
void CMQTTClientWrapper::MQTTClientError(QMqttClient::ClientError error) void CMQTTClientWrapper::MQTTClientError(QMqttClient::ClientError error)
@ -339,6 +417,8 @@ void CMQTTClientWrapper::MQTTClientError(QMqttClient::ClientError error)
//This function is used only when flushing the msg queue //This function is used only when flushing the msg queue
void CMQTTClientWrapper::MQTTMessageSent(qint32 MsgID) void CMQTTClientWrapper::MQTTMessageSent(qint32 MsgID)
{ {
Q_UNUSED(MsgID)
// qDebug("MQTT msg ID %d sent",MsgID);
#ifndef MQTT_USE_TIMER_TO_FLUSH_QUEUE #ifndef MQTT_USE_TIMER_TO_FLUSH_QUEUE
if(mMessagesQueueMode != MQTT_QUEUE_MSG_MODE) if(mMessagesQueueMode != MQTT_QUEUE_MSG_MODE)
{ {
@ -350,8 +430,67 @@ void CMQTTClientWrapper::MQTTMessageSent(qint32 MsgID)
mMessagesQueueMode = MQTT_TRANSMIT_MSG_MODE; mMessagesQueueMode = MQTT_TRANSMIT_MSG_MODE;
return; return;
} }
CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Message MQTT de la FIFO transmis, transmission du prochain...","CMQTTClientWrapper",true,3);
SendNextQueueMessage(); SendNextQueueMessage();
#endif #endif
} }
void CMQTTClientWrapper::MQTTMessageStatusChanged(qint32 id, QMqtt::MessageStatus s, const QMqttMessageStatusProperties &properties)
{
qDebug("Mqtt %d message status changed",id);
}
CMQTTMessage CMQTTClientWrapper::GetSystemStatusMessage()
{
#ifdef ENABLE_CHIPSET_DRIVER
if(mCPUInterface != 0)
{
CComputerBoardState tmp = mCPUInterface->GetComputerBoardState();
QString MsgPayload = "{";
QString MsgTopic = mMQTTParams.mMQTTTopicPrefix + "GeneralPCStatus";
//Millisecs to EPOCH timestamp format
qint64 TimeStamp = QDateTime::currentDateTime().toMSecsSinceEpoch();
MsgPayload.append(QString("\"timestamp\":%1,").arg(TimeStamp));
MsgPayload.append(QString("\"CPU Temperature\":%1,").arg(tmp.mSystemTemperature));
MsgPayload.append(QString("\"Board 12V\":%1,").arg(tmp.mSystem12V));
MsgPayload.append(QString("\"IO Port\":%1").arg(tmp.mIOPortState));
MsgPayload.append("}");
// qDebug("%s",qPrintable(MsgPayload));
CMQTTMessage NewMessage(MsgTopic, MsgPayload);
return NewMessage;
}
else
{
return CMQTTMessage();
}
#else
return CMQTTMessage();
#endif
}
#ifdef ENABLE_DEVELOPMENT_DEBUG_TOOLS
int CMQTTClientWrapper::ForceMQTTClientDisconnection(bool Disconnect)
{
if(Disconnect == true)
{
CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Forcing MQTT client disconnection for debug tests...","CMQTTClientWrapper",true,3);
mMQTTDisconnectionForced = true;
DisconnectFromBroker();
}
else
{
mMQTTDisconnectionForced = false;
if(mMessagesQueueMode != MQTT_TRANSMIT_MSG_MODE)
{
CGeneralMessagesLogDispatcher::instance()->AddLogMessage("Reconnecting MQTT client after being forced OFF...","CMQTTClientWrapper",true,3);
ConnectToBroker();
}
}
}
#endif

View File

@ -29,7 +29,10 @@ public:
CMQTTClientWrapper(); CMQTTClientWrapper();
~CMQTTClientWrapper(); ~CMQTTClientWrapper();
int SetMQTTParams(CCloudParams *Params); int SetMQTTParams(CCloudParams *Params);
#ifdef ENABLE_CHIPSET_DRIVER
int SetCPUInterface(CComputerBoardInterface *CPUIF); int SetCPUInterface(CComputerBoardInterface *CPUIF);
#endif
int SetMQTTServerPresenceCANBit(quint64 CANBit);
int ConnectToBroker(); int ConnectToBroker();
int NewMQTTMessages(QList<CMQTTMessage> MessagesList); int NewMQTTMessages(QList<CMQTTMessage> MessagesList);
int DisconnectFromBroker(); int DisconnectFromBroker();
@ -37,7 +40,12 @@ public:
int SetCANDevicesList(QList<CCANDevice*> *List); int SetCANDevicesList(QList<CCANDevice*> *List);
int StartMQTTClient(); int StartMQTTClient();
int StopMQTTClient(); int StopMQTTClient();
quint64 GetMQTTServerPresenceCANMask();
#ifdef ENABLE_DEVELOPMENT_DEBUG_TOOLS
int ForceMQTTClientDisconnection(bool Disconnect);
bool mMQTTDisconnectionForced;
#endif
COtarcikCan *mProgramPtr; COtarcikCan *mProgramPtr;
@ -53,9 +61,13 @@ private:
QList<CMQTTMessage*> mMQTTMessagesQueue; QList<CMQTTMessage*> mMQTTMessagesQueue;
bool mIsClientConnecting; bool mIsClientConnecting;
QString mCircularBufferStatusText, mBufferingModeText, mUploadTimeText; QString mCircularBufferStatusText, mBufferingModeText, mUploadTimeText;
#ifdef ENABLE_CHIPSET_DRIVER
CComputerBoardInterface *mCPUInterface; CComputerBoardInterface *mCPUInterface;
#endif
CMQTTMessage GetSystemStatusMessage();
int SendNextQueueMessage(); int SendNextQueueMessage();
quint64 mMQTTPresenceCANBit;
int UpdateGUIBufferingStatus(); int UpdateGUIBufferingStatus();
@ -67,6 +79,7 @@ public slots:
void MQTTQueueFlushTimerExipred(); void MQTTQueueFlushTimerExipred();
void MQTTClientError(QMqttClient::ClientError error); void MQTTClientError(QMqttClient::ClientError error);
void MQTTMessageSent(qint32 MsgID); void MQTTMessageSent(qint32 MsgID);
void MQTTMessageStatusChanged(qint32 id, QMqtt::MessageStatus s, const QMqttMessageStatusProperties &properties);
}; };

View File

@ -1,5 +1,8 @@
#include "ComputerBoardInterface.h"
#include "defines.h" #include "defines.h"
#ifdef ENABLE_CHIPSET_DRIVER
#include "ComputerBoardInterface.h"
#include "AxUfiAPI.h" #include "AxUfiAPI.h"
#include "GeneralMessagesLogDispatcher.h" #include "GeneralMessagesLogDispatcher.h"
#include "CPUWatchdogConfig.h" #include "CPUWatchdogConfig.h"
@ -13,7 +16,7 @@ CComputerBoardInterface::CComputerBoardInterface()
int CComputerBoardInterface::Init() int CComputerBoardInterface::Init()
{ {
if(LoadLibrary() == RET_OK) if(LoadAxiomtekLibrary() == RET_OK)
{ {
CGeneralMessagesLogDispatcher::instance()->AddLogMessage(QString("Librairie Axiomtek chargée avec succès"),"CComputerBoardInterface",true,1,CGeneralMessagesLogDispatcher::GEN_MSG_TXT_SUCCESS_STATUS); CGeneralMessagesLogDispatcher::instance()->AddLogMessage(QString("Librairie Axiomtek chargée avec succès"),"CComputerBoardInterface",true,1,CGeneralMessagesLogDispatcher::GEN_MSG_TXT_SUCCESS_STATUS);
StopCPUWatchdog(); StopCPUWatchdog();
@ -27,13 +30,25 @@ int CComputerBoardInterface::Init()
return RET_OK; return RET_OK;
} }
int CComputerBoardInterface::LoadLibrary() int CComputerBoardInterface::LoadAxiomtekLibrary()
{ {
int result; int result, Direction;
Direction = 1;
char libname[] = CPU_LIBRARY_NAME; char libname[] = CPU_LIBRARY_NAME;
// Suppress system error dialogs
result = AxBoardLoadLibrary(libname); result = AxBoardLoadLibrary(libname);
if(result) if(result)
{
AxSetDIODirection(0,&Direction);
AxSetDIODirection(1,&Direction);
AxSetDIODirection(2,&Direction);
AxSetDIODirection(3,&Direction);
AxSetDIODirection(4,&Direction);
AxSetDIODirection(5,&Direction);
AxSetDIODirection(6,&Direction);
AxSetDIODirection(7,&Direction);
return RET_OK; return RET_OK;
}
return RET_GENERAL_ERROR; return RET_GENERAL_ERROR;
} }
@ -51,6 +66,9 @@ int CComputerBoardInterface::DeInit()
{ {
return RET_OK; return RET_OK;
} }
#include <windows.h>
int CComputerBoardInterface::StartCPUWatchdog() int CComputerBoardInterface::StartCPUWatchdog()
{ {
@ -144,7 +162,7 @@ CComputerBoardState CComputerBoardInterface::GetComputerBoardState()
// qDebug("CPUState.mSystem3V3 %f",CPUState.mSystem3V3); // qDebug("CPUState.mSystem3V3 %f",CPUState.mSystem3V3);
AxGet5V(&CPUState.mSystem5V); AxGet5V(&CPUState.mSystem5V);
// qDebug("CPUState.mSystem5V %f",CPUState.mSystem5V); // qDebug("CPUState.mSystem5V %f",CPUState.mSystem5V);
// AxGet12V(&tmp); AxGet12V(&CPUState.mSystem12V);
// qDebug("AxGet12V %f",tmp); // qDebug("AxGet12V %f",tmp);
// AxGetNeg5V(&tmp); // AxGetNeg5V(&tmp);
// qDebug("AxGetNeg5V %f",tmp); // qDebug("AxGetNeg5V %f",tmp);
@ -153,6 +171,22 @@ CComputerBoardState CComputerBoardInterface::GetComputerBoardState()
// AxGetVbat(&tmp); // AxGetVbat(&tmp);
// qDebug("AxGetVbat %f",tmp); // qDebug("AxGetVbat %f",tmp);
unsigned char IOPortState = 0;
int temp;
for(int i = 0; i < 7; i++)
{
unsigned char mask = 1;
AxGetDI(i,&temp);
if(temp != 0)
{
mask <<= i+1;
}
IOPortState |= mask;
}
CPUState.mIOPortState = IOPortState;
return CPUState; return CPUState;
} }
#endif

View File

@ -20,10 +20,11 @@ public:
CComputerBoardState GetComputerBoardState(); CComputerBoardState GetComputerBoardState();
int SetWatchdogSettings(CCPUWatchdogConfig *Settings); int SetWatchdogSettings(CCPUWatchdogConfig *Settings);
private: private:
int LoadLibrary(); int LoadAxiomtekLibrary();
int UnloadLibrary(); int UnloadLibrary();
int mWatchdogTimeout; int mWatchdogTimeout;

View File

@ -6,4 +6,7 @@ CComputerBoardState::CComputerBoardState()
mCPUVcore = 0.0; mCPUVcore = 0.0;
mSystem3V3 = 0.0; mSystem3V3 = 0.0;
mSystem5V = 0.0; mSystem5V = 0.0;
mSystem12V = 0.0;
mIOPortState = 0;
} }

View File

@ -11,6 +11,9 @@ public:
float mCPUVcore; float mCPUVcore;
float mSystem3V3; float mSystem3V3;
float mSystem5V; float mSystem5V;
float mSystem12V;
unsigned char mIOPortState;
}; };
#endif // COMPUTERBOARDSTATE_H #endif // COMPUTERBOARDSTATE_H

View File

@ -3,13 +3,17 @@
CDeviceDetectionConfig::CDeviceDetectionConfig() CDeviceDetectionConfig::CDeviceDetectionConfig()
{ {
mInternetDetectionCANStatusBit = 31; mInternetDetectionCANStatusBit = 32;
mMQTTDetectionCANStatusBit = 31; mMQTTDetectionCANStatusBit = 33;
for(int i = 0; i < MAX_NB_LAN_DEVICE_DETECTION; i++) for(int i = 0; i < MAX_NB_LAN_DEVICE_DETECTION; i++)
{ {
mLANDeviceDetectConfigList.append(CLANDevicePresenceConfig()); mLANDeviceDetectConfigList.append(CLANDevicePresenceConfig());
} }
mReportingCANMsgID = 300; mReportingCANMsgID = 300;
mMQTTPresenceMonitor = 0;
mLANDevicesMonitor = 0;
mInternetMonitor = 0;
} }
QList<CLANDevicePresenceConfig> *CDeviceDetectionConfig::GetLANDevicesConfigList() QList<CLANDevicePresenceConfig> *CDeviceDetectionConfig::GetLANDevicesConfigList()
@ -35,6 +39,16 @@ QDataStream &operator>>(QDataStream &in, CDeviceDetectionConfig &dest)
return in; return in;
} }
int CDeviceDetectionConfig::SetCANPresenceMonitors(CMQTTClientWrapper *MQTTPresenceMonitor, CLANDevicesPresenceMonitor *LANDevicesMonitor, CInternetMonitor *InternetMonitor)
{
mMQTTPresenceMonitor = MQTTPresenceMonitor;
mLANDevicesMonitor = LANDevicesMonitor;
mInternetMonitor = InternetMonitor;
return RET_OK;
}
QDataStream &operator<<(QDataStream &out, const CDeviceDetectionConfig &source) QDataStream &operator<<(QDataStream &out, const CDeviceDetectionConfig &source)
{ {
out << source.mInternetDetectionCANStatusBit out << source.mInternetDetectionCANStatusBit

View File

@ -4,6 +4,11 @@
#include "LANDevicePresenceConfig.h" #include "LANDevicePresenceConfig.h"
#include <QDataStream> #include <QDataStream>
class CMQTTClientWrapper;
class CLANDevicesPresenceMonitor;
class CInternetMonitor;
class CDeviceDetectionConfig class CDeviceDetectionConfig
{ {
public: public:
@ -16,6 +21,11 @@ public:
quint64 mMQTTDetectionCANStatusBit; quint64 mMQTTDetectionCANStatusBit;
QList<CLANDevicePresenceConfig> mLANDeviceDetectConfigList; QList<CLANDevicePresenceConfig> mLANDeviceDetectConfigList;
CMQTTClientWrapper *mMQTTPresenceMonitor;
CLANDevicesPresenceMonitor *mLANDevicesMonitor;
CInternetMonitor *mInternetMonitor;
int SetCANPresenceMonitors(CMQTTClientWrapper* MQTTPresenceMonitor, CLANDevicesPresenceMonitor *LANDevicesMonitor, CInternetMonitor *InternetMonitor);
CDeviceDetectionConfig &operator=(const CDeviceDetectionConfig &source); CDeviceDetectionConfig &operator=(const CDeviceDetectionConfig &source);
}; };

View File

@ -60,7 +60,7 @@
<x>270</x> <x>270</x>
<y>100</y> <y>100</y>
<width>321</width> <width>321</width>
<height>461</height> <height>431</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
@ -119,7 +119,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>210</x> <x>210</x>
<y>420</y> <y>390</y>
<width>80</width> <width>80</width>
<height>22</height> <height>22</height>
</rect> </rect>
@ -216,7 +216,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>20</x>
<y>420</y> <y>390</y>
<width>80</width> <width>80</width>
<height>22</height> <height>22</height>
</rect> </rect>
@ -309,67 +309,6 @@
<string>Période rafraîchissement (ms):</string> <string>Période rafraîchissement (ms):</string>
</property> </property>
</widget> </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>2048</number>
</property>
<property name="value">
<number>1</number>
</property>
<property name="displayIntegerBase">
<number>16</number>
</property>
</widget>
</widget> </widget>
<widget class="QGroupBox" name="mDatabaseGroupBox"> <widget class="QGroupBox" name="mDatabaseGroupBox">
<property name="geometry"> <property name="geometry">
@ -551,6 +490,67 @@
</rect> </rect>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="mWatchdogMsgIDPrefixLbl">
<property name="geometry">
<rect>
<x>370</x>
<y>610</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>400</x>
<y>610</y>
<width>91</width>
<height>20</height>
</rect>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>2048</number>
</property>
<property name="value">
<number>1</number>
</property>
<property name="displayIntegerBase">
<number>16</number>
</property>
</widget>
<widget class="QLabel" name="mWatchdogMsgIDLbl">
<property name="geometry">
<rect>
<x>270</x>
<y>610</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> </widget>
<resources/> <resources/>
<connections/> <connections/>

View File

@ -23,9 +23,22 @@ CGeneralStatusPage::CGeneralStatusPage(QWidget *parent) :
mCPUStateUpdtTimer->setSingleShot(false); mCPUStateUpdtTimer->setSingleShot(false);
mCPUStateUpdtTimer->setInterval(5000); mCPUStateUpdtTimer->setInterval(5000);
connect(mCPUStateUpdtTimer,&QTimer::timeout,this,&CGeneralStatusPage::UpdateBoardStatusTimerExpired); connect(mCPUStateUpdtTimer,&QTimer::timeout,this,&CGeneralStatusPage::UpdateBoardStatusTimerExpired);
mCPUStateUpdtTimer->start();
#ifndef ENABLE_CHIPSET_DRIVER
ui->mSystemStateGroupBox->setVisible(false);
#endif
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface = 0; mCPUInterface = 0;
#endif
#ifndef ENABLE_DEVELOPMENT_DEBUG_TOOLS
ui->mDevDebugToolsGroupBx->hide();
#else
connect(ui->mForceMQTTDisconnectChkBx,&QCheckBox::toggled,this,&CGeneralStatusPage::ForceMQTTDisconnectCheckBoxClicked);
#endif
} }
@ -34,7 +47,15 @@ CGeneralStatusPage::~CGeneralStatusPage()
delete ui; delete ui;
delete mCPUStateUpdtTimer; delete mCPUStateUpdtTimer;
} }
#ifdef ENABLE_CHIPSET_DRIVER
int CGeneralStatusPage::SetCPUInterfaceHandle(CComputerBoardInterface *Handle)
{
mCPUInterface = Handle;
mCPUStateUpdtTimer->start();
}
#endif
int CGeneralStatusPage::SetGeneralMsgText(QStringList Txt) int CGeneralStatusPage::SetGeneralMsgText(QStringList Txt)
{ {
Q_UNUSED(Txt) Q_UNUSED(Txt)
@ -205,6 +226,7 @@ void CGeneralStatusPage::QuitAppBtnPressed()
mProgramPtr->QuitApplicationRequest(); mProgramPtr->QuitApplicationRequest();
} }
#ifdef ENABLE_CHIPSET_DRIVER
int CGeneralStatusPage::UpdateBoardStatus(CComputerBoardState CPUState) int CGeneralStatusPage::UpdateBoardStatus(CComputerBoardState CPUState)
{ {
QString BoardState = QString("System Temp: %1C\nCPU VCore: %2V\nSystem 3.3V: %3V\nSystem 5V: %4V").arg(CPUState.mSystemTemperature).arg(CPUState.mCPUVcore).arg(CPUState.mSystem3V3).arg(CPUState.mSystem5V); QString BoardState = QString("System Temp: %1C\nCPU VCore: %2V\nSystem 3.3V: %3V\nSystem 5V: %4V").arg(CPUState.mSystemTemperature).arg(CPUState.mCPUVcore).arg(CPUState.mSystem3V3).arg(CPUState.mSystem5V);
@ -212,6 +234,7 @@ int CGeneralStatusPage::UpdateBoardStatus(CComputerBoardState CPUState)
return RET_OK; return RET_OK;
} }
#endif
void CGeneralStatusPage::InternetStatusChanged(bool InternetConnected) void CGeneralStatusPage::InternetStatusChanged(bool InternetConnected)
{ {
@ -232,6 +255,19 @@ void CGeneralStatusPage::InternetStatusChanged(bool InternetConnected)
} }
void CGeneralStatusPage::UpdateBoardStatusTimerExpired() void CGeneralStatusPage::UpdateBoardStatusTimerExpired()
{
#ifdef ENABLE_CHIPSET_DRIVER
if(mCPUInterface != 0)
{ {
UpdateBoardStatus(mCPUInterface->GetComputerBoardState()); UpdateBoardStatus(mCPUInterface->GetComputerBoardState());
} }
#endif
}
#ifdef ENABLE_DEVELOPMENT_DEBUG_TOOLS
void CGeneralStatusPage::ForceMQTTDisconnectCheckBoxClicked(bool checked)
{
mProgramPtr->ForceMQTTDisconnect(checked);
}
#endif

View File

@ -0,0 +1,251 @@
#include "GeneralStatusPage.h"
#include "ui_GeneralStatusPage.h"
#include "QStringList"
#include <QScrollBar>
#include <QLibrary>
#include "OtarcikCan.h"
CGeneralStatusPage::CGeneralStatusPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::CGeneralStatusPage)
{
ui->setupUi(this);
connect(ui->mClearGenMsgTxtBtn,&QPushButton::clicked,this,&CGeneralStatusPage::ClearGenMsgAreaBtnPressed);
connect(ui->mQuitAppBtn,&QPushButton::clicked,this,&CGeneralStatusPage::QuitAppBtnPressed);
SetMQTTConnectionStatus(false);
SetCANConnectionStatus(false);
ui->mCANModuleStatusTableWdgt->setColumnCount(3);
ui->mCANModuleStatusTableWdgt->setHorizontalHeaderLabels(QStringList() << "Nom" << "Statut" << "Buffer");
mCPUStateUpdtTimer = new QTimer;
mCPUStateUpdtTimer->setSingleShot(false);
mCPUStateUpdtTimer->setInterval(5000);
connect(mCPUStateUpdtTimer,&QTimer::timeout,this,&CGeneralStatusPage::UpdateBoardStatusTimerExpired);
mCPUStateUpdtTimer->start();
mCPUInterface = 0;
#ifndef ENABLE_DEVELOPMENT_DEBUG_TOOLS
ui->mDevDebugToolsGroupBx->hide();
#else
connect(ui->mForceMQTTDisconnectChkBx,&QCheckBox::toggled,this,&CGeneralStatusPage::ForceMQTTDisconnectCheckBoxClicked);
#endif
}
CGeneralStatusPage::~CGeneralStatusPage()
{
delete ui;
delete mCPUStateUpdtTimer;
}
int CGeneralStatusPage::SetGeneralMsgText(QStringList Txt)
{
Q_UNUSED(Txt)
/*if you're populating the text box programatically, is to use textEdit->setTextColor(QColor&).You can create the QColor object yourself, or use one of the predefined colours in the Qt namespace (Qt::black, Qt::red, etc). It will apply the specified colour to any text you add, until it is called again with a different one.*/
return RET_OK;
}
int CGeneralStatusPage::AddGeneralMsgBoxLineEntry(QString LineTxt)
{
//Limit the number of lines in the MsgBox to avoid overruns...
if(mGenMsgListBoxTextLines.size() >= GENERAL_MESSAGES_MAX_LOG_LINES)
{
mGenMsgListBoxTextLines.removeFirst();
mGenMsgListBoxTextLines.append(LineTxt);
ui->mGenMsgTextEdit->clear();
for(int i = 0; i < mGenMsgListBoxTextLines.size(); i++)
{
AddColoredLineToGenMsgBox(mGenMsgListBoxTextLines[i]);
}
}
else
{
mGenMsgListBoxTextLines.append(LineTxt);
AddColoredLineToGenMsgBox(LineTxt);
}
ui->mGenMsgTextEdit->verticalScrollBar()->setValue(ui->mGenMsgTextEdit->verticalScrollBar()->maximum());
return RET_OK;
}
int CGeneralStatusPage::AddColoredLineToGenMsgBox(QString Line)
{
if(Line.isEmpty())
{
return RET_GENERAL_ERROR;
}
if(Line.at(0) == QChar('%'))
{
if(Line.at(1) == QChar('E')) //The line is describing an error... write it red
{
ui->mGenMsgTextEdit->setTextColor(Qt::red);
}
else if(Line.at(1) == QChar('W')) //The line is describing a warning... write it yellow
{
ui->mGenMsgTextEdit->setTextColor(Qt::blue);
}
else if(Line.at(1) == QChar('S')) //The line is describing a warning... write it yellow
{
ui->mGenMsgTextEdit->setTextColor(Qt::darkGreen);
}
else
{
qDebug("GeneralStatusPage: Logic error in general message box line encoding... you should check into that");
return RET_GENERAL_ERROR;
}
Line.remove(0,2);
}
ui->mGenMsgTextEdit->insertPlainText(Line);
ui->mGenMsgTextEdit->setTextColor(Qt::black);
return RET_OK;
}
void CGeneralStatusPage::ClearGenMsgAreaBtnPressed()
{
mGenMsgListBoxTextLines.clear();
ui->mGenMsgTextEdit->clear();
}
int CGeneralStatusPage::SetMQTTConnectionStatus(bool Connected)
{
if(Connected)
{
ui->mClientMQTTConnStatLbl->setText("CONNECTÉ");
QPalette pal = QPalette(ui->mClientMQTTConnStatLbl->palette());
pal.setColor(QPalette::WindowText,QColor(Qt::darkGreen));
ui->mClientMQTTConnStatLbl->setPalette(pal);
}
else
{
ui->mClientMQTTConnStatLbl->setText("DÉCONNECTÉ");
QPalette pal = QPalette(ui->mClientMQTTConnStatLbl->palette());
pal.setColor(QPalette::WindowText,QColor(Qt::red));
ui->mClientMQTTConnStatLbl->setPalette(pal);
}
return RET_OK;
}
int CGeneralStatusPage::SetCANConnectionStatus(bool Connected)
{
return RET_OK;
}
int CGeneralStatusPage::ClearCANModuleStatusTable()
{
ui->mCANModuleStatusTableWdgt->clearContents();
ui->mCANModuleStatusTableWdgt->setRowCount(0);
return RET_OK;
}
int CGeneralStatusPage::UpdateMQTTBufferingStatus(QString Mode, QString FIFOSize, QString RemainingTime)
{
ui->mBufferingMode->setText(Mode);
ui->mBufferSizeValue->setText(FIFOSize);
// ui->mBufferTimeRemaining->setText(RemainingTime);
return RET_OK;
}
int CGeneralStatusPage::UpdateCANModuleStatus(QString ModuleName, QString ModuleStatus, QString Buffer)
{
QList<QTableWidgetItem *> Items = ui->mCANModuleStatusTableWdgt->findItems(ModuleName,Qt::MatchFixedString);
if(Items.isEmpty())
{
//first update, we add the item to the table
QTableWidgetItem *NewItem;
int row = ui->mCANModuleStatusTableWdgt->rowCount();
ui->mCANModuleStatusTableWdgt->setRowCount(row + 1);
NewItem = new QTableWidgetItem(ModuleName);
ui->mCANModuleStatusTableWdgt->setItem(row,0,NewItem);
NewItem = new QTableWidgetItem(ModuleStatus);
ui->mCANModuleStatusTableWdgt->setItem(row,1,NewItem);
if(Buffer == "NOUPDATE")
Buffer = "?";
NewItem = new QTableWidgetItem(Buffer);
ui->mCANModuleStatusTableWdgt->setItem(row,2,NewItem);
}
else if(Items.size() == 1)
{
int row = ui->mCANModuleStatusTableWdgt->row(Items.at(0));
if(ModuleStatus != "NOUPDATE")
{
ui->mCANModuleStatusTableWdgt->item(row,1)->setText(ModuleStatus);
}
if(Buffer != "NOUPDATE")
{
ui->mCANModuleStatusTableWdgt->item(row,2)->setText(Buffer);
}
}
else
{
qDebug("Two CAN modules with same name in the Modules Status Table");
}
return RET_OK;
}
void CGeneralStatusPage::QuitAppBtnPressed()
{
mProgramPtr->QuitApplicationRequest();
}
int CGeneralStatusPage::UpdateBoardStatus(CComputerBoardState CPUState)
{
QString BoardState = QString("System Temp: %1C\nCPU VCore: %2V\nSystem 3.3V: %3V\nSystem 5V: %4V").arg(CPUState.mSystemTemperature).arg(CPUState.mCPUVcore).arg(CPUState.mSystem3V3).arg(CPUState.mSystem5V);
ui->mSystemStateLbl->setText(BoardState);
return RET_OK;
}
void CGeneralStatusPage::InternetStatusChanged(bool InternetConnected)
{
if(InternetConnected == true)
{
ui->mInternetPresentStatLbl->setText("Détecté");
QPalette pal = QPalette(ui->mInternetPresentStatLbl->palette());
pal.setColor(QPalette::WindowText,QColor(Qt::darkGreen));
ui->mInternetPresentStatLbl->setPalette(pal);
}
else
{
ui->mInternetPresentStatLbl->setText("Déconnecté");
QPalette pal = QPalette(ui->mInternetPresentStatLbl->palette());
pal.setColor(QPalette::WindowText,QColor(Qt::red));
ui->mInternetPresentStatLbl->setPalette(pal);
}
}
void CGeneralStatusPage::UpdateBoardStatusTimerExpired()
{
UpdateBoardStatus(mCPUInterface->GetComputerBoardState());
}
#ifdef ENABLE_DEVELOPMENT_DEBUG_TOOLS
void CGeneralStatusPage::ForceMQTTDisconnectCheckBoxClicked(bool checked)
{
mProgramPtr->ForceMQTTDisconnect(checked);
}
#endif

View File

@ -3,7 +3,9 @@
#include <QWidget> #include <QWidget>
#include "defines.h" #include "defines.h"
#ifdef ENABLE_CHIPSET_DRIVER
#include "ComputerBoardInterface.h" #include "ComputerBoardInterface.h"
#endif
#include <QTimer> #include <QTimer>
@ -30,12 +32,16 @@ public:
COtarcikCan *mProgramPtr; COtarcikCan *mProgramPtr;
QTimer *mCPUStateUpdtTimer; QTimer *mCPUStateUpdtTimer;
#ifdef ENABLE_CHIPSET_DRIVER
CComputerBoardInterface *mCPUInterface; CComputerBoardInterface *mCPUInterface;
#endif
explicit CGeneralStatusPage(QWidget *parent = 0); explicit CGeneralStatusPage(QWidget *parent = 0);
~CGeneralStatusPage(); ~CGeneralStatusPage();
#ifdef ENABLE_CHIPSET_DRIVER
int SetCPUInterfaceHandle(CComputerBoardInterface *Handle);
#endif
int SetGeneralMsgText(QStringList Txt); int SetGeneralMsgText(QStringList Txt);
int AddGeneralMsgBoxLineEntry(QString LineTxt); int AddGeneralMsgBoxLineEntry(QString LineTxt);
@ -44,7 +50,9 @@ public:
int UpdateCANModuleStatus(QString ModuleName, QString ModuleStatus, QString Buffer); int UpdateCANModuleStatus(QString ModuleName, QString ModuleStatus, QString Buffer);
int ClearCANModuleStatusTable(); int ClearCANModuleStatusTable();
int UpdateMQTTBufferingStatus(QString Mode, QString FIFOSize, QString RemainingTime); int UpdateMQTTBufferingStatus(QString Mode, QString FIFOSize, QString RemainingTime);
#ifdef ENABLE_CHIPSET_DRIVER
int UpdateBoardStatus(CComputerBoardState CPUState); int UpdateBoardStatus(CComputerBoardState CPUState);
#endif
private: private:
@ -60,6 +68,11 @@ public slots:
void InternetStatusChanged(bool InternetConnected); void InternetStatusChanged(bool InternetConnected);
void UpdateBoardStatusTimerExpired(); void UpdateBoardStatusTimerExpired();
#ifdef ENABLE_DEVELOPMENT_DEBUG_TOOLS
void ForceMQTTDisconnectCheckBoxClicked(bool checked);
#endif
}; };
#endif // GENERALSTATUSPAGE_H #endif // GENERALSTATUSPAGE_H

View File

@ -171,7 +171,7 @@
<rect> <rect>
<x>1460</x> <x>1460</x>
<y>190</y> <y>190</y>
<width>251</width> <width>231</width>
<height>91</height> <height>91</height>
</rect> </rect>
</property> </property>
@ -181,7 +181,7 @@
<widget class="QLabel" name="mBufferingModeLbl"> <widget class="QLabel" name="mBufferingModeLbl">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>50</x> <x>10</x>
<y>30</y> <y>30</y>
<width>91</width> <width>91</width>
<height>21</height> <height>21</height>
@ -211,13 +211,13 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Taille buffer circulaire:</string> <string>Taille FIFO</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="mBufferingMode"> <widget class="QLabel" name="mBufferingMode">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>150</x> <x>110</x>
<y>30</y> <y>30</y>
<width>111</width> <width>111</width>
<height>21</height> <height>21</height>
@ -235,7 +235,7 @@
<widget class="QLabel" name="mBufferSizeValue"> <widget class="QLabel" name="mBufferSizeValue">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>150</x> <x>90</x>
<y>60</y> <y>60</y>
<width>131</width> <width>131</width>
<height>21</height> <height>21</height>
@ -251,7 +251,7 @@
</property> </property>
</widget> </widget>
</widget> </widget>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="mSystemStateGroupBox">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>1210</x> <x>1210</x>
@ -285,6 +285,35 @@
</property> </property>
</widget> </widget>
</widget> </widget>
<widget class="QGroupBox" name="mDevDebugToolsGroupBx">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>1489</x>
<y>299</y>
<width>191</width>
<height>111</height>
</rect>
</property>
<property name="title">
<string>Debug</string>
</property>
<widget class="QCheckBox" name="mForceMQTTDisconnectChkBx">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>181</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Force MQTT disconnect</string>
</property>
</widget>
</widget>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>

View File

@ -74,6 +74,11 @@ CLoggingSettingsPage::CLoggingSettingsPage(QWidget *parent) :
// ui->mDevicePresenceBit4ComboBox->addItems(BitsList); // ui->mDevicePresenceBit4ComboBox->addItems(BitsList);
// ui->mDevicePresenceBit5ComboBox->addItems(BitsList); // ui->mDevicePresenceBit5ComboBox->addItems(BitsList);
#ifndef ENABLE_CHIPSET_DRIVER
ui->mWDActiveChkBx->setEnabled(false);
ui->mWDTimerTimeoutSpinBx->setEnabled(false);
#endif
mDevicePresenceEditMode = false; mDevicePresenceEditMode = false;
connect(ui->mCancelBtn,&QPushButton::clicked,this,&CLoggingSettingsPage::CancelBtnPressed); connect(ui->mCancelBtn,&QPushButton::clicked,this,&CLoggingSettingsPage::CancelBtnPressed);

View File

@ -324,7 +324,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>590</x> <x>590</x>
<y>90</y> <y>70</y>
<width>351</width> <width>351</width>
<height>121</height> <height>121</height>
</rect> </rect>
@ -429,7 +429,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>590</x> <x>590</x>
<y>240</y> <y>200</y>
<width>351</width> <width>351</width>
<height>101</height> <height>101</height>
</rect> </rect>
@ -974,6 +974,87 @@ et l'heure</string>
<string>Annuler</string> <string>Annuler</string>
</property> </property>
</widget> </widget>
<widget class="QGroupBox" name="mSyslogSettingsGroupBox">
<property name="geometry">
<rect>
<x>590</x>
<y>310</y>
<width>351</width>
<height>91</height>
</rect>
</property>
<property name="title">
<string>Serveur Syslog</string>
</property>
<widget class="QLineEdit" name="mSyslogServerAddEdit_2">
<property name="geometry">
<rect>
<x>90</x>
<y>30</y>
<width>241</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="mSyslogServerHostNameLbl">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Addresse</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="mCloudMQTTPortLbl_2">
<property name="geometry">
<rect>
<x>20</x>
<y>55</y>
<width>61</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Port</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QSpinBox" name="mSyslogServerPortSpinBx">
<property name="geometry">
<rect>
<x>90</x>
<y>50</y>
<width>111</width>
<height>22</height>
</rect>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>514</number>
</property>
</widget>
</widget>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>

View File

@ -37,12 +37,21 @@ bool CInternetMonitor::IsInternetActive()
return mInternetActive; return mInternetActive;
} }
int CInternetMonitor::Start() int CInternetMonitor::Start(quint64 CANReportingBit)
{ {
mCANReportingMask = 1;
mCANReportingMask <<= CANReportingBit;
CheckInternet(); CheckInternet();
return RET_OK; return RET_OK;
} }
int CInternetMonitor::UpdateCANReportingBit(quint64 CANBit)
{
mCANReportingMask = 1;
mCANReportingMask <<= CANBit;
return RET_OK;
}
int CInternetMonitor::CheckInternet() int CInternetMonitor::CheckInternet()
{ {
if(mConnectionTimer->isActive()) //are we waiting for a reply?? if(mConnectionTimer->isActive()) //are we waiting for a reply??
@ -101,3 +110,13 @@ void CInternetMonitor::ConnectionTimerExpired()
} }
mInternetActive = false; mInternetActive = false;
} }
quint64 CInternetMonitor::GetCANInternetStatusMask()
{
if(mInternetActive == true)
{
return 0;
}
return mCANReportingMask;
}

View File

@ -14,13 +14,16 @@ class CInternetMonitor : public QObject
public: public:
explicit CInternetMonitor(QObject *parent = 0); explicit CInternetMonitor(QObject *parent = 0);
~CInternetMonitor(); ~CInternetMonitor();
int Start(); int Start(quint64 CANReportingBit);
int UpdateCANReportingBit(quint64 CANBit);
bool IsInternetActive(); bool IsInternetActive();
quint64 GetCANInternetStatusMask();
private: private:
QNetworkAccessManager *mNetMgr; QNetworkAccessManager *mNetMgr;
bool mInternetActive; bool mInternetActive;
QTimer *mCheckInternetStateTimer, *mConnectionTimer; QTimer *mCheckInternetStateTimer, *mConnectionTimer;
quint64 mCANReportingMask;
int CheckInternet(); int CheckInternet();

View File

@ -44,16 +44,18 @@ int CLANDeviceMonitor::PingDevice()
CLANDeviceMonitor::~CLANDeviceMonitor() CLANDeviceMonitor::~CLANDeviceMonitor()
{ {
if(mDevMonitorTimer != 0)
{
mDevMonitorTimer->stop();
delete mDevMonitorTimer;
}
if(mPingProcess != 0) if(mPingProcess != 0)
{ {
mPingProcess->terminate(); mPingProcess->terminate();
delete mPingProcess; delete mPingProcess;
} }
if(mDevMonitorTimer != 0)
{
mDevMonitorTimer->stop();
mDevMonitorTimer = 0;
delete mDevMonitorTimer;
}
} }
@ -94,6 +96,7 @@ void CLANDeviceMonitor::PingProcessFinished(int exitCode, QProcess::ExitStatus e
} }
GetDeviceCANStatusMask(); GetDeviceCANStatusMask();
if(mDevMonitorTimer != 0)
mDevMonitorTimer->start(LAN_DEVICE_MONITOR_PRESENCE_CHECK_TIMEOUT); mDevMonitorTimer->start(LAN_DEVICE_MONITOR_PRESENCE_CHECK_TIMEOUT);
} }

View File

@ -1,6 +1,7 @@
#ifndef LANDEVICEPRESENCECONFIG_H #ifndef LANDEVICEPRESENCECONFIG_H
#define LANDEVICEPRESENCECONFIG_H #define LANDEVICEPRESENCECONFIG_H
#include <QDataStream> #include <QDataStream>
#include <QString>
class CLANDevicePresenceConfig class CLANDevicePresenceConfig
{ {

View File

@ -22,7 +22,7 @@ CMainWindow::CMainWindow(QWidget *parent) :
ui(new Ui::CMainWindow) ui(new Ui::CMainWindow)
{ {
ui->setupUi(this); ui->setupUi(this);
QMainWindow::statusBar()->showMessage("V1.05"); QMainWindow::statusBar()->showMessage("V1.06");
mGeneralStatusPage = new CGeneralStatusPage(this); mGeneralStatusPage = new CGeneralStatusPage(this);
mMainWindowWidget = new QTabWidget(this); mMainWindowWidget = new QTabWidget(this);
@ -41,6 +41,7 @@ CMainWindow::CMainWindow(QWidget *parent) :
// mProgramsSettingsTabWidget->addTab(mCANWatchdogSettingsPage,"Watchdog"); // mProgramsSettingsTabWidget->addTab(mCANWatchdogSettingsPage,"Watchdog");
mProgramsSettingsTabWidget->addTab(mDataLoggingSettingsPage,"Général"); mProgramsSettingsTabWidget->addTab(mDataLoggingSettingsPage,"Général");
setWindowFlags(Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint); setWindowFlags(Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint);
resize(1700,768); resize(1700,768);
} }

View File

@ -53,7 +53,10 @@ int COtarcikCan::Start()
mMainWindow.mCANbusSettingsPage->mProgramPtr = this; mMainWindow.mCANbusSettingsPage->mProgramPtr = this;
mMainWindow.mDataLoggingSettingsPage->mProgramHandle = this; mMainWindow.mDataLoggingSettingsPage->mProgramHandle = this;
mMainWindow.mGeneralStatusPage->mProgramPtr = this; mMainWindow.mGeneralStatusPage->mProgramPtr = this;
mMainWindow.mGeneralStatusPage->mCPUInterface = &mCPUInterface; // mMainWindow.mGeneralStatusPage->mCPUInterface = &mCPUInterface; //JFM 2024-08-27 disable Axiomtek driver
#ifdef ENABLE_CHIPSET_DRIVER
mMainWindow.mGeneralStatusPage->SetCPUInterfaceHandle(&mCPUInterface);
#endif
mLANDevicesPresenceMonitor.mProgramPtr = this; mLANDevicesPresenceMonitor.mProgramPtr = this;
// mMainWindow.mCANWatchdogSettingsPage->mProgramHandle = this; // mMainWindow.mCANWatchdogSettingsPage->mProgramHandle = this;
@ -62,8 +65,9 @@ int COtarcikCan::Start()
mSysLogger.Start("10.8.0.6",514); mSysLogger.Start("10.8.0.6",514);
CGeneralMessagesLogDispatcher::instance()->BindGuiPageHandle(mMainWindow.mGeneralStatusPage); CGeneralMessagesLogDispatcher::instance()->BindGuiPageHandle(mMainWindow.mGeneralStatusPage);
CGeneralMessagesLogDispatcher::instance()->Init(&mSysLogger); CGeneralMessagesLogDispatcher::instance()->Init(&mSysLogger);
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface.Init(); mCPUInterface.Init();
#endif
if(mSystemConfig.LoadConfig() == RET_OK) if(mSystemConfig.LoadConfig() == RET_OK)
{ {
@ -82,37 +86,54 @@ int COtarcikCan::Start()
mMainWindow.mDataLoggingSettingsPage->SetCloudParams(&mCloudLoggingParams); mMainWindow.mDataLoggingSettingsPage->SetCloudParams(&mCloudLoggingParams);
mCANBusMQTTClient.SetMQTTParams(&mCloudLoggingParams); mCANBusMQTTClient.SetMQTTParams(&mCloudLoggingParams);
mCANBusMQTTClient.SetCANDevicesList(&mCANDevicesList); mCANBusMQTTClient.SetCANDevicesList(&mCANDevicesList);
#ifdef ENABLE_CHIPSET_DRIVER
mCANBusMQTTClient.SetCPUInterface(&mCPUInterface); mCANBusMQTTClient.SetCPUInterface(&mCPUInterface);
#endif
mCANBusMQTTClient.SetMQTTServerPresenceCANBit(mSystemConfig.GetDeviceDetectionConfig()->mMQTTDetectionCANStatusBit);
mGeneralSystemParams = *mSystemConfig.GetGeneralSystemSettings(); mGeneralSystemParams = *mSystemConfig.GetGeneralSystemSettings();
mMainWindow.mDataLoggingSettingsPage->SetGeneralSettingsParams(&mGeneralSystemParams); mMainWindow.mDataLoggingSettingsPage->SetGeneralSettingsParams(&mGeneralSystemParams);
CGeneralMessagesLogDispatcher::instance()->SetLogVerbosities(mGeneralSystemParams.mLogFileVerbosity,mGeneralSystemParams.mLocalLogVerbosity); CGeneralMessagesLogDispatcher::instance()->SetLogVerbosities(mGeneralSystemParams.mLogFileVerbosity,mGeneralSystemParams.mLocalLogVerbosity);
mCPUWatchdogParams = *mSystemConfig.GetCPUWatchdogSettings(); mCPUWatchdogParams = *mSystemConfig.GetCPUWatchdogSettings();
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface.SetWatchdogSettings(&mCPUWatchdogParams); mCPUInterface.SetWatchdogSettings(&mCPUWatchdogParams);
#endif
mMainWindow.mDataLoggingSettingsPage->SetCPUWatchdogSettings(mSystemConfig.GetCPUWatchdogSettings()); mMainWindow.mDataLoggingSettingsPage->SetCPUWatchdogSettings(mSystemConfig.GetCPUWatchdogSettings());
mDeviceDetectionConfigParams = *mSystemConfig.GetDeviceDetectionConfig(); mDeviceDetectionConfigParams = *mSystemConfig.GetDeviceDetectionConfig();
mMainWindow.mDataLoggingSettingsPage->SetDeviceConfigSettings(mSystemConfig.GetDeviceDetectionConfig()); mMainWindow.mDataLoggingSettingsPage->SetDeviceConfigSettings(mSystemConfig.GetDeviceDetectionConfig());
mInternetMonitor.Start(mSystemConfig.GetDeviceDetectionConfig()->mInternetDetectionCANStatusBit);
mLANDevicesPresenceMonitor.Start(mSystemConfig.GetDeviceDetectionConfig()->GetLANDevicesConfigList()); mLANDevicesPresenceMonitor.Start(mSystemConfig.GetDeviceDetectionConfig()->GetLANDevicesConfigList());
mSystemConfig.mDeviceDetectionParams.SetCANPresenceMonitors(&mCANBusMQTTClient,&mLANDevicesPresenceMonitor,&mInternetMonitor);
for(int i = 0; i < mCANDevicesList.size(); i++)
{
mCANDevicesList.at(i)->StartWatchdog(mSystemConfig.GetDeviceDetectionConfig());
}
// mMainWindow.mCANWatchdogSettingsPage->SetCANWatchdogConfig(mSystemConfig.GetCANWatchdogConfig()); // mMainWindow.mCANWatchdogSettingsPage->SetCANWatchdogConfig(mSystemConfig.GetCANWatchdogConfig());
// mGPTimer->setSingleShot(false); // mGPTimer->setSingleShot(false);
// mGPTimer->start(5000); // mGPTimer->start(5000);
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface.StartCPUWatchdog(); mCPUInterface.StartCPUWatchdog();
mWatchdogTimer->start(); mWatchdogTimer->start();
mMainWindow.mGeneralStatusPage->UpdateBoardStatusTimerExpired(); mMainWindow.mGeneralStatusPage->UpdateBoardStatusTimerExpired();
#endif
} }
else else
{ {
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface.StartCPUWatchdog(); mCPUInterface.StartCPUWatchdog();
mWatchdogTimer->start(); mWatchdogTimer->start();
#endif
} }
@ -124,7 +145,7 @@ int COtarcikCan::Start()
connect(&mInternetMonitor,&CInternetMonitor::InternetStateChanged,mMainWindow.mGeneralStatusPage,&CGeneralStatusPage::InternetStatusChanged); connect(&mInternetMonitor,&CInternetMonitor::InternetStateChanged,mMainWindow.mGeneralStatusPage,&CGeneralStatusPage::InternetStatusChanged);
connect(&mInternetMonitor,&CInternetMonitor::InternetStateChanged,mMainWindow.mDataLoggingSettingsPage,&CLoggingSettingsPage::SetInternetPresenceStatus); connect(&mInternetMonitor,&CInternetMonitor::InternetStateChanged,mMainWindow.mDataLoggingSettingsPage,&CLoggingSettingsPage::SetInternetPresenceStatus);
mInternetMonitor.Start(); mInternetMonitor.Start(mSystemConfig.mDeviceDetectionParams.mInternetDetectionCANStatusBit);
return 0; return 0;
@ -243,14 +264,14 @@ int COtarcikCan::SaveCPUWatchdogSettingsRequest(CCPUWatchdogConfig *CPUWatchdogP
mCPUWatchdogParams = *CPUWatchdogParams; mCPUWatchdogParams = *CPUWatchdogParams;
mSystemConfig.SetCPUWatchdogPArams(&mCPUWatchdogParams); mSystemConfig.SetCPUWatchdogPArams(&mCPUWatchdogParams);
mSystemConfig.SaveConfig(); mSystemConfig.SaveConfig();
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface.SetWatchdogSettings(&mCPUWatchdogParams); mCPUInterface.SetWatchdogSettings(&mCPUWatchdogParams);
mCPUInterface.StopCPUWatchdog(); mCPUInterface.StopCPUWatchdog();
if(mCPUWatchdogParams.mWatchdogEnabled == true) if(mCPUWatchdogParams.mWatchdogEnabled == true)
{ {
mCPUInterface.StartCPUWatchdog(); mCPUInterface.StartCPUWatchdog();
} }
#endif
return RET_OK; return RET_OK;
} }
@ -261,6 +282,8 @@ int COtarcikCan::SaveDeviceDetectionSettingsRequest(CDeviceDetectionConfig *Devi
mSystemConfig.SaveConfig(); mSystemConfig.SaveConfig();
mLANDevicesPresenceMonitor.Stop(); mLANDevicesPresenceMonitor.Stop();
mLANDevicesPresenceMonitor.Start(DeviceDetectconfig->GetLANDevicesConfigList()); mLANDevicesPresenceMonitor.Start(DeviceDetectconfig->GetLANDevicesConfigList());
mInternetMonitor.UpdateCANReportingBit(DeviceDetectconfig->mInternetDetectionCANStatusBit);
mCANBusMQTTClient.SetMQTTServerPresenceCANBit(DeviceDetectconfig->mMQTTDetectionCANStatusBit);
return RET_OK; return RET_OK;
} }
@ -305,15 +328,28 @@ int COtarcikCan::SaveCANWatchdogSettingsRequest(CCANWatchdogConfig *CANWatchdogC
void COtarcikCan::WatchdogUpdateTimerExpired() //Time to kick the CPU watchdog void COtarcikCan::WatchdogUpdateTimerExpired() //Time to kick the CPU watchdog
{ {
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface.KickCPUWatchdog(); mCPUInterface.KickCPUWatchdog();
#endif
} }
void COtarcikCan::QuitApplicationRequest() void COtarcikCan::QuitApplicationRequest()
{ {
qDebug("Quit app request"); qDebug("Quit app request");
mWatchdogTimer->stop(); mWatchdogTimer->stop();
#ifdef ENABLE_CHIPSET_DRIVER
mCPUInterface.StopCPUWatchdog(); mCPUInterface.StopCPUWatchdog();
mCPUInterface.DeInit(); mCPUInterface.DeInit();
#endif
QCoreApplication::quit(); QCoreApplication::exit(69);
} }
#ifdef ENABLE_DEVELOPMENT_DEBUG_TOOLS
int COtarcikCan::ForceMQTTDisconnect(bool Disconnect)
{
mCANBusMQTTClient.ForceMQTTClientDisconnection(Disconnect);
}
#endif

View File

@ -9,7 +9,9 @@
#include <QList> #include <QList>
#include "SystemConfig.h" #include "SystemConfig.h"
#include "MQTTClientWrapper.h" #include "MQTTClientWrapper.h"
#ifdef ENABLE_CHIPSET_DRIVER
#include "ComputerBoardInterface.h" #include "ComputerBoardInterface.h"
#endif
#include "SysLogger.h" #include "SysLogger.h"
#include "InternetMonitor.h" #include "InternetMonitor.h"
#include "LANDevicesPresenceMonitor.h" #include "LANDevicesPresenceMonitor.h"
@ -25,7 +27,9 @@ public:
CSystemConfig mSystemConfig; CSystemConfig mSystemConfig;
CMQTTClientWrapper mCANBusMQTTClient; CMQTTClientWrapper mCANBusMQTTClient;
QTimer *mGPTimer; QTimer *mGPTimer;
#ifdef ENABLE_CHIPSET_DRIVER
CComputerBoardInterface mCPUInterface; CComputerBoardInterface mCPUInterface;
#endif
QTimer *mWatchdogTimer; QTimer *mWatchdogTimer;
CSysLogger mSysLogger; CSysLogger mSysLogger;
CInternetMonitor mInternetMonitor; CInternetMonitor mInternetMonitor;
@ -50,7 +54,9 @@ public:
int SaveCANWatchdogSettingsRequest(CCANWatchdogConfig *CANWatchdogConfig); int SaveCANWatchdogSettingsRequest(CCANWatchdogConfig *CANWatchdogConfig);
int UpdateLANDevicesPresenceStatusRequest(QList<bool> LanDevicesStatus); int UpdateLANDevicesPresenceStatusRequest(QList<bool> LanDevicesStatus);
#ifdef ENABLE_DEVELOPMENT_DEBUG_TOOLS
int ForceMQTTDisconnect(bool Disconnect);
#endif
void QuitApplicationRequest(); void QuitApplicationRequest();

View File

@ -8,7 +8,7 @@
#define MQTT_CLIENT_RECONNECT_TIMEOUT 5000 //Time in ms between reconnect attemps to MQTT broker when connection is lost #define MQTT_CLIENT_RECONNECT_TIMEOUT 5000 //Time in ms between reconnect attemps to MQTT broker when connection is lost
#define MQTT_CLIENT_MSG_QUEUE_FLUSH_TIMEOUT 500 //The delay in ms between the TX messages when flushing the msg queue after a server reconnection #define MQTT_CLIENT_MSG_QUEUE_FLUSH_TIMEOUT 500 //The delay in ms between the TX messages when flushing the msg queue after a server reconnection
#define MQTT_CLIENT_MSG_QUEUE_SIZE 500 //The maximum number of messages to be queued. Older messages are lost when adding a new one in a full queue #define MQTT_CLIENT_MSG_QUEUE_SIZE 5000 //The maximum number of messages to be queued. Older messages are lost when adding a new one in a full queue
#define MQTT_TIMESTAMP_IN_PAYLOAD //Defining this adds the local timestamp to each MQTT payloads. #define MQTT_TIMESTAMP_IN_PAYLOAD //Defining this adds the local timestamp to each MQTT payloads.
//#define MQTT_USE_TIMER_TO_FLUSH_QUEUE //Use a timer based transmission of MQTT msgs while emtpying the queue instead of the "MessageSent" event. //#define MQTT_USE_TIMER_TO_FLUSH_QUEUE //Use a timer based transmission of MQTT msgs while emtpying the queue instead of the "MessageSent" event.
@ -17,6 +17,11 @@
#define MAX_NB_LAN_DEVICE_DETECTION 5 #define MAX_NB_LAN_DEVICE_DETECTION 5
#undef ENABLE_CHIPSET_DRIVER
//#define ENABLE_CHIPSET_DRIVER //POUR ACTIVER LE DRIVER, IL FAUT INCLURE LA LIBRAIRIE AXIOMTEK DANS LE .PRO (pis oublie pas de faire clean / run qMake)...
//#define ENABLE_DEVELOPMENT_DEBUG_TOOLS
enum eOtarcikGeneralReturns enum eOtarcikGeneralReturns
{ {
RET_OK = 0, RET_OK = 0,

View File

@ -1,6 +1,7 @@
#include <QApplication> #include <QApplication>
#include "OtarcikCan.h" #include "OtarcikCan.h"
#include "windows.h" #include "windows.h"
#include <QTextCodec>
int main(int argc, char *argv[]) int main(int argc, char *argv[])

Binary file not shown.

View File

@ -1,402 +0,0 @@
#define __DBL_MIN_EXP__ (-1021)
#define __FLT32X_MAX_EXP__ 1024
#define __cpp_attributes 200809
#define __UINT_LEAST16_MAX__ 0xffff
#define __ATOMIC_ACQUIRE 2
#define __FLT128_MAX_10_EXP__ 4932
#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F
#define __GCC_IEC_559_COMPLEX 2
#define __cpp_aggregate_nsdmi 201304
#define __UINT_LEAST8_TYPE__ unsigned char
#define __SIZEOF_FLOAT80__ 16
#define _WIN32 1
#define __INTMAX_C(c) c ## LL
#define __CHAR_BIT__ 8
#define __UINT8_MAX__ 0xff
#define _WIN64 1
#define __WINT_MAX__ 0xffff
#define __FLT32_MIN_EXP__ (-125)
#define __cpp_static_assert 200410
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 0xffffffffffffffffULL
#define __WCHAR_MAX__ 0xffff
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_IEC_559 2
#define __FLT32X_DECIMAL_DIG__ 17
#define __FLT_EVAL_METHOD__ 0
#define __cpp_binary_literals 201304
#define __FLT64_DECIMAL_DIG__ 17
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __x86_64 1
#define __cpp_variadic_templates 200704
#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
#define __SIG_ATOMIC_TYPE__ int
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __cpp_variable_templates 201304
#define __GNUC_PATCHLEVEL__ 0
#define __FLT32_HAS_DENORM__ 1
#define __UINT_FAST8_MAX__ 0xff
#define __has_include(STR) __has_include__(STR)
#define _stdcall __attribute__((__stdcall__))
#define __DEC64_MAX_EXP__ 385
#define __INT8_C(c) c
#define __INT_LEAST8_WIDTH__ 8
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
#define __SHRT_MAX__ 0x7fff
#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
#define __FLT64X_MAX_10_EXP__ 4932
#define __UINT_LEAST8_MAX__ 0xff
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
#define __UINTMAX_TYPE__ long long unsigned int
#define __DEC32_EPSILON__ 1E-6DF
#define __FLT_EVAL_METHOD_TS_18661_3__ 0
#define __UINT32_MAX__ 0xffffffffU
#define __GXX_EXPERIMENTAL_CXX0X__ 1
#define __LDBL_MAX_EXP__ 16384
#define __FLT128_MIN_EXP__ (-16381)
#define __WINT_MIN__ 0
#define __FLT128_MIN_10_EXP__ (-4931)
#define __INT_LEAST16_WIDTH__ 16
#define __SCHAR_MAX__ 0x7f
#define __FLT128_MANT_DIG__ 113
#define __WCHAR_MIN__ 0
#define __INT64_C(c) c ## LL
#define __DBL_DIG__ 15
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __FLT64X_MANT_DIG__ 64
#define __SIZEOF_INT__ 4
#define __SIZEOF_POINTER__ 8
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __USER_LABEL_PREFIX__
#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
#define __STDC_HOSTED__ 1
#define __WIN32 1
#define __LDBL_HAS_INFINITY__ 1
#define __WIN64 1
#define __FLT32_DIG__ 6
#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
#define __GXX_WEAK__ 1
#define __SHRT_WIDTH__ 16
#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
#define __DEC32_MAX__ 9.999999E96DF
#define __cpp_threadsafe_static_init 200806
#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
#define __MINGW32__ 1
#define __FLT32X_HAS_INFINITY__ 1
#define __INT32_MAX__ 0x7fffffff
#define __INT_WIDTH__ 32
#define __SIZEOF_LONG__ 4
#define __UINT16_C(c) c
#define __PTRDIFF_WIDTH__ 64
#define __DECIMAL_DIG__ 21
#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
#define __INTMAX_WIDTH__ 64
#define __FLT64_MIN_EXP__ (-1021)
#define __has_include_next(STR) __has_include_next__(STR)
#define __FLT64X_MIN_10_EXP__ (-4931)
#define __LDBL_HAS_QUIET_NAN__ 1
#define __FLT64_MANT_DIG__ 53
#define _REENTRANT 1
#define __GNUC__ 7
#define _cdecl __attribute__((__cdecl__))
#define __GXX_RTTI 1
#define __MMX__ 1
#define __cpp_delegating_constructors 200604
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 16
#define __BIGGEST_ALIGNMENT__ 16
#define __STDC_UTF_16__ 1
#define __FLT64_MAX_10_EXP__ 308
#define __FLT32_HAS_INFINITY__ 1
#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L)
#define _thiscall __attribute__((__thiscall__))
#define __cpp_raw_strings 200710
#define __INT_FAST32_MAX__ 0x7fffffff
#define __WINNT 1
#define __DBL_HAS_INFINITY__ 1
#define __INT64_MAX__ 0x7fffffffffffffffLL
#define __WINNT__ 1
#define __DEC32_MIN_EXP__ (-94)
#define __INTPTR_WIDTH__ 64
#define __FLT32X_HAS_DENORM__ 1
#define __INT_FAST16_TYPE__ short int
#define _fastcall __attribute__((__fastcall__))
#define __LDBL_HAS_DENORM__ 1
#define __cplusplus 201402L
#define __cpp_ref_qualifiers 200710
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __INT_LEAST32_MAX__ 0x7fffffff
#define __DEC32_MIN__ 1E-95DF
#define __DEPRECATED 1
#define __cpp_rvalue_references 200610
#define __DBL_MAX_EXP__ 1024
#define __WCHAR_WIDTH__ 16
#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
#define __DEC128_EPSILON__ 1E-33DL
#define __SSE2_MATH__ 1
#define __ATOMIC_HLE_RELEASE 131072
#define __WIN32__ 1
#define __PTRDIFF_MAX__ 0x7fffffffffffffffLL
#define __amd64 1
#define __tune_core2__ 1
#define __ATOMIC_HLE_ACQUIRE 65536
#define __FLT32_HAS_QUIET_NAN__ 1
#define __GNUG__ 7
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __SIZEOF_SIZE_T__ 8
#define __cpp_rvalue_reference 200610
#define __cpp_nsdmi 200809
#define __FLT64X_MIN_EXP__ (-16381)
#define __SIZEOF_WINT_T__ 2
#define __LONG_LONG_WIDTH__ 64
#define __cpp_initializer_lists 200806
#define __FLT32_MAX_EXP__ 128
#define __cpp_hex_float 201603
#define __GCC_HAVE_DWARF2_CFI_ASM 1
#define __GXX_ABI_VERSION 1011
#define __FLT128_HAS_INFINITY__ 1
#define __FLT_MIN_EXP__ (-125)
#define __cpp_lambdas 200907
#define __FLT64X_HAS_QUIET_NAN__ 1
#define __INT_FAST64_TYPE__ long long int
#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
#define __DECIMAL_BID_FORMAT__ 1
#define __GXX_TYPEINFO_EQUALITY_INLINE 0
#define __FLT64_MIN_10_EXP__ (-307)
#define __FLT64X_DECIMAL_DIG__ 21
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __UINT16_MAX__ 0xffff
#define __DBL_HAS_DENORM__ 1
#define __cdecl __attribute__((__cdecl__))
#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
#define __UINT8_TYPE__ unsigned char
#define __NO_INLINE__ 1
#define __FLT_MANT_DIG__ 24
#define __LDBL_DECIMAL_DIG__ 21
#define __VERSION__ "7.3.0"
#define __UINT64_C(c) c ## ULL
#define __cpp_unicode_characters 200704
#define __cpp_decltype_auto 201304
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __FLT128_MAX_EXP__ 16384
#define __FLT32_MANT_DIG__ 24
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLT128_HAS_DENORM__ 1
#define __FLT128_DIG__ 33
#define __SCHAR_WIDTH__ 8
#define __INT32_C(c) c
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __FLT32_MAX_10_EXP__ 38
#define __INT_FAST32_TYPE__ int
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __FLT64X_HAS_INFINITY__ 1
#define __INT16_MAX__ 0x7fff
#define __cpp_rtti 199711
#define __SIZE_TYPE__ long long unsigned int
#define __UINT64_MAX__ 0xffffffffffffffffULL
#define __FLT64X_DIG__ 18
#define __INT8_TYPE__ signed char
#define __cpp_digit_separators 201309
#define __GCC_ASM_FLAG_OUTPUTS__ 1
#define __FLT_RADIX__ 2
#define __INT_LEAST16_TYPE__ short int
#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
#define __UINTMAX_C(c) c ## ULL
#define __GLIBCXX_BITSIZE_INT_N_0 128
#define __SEH__ 1
#define __SIG_ATOMIC_MAX__ 0x7fffffff
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __cpp_sized_deallocation 201309
#define __SIZEOF_PTRDIFF_T__ 8
#define __FLT32X_MANT_DIG__ 53
#define __x86_64__ 1
#define __FLT32X_MIN_EXP__ (-1021)
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __MSVCRT__ 1
#define __INT_FAST16_MAX__ 0x7fff
#define __FLT64_DIG__ 15
#define __UINT_FAST32_MAX__ 0xffffffffU
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 0x7fffffffL
#define __FLT64X_HAS_DENORM__ 1
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define __cpp_unicode_literals 200710
#define __UINT_FAST16_TYPE__ short unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __INT_FAST32_WIDTH__ 32
#define __CHAR16_TYPE__ short unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __SIZE_WIDTH__ 64
#define __SEG_FS 1
#define __INT_LEAST16_MAX__ 0x7fff
#define __DEC64_MANT_DIG__ 16
#define __UINT_LEAST32_MAX__ 0xffffffffU
#define __SEG_GS 1
#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __SIG_ATOMIC_WIDTH__ 32
#define __INT_LEAST64_TYPE__ long long int
#define __INT16_TYPE__ short int
#define __INT_LEAST8_TYPE__ signed char
#define __DEC32_MAX_EXP__ 97
#define __INT_FAST8_MAX__ 0x7f
#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
#define __INTPTR_MAX__ 0x7fffffffffffffffLL
#define __GXX_MERGED_TYPEINFO_NAMES 0
#define __cpp_range_based_for 200907
#define __FLT64_HAS_QUIET_NAN__ 1
#define __stdcall __attribute__((__stdcall__))
#define __FLT32_MIN_10_EXP__ (-37)
#define __SSE2__ 1
#define __EXCEPTIONS 1
#define __LDBL_MANT_DIG__ 64
#define __DBL_HAS_QUIET_NAN__ 1
#define __FLT64_HAS_INFINITY__ 1
#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define __cpp_return_type_deduction 201304
#define __INTPTR_TYPE__ long long int
#define __UINT16_TYPE__ short unsigned int
#define __WCHAR_TYPE__ short unsigned int
#define __SIZEOF_FLOAT__ 4
#define __pic__ 1
#define __UINTPTR_MAX__ 0xffffffffffffffffULL
#define __INT_FAST64_WIDTH__ 64
#define __DEC64_MIN_EXP__ (-382)
#define __cpp_decltype 200707
#define __FLT32_DECIMAL_DIG__ 9
#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __FLT_DIG__ 6
#define __FLT64X_MAX_EXP__ 16384
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __INT_MAX__ 0x7fffffff
#define __amd64__ 1
#define WIN32 1
#define __nocona 1
#define __code_model_medium__ 1
#define __INT64_TYPE__ long long int
#define __FLT_MAX_EXP__ 128
#define WIN64 1
#define __ORDER_BIG_ENDIAN__ 4321
#define __DBL_MANT_DIG__ 53
#define __cpp_inheriting_constructors 201511
#define __SIZEOF_FLOAT128__ 16
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ short unsigned int
#define __UINT_LEAST32_TYPE__ unsigned int
#define __SIZEOF_SHORT__ 2
#define __SSE__ 1
#define __LDBL_MIN_EXP__ (-16381)
#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
#define __WINT_WIDTH__ 16
#define __INT_LEAST8_MAX__ 0x7f
#define __FLT32X_MAX_10_EXP__ 308
#define __SIZEOF_INT128__ 16
#define __WCHAR_UNSIGNED__ 1
#define __LDBL_MAX_10_EXP__ 4932
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
#define __thiscall __attribute__((__thiscall__))
#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
#define __UINT8_C(c) c
#define __FLT64_MAX_EXP__ 1024
#define __INT_LEAST32_TYPE__ int
#define __SIZEOF_WCHAR_T__ 2
#define __FLT128_HAS_QUIET_NAN__ 1
#define __INT_FAST8_TYPE__ signed char
#define __fastcall __attribute__((__fastcall__))
#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
#define __GNUC_STDC_INLINE__ 1
#define __FLT64_HAS_DENORM__ 1
#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
#define __DBL_DECIMAL_DIG__ 17
#define __STDC_UTF_32__ 1
#define __INT_FAST8_WIDTH__ 8
#define __FXSR__ 1
#define __DEC_EVAL_METHOD__ 2
#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
#define __MINGW64__ 1
#define __cpp_runtime_arrays 198712
#define __UINT64_TYPE__ long long unsigned int
#define __UINT32_C(c) c ## U
#define __INTMAX_MAX__ 0x7fffffffffffffffLL
#define __cpp_alias_templates 200704
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define WINNT 1
#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
#define __INT8_MAX__ 0x7f
#define __LONG_WIDTH__ 32
#define __PIC__ 1
#define __UINT_FAST32_TYPE__ unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F
#define __cpp_constexpr 201304
#define __INT32_TYPE__ int
#define __SIZEOF_DOUBLE__ 8
#define __cpp_exceptions 199711
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
#define __INT_LEAST32_WIDTH__ 32
#define __INTMAX_TYPE__ long long int
#define _INTEGRAL_MAX_BITS 64
#define __DEC128_MAX_EXP__ 6145
#define __FLT32X_HAS_QUIET_NAN__ 1
#define __ATOMIC_CONSUME 1
#define __nocona__ 1
#define __GNUC_MINOR__ 3
#define __GLIBCXX_TYPE_INT_N_0 __int128
#define __INT_FAST16_WIDTH__ 16
#define __UINTMAX_MAX__ 0xffffffffffffffffULL
#define __DEC32_MANT_DIG__ 7
#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
#define __INT16_C(c) c
#define __cpp_generic_lambdas 201304
#define __STDC__ 1
#define __FLT32X_DIG__ 15
#define __PTRDIFF_TYPE__ long long int
#define __ATOMIC_SEQ_CST 5
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
#define __UINT32_TYPE__ unsigned int
#define __FLT32X_MIN_10_EXP__ (-307)
#define __UINTPTR_TYPE__ long long unsigned int
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-4931)
#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
#define __SSE_MATH__ 1
#define __SIZEOF_LONG_LONG__ 8
#define __cpp_user_defined_literals 200809
#define __FLT128_DECIMAL_DIG__ 36
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
#define __LDBL_DIG__ 18
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 0xffff
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __INT_LEAST64_WIDTH__ 64
#define __SSE3__ 1
#define __UINT_FAST8_TYPE__ unsigned char
#define __WIN64__ 1
#define __cpp_init_captures 201304
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3
#define __declspec(x) __attribute__((x))

View File

@ -0,0 +1,50 @@
debug/main.o
debug/MainWindow.o
debug/PCANInterface.o
debug/OtarcikCan.o
debug/GeneralStatusPage.o
debug/GeneralMessagesLogDispatcher.o
debug/CANViewerPage.o
debug/CANDatabase.o
debug/SystemConfig.o
debug/CANbusSettingsPage.o
debug/LoggingSettingsPage.o
debug/CANAnalyzer.o
debug/CANDevice.o
debug/CANDeviceConfig.o
debug/CANMessage.o
debug/CANSignal.o
debug/CANDataLogger.o
debug/CloudParams.o
debug/MQTTMessage.o
debug/MQTTClientWrapper.o
debug/CCANWatchdogSettingsPage.o
debug/CANWatchdogConfig.o
debug/GeneralSystemParams.o
debug/CANWatchdog.o
debug/ComputerBoardInterface.o
debug/CPUWatchdogConfig.o
debug/SysLogger.o
debug/InternetMonitor.o
debug/ComputerBoardState.o
debug/DeviceDetectionConfig.o
debug/LANDevicePresenceConfig.o
debug/LANDeviceMonitor.o
debug/LANDevicesPresenceMonitor.o
debug/moc_MainWindow.o
debug/moc_PCANInterface.o
debug/moc_OtarcikCan.o
debug/moc_GeneralStatusPage.o
debug/moc_CANViewerPage.o
debug/moc_CANDatabase.o
debug/moc_CANbusSettingsPage.o
debug/moc_LoggingSettingsPage.o
debug/moc_CANAnalyzer.o
debug/moc_CANDevice.o
debug/moc_MQTTClientWrapper.o
debug/moc_CCANWatchdogSettingsPage.o
debug/moc_CANWatchdog.o
debug/moc_SysLogger.o
debug/moc_InternetMonitor.o
debug/moc_LANDeviceMonitor.o
debug/moc_LANDevicesPresenceMonitor.o

View File

@ -5463,3 +5463,12 @@ Démarrage du logiciel Otarcik CAN le 2023-10-28 à 08:34:02
******************************************************************** ********************************************************************
2023-10-28 08:34:02 Chargement de la configuration système... 2023-10-28 08:34:02 Chargement de la configuration système...
2023-10-28 08:34:02 Configuration système chargée avec succès! 2023-10-28 08:34:02 Configuration système chargée avec succès!
********************************************************************
Démarrage du logiciel Otarcik CAN le 2024-07-18 à 06:05:26
********************************************************************
2024-07-18 06:05:26 Librairie Axiomtek chargée avec succès
2024-07-18 06:05:26 Watchdog CPU arrêté
2024-07-18 06:05:26 Chargement de la configuration système...
2024-07-18 06:05:26 Configuration système chargée avec succès!

Binary file not shown.

View File

@ -0,0 +1,50 @@
release/main.o
release/MainWindow.o
release/PCANInterface.o
release/OtarcikCan.o
release/GeneralStatusPage.o
release/GeneralMessagesLogDispatcher.o
release/CANViewerPage.o
release/CANDatabase.o
release/SystemConfig.o
release/CANbusSettingsPage.o
release/LoggingSettingsPage.o
release/CANAnalyzer.o
release/CANDevice.o
release/CANDeviceConfig.o
release/CANMessage.o
release/CANSignal.o
release/CANDataLogger.o
release/CloudParams.o
release/MQTTMessage.o
release/MQTTClientWrapper.o
release/CCANWatchdogSettingsPage.o
release/CANWatchdogConfig.o
release/GeneralSystemParams.o
release/CANWatchdog.o
release/ComputerBoardInterface.o
release/CPUWatchdogConfig.o
release/SysLogger.o
release/InternetMonitor.o
release/ComputerBoardState.o
release/DeviceDetectionConfig.o
release/LANDevicePresenceConfig.o
release/LANDeviceMonitor.o
release/LANDevicesPresenceMonitor.o
release/moc_MainWindow.o
release/moc_PCANInterface.o
release/moc_OtarcikCan.o
release/moc_GeneralStatusPage.o
release/moc_CANViewerPage.o
release/moc_CANDatabase.o
release/moc_CANbusSettingsPage.o
release/moc_LoggingSettingsPage.o
release/moc_CANAnalyzer.o
release/moc_CANDevice.o
release/moc_MQTTClientWrapper.o
release/moc_CCANWatchdogSettingsPage.o
release/moc_CANWatchdog.o
release/moc_SysLogger.o
release/moc_InternetMonitor.o
release/moc_LANDeviceMonitor.o
release/moc_LANDevicesPresenceMonitor.o

View File

@ -49,9 +49,6 @@ public:
QCheckBox *mCANDeviceWatchdogActivateChkBx; QCheckBox *mCANDeviceWatchdogActivateChkBx;
QSpinBox *mWatchdogPollPeriodSpinBx; QSpinBox *mWatchdogPollPeriodSpinBx;
QLabel *mRefreshRateLbl_2; QLabel *mRefreshRateLbl_2;
QLabel *mWatchdogMsgIDLbl;
QLabel *mWatchdogMsgIDPrefixLbl;
QSpinBox *mWatchdogMsgIDSpinBx;
QGroupBox *mDatabaseGroupBox; QGroupBox *mDatabaseGroupBox;
QLabel *mDBMessageNameLbl; QLabel *mDBMessageNameLbl;
QLabel *mDBMessageIDLbl; QLabel *mDBMessageIDLbl;
@ -64,6 +61,9 @@ public:
QPushButton *mAddDeviceBtn; QPushButton *mAddDeviceBtn;
QPushButton *mDeleteDeviceBtn; QPushButton *mDeleteDeviceBtn;
QComboBox *mCANIDComboBx; QComboBox *mCANIDComboBx;
QLabel *mWatchdogMsgIDPrefixLbl;
QSpinBox *mWatchdogMsgIDSpinBx;
QLabel *mWatchdogMsgIDLbl;
void setupUi(QWidget *CCANbusSettingsPage) void setupUi(QWidget *CCANbusSettingsPage)
{ {
@ -84,7 +84,7 @@ public:
label_2->setGeometry(QRect(52, 100, 81, 16)); label_2->setGeometry(QRect(52, 100, 81, 16));
mDeviceParamsGroupBox = new QGroupBox(CCANbusSettingsPage); mDeviceParamsGroupBox = new QGroupBox(CCANbusSettingsPage);
mDeviceParamsGroupBox->setObjectName(QString::fromUtf8("mDeviceParamsGroupBox")); mDeviceParamsGroupBox->setObjectName(QString::fromUtf8("mDeviceParamsGroupBox"));
mDeviceParamsGroupBox->setGeometry(QRect(270, 100, 321, 461)); mDeviceParamsGroupBox->setGeometry(QRect(270, 100, 321, 431));
mCANIDLbl = new QLabel(mDeviceParamsGroupBox); mCANIDLbl = new QLabel(mDeviceParamsGroupBox);
mCANIDLbl->setObjectName(QString::fromUtf8("mCANIDLbl")); mCANIDLbl->setObjectName(QString::fromUtf8("mCANIDLbl"));
mCANIDLbl->setGeometry(QRect(10, 66, 121, 16)); mCANIDLbl->setGeometry(QRect(10, 66, 121, 16));
@ -101,7 +101,7 @@ public:
mCANBaudrateComboBx->setGeometry(QRect(100, 90, 131, 21)); mCANBaudrateComboBx->setGeometry(QRect(100, 90, 131, 21));
mModifyDevParamsBtn = new QPushButton(mDeviceParamsGroupBox); mModifyDevParamsBtn = new QPushButton(mDeviceParamsGroupBox);
mModifyDevParamsBtn->setObjectName(QString::fromUtf8("mModifyDevParamsBtn")); mModifyDevParamsBtn->setObjectName(QString::fromUtf8("mModifyDevParamsBtn"));
mModifyDevParamsBtn->setGeometry(QRect(210, 420, 80, 22)); mModifyDevParamsBtn->setGeometry(QRect(210, 390, 80, 22));
mDeviceDescriptionTxtEdit = new QTextEdit(mDeviceParamsGroupBox); mDeviceDescriptionTxtEdit = new QTextEdit(mDeviceParamsGroupBox);
mDeviceDescriptionTxtEdit->setObjectName(QString::fromUtf8("mDeviceDescriptionTxtEdit")); mDeviceDescriptionTxtEdit->setObjectName(QString::fromUtf8("mDeviceDescriptionTxtEdit"));
mDeviceDescriptionTxtEdit->setGeometry(QRect(10, 210, 291, 101)); mDeviceDescriptionTxtEdit->setGeometry(QRect(10, 210, 291, 101));
@ -128,7 +128,7 @@ public:
mDevicePollPeriodSpinBx->setGeometry(QRect(200, 180, 91, 22)); mDevicePollPeriodSpinBx->setGeometry(QRect(200, 180, 91, 22));
mCancelModifyParamsBtn = new QPushButton(mDeviceParamsGroupBox); mCancelModifyParamsBtn = new QPushButton(mDeviceParamsGroupBox);
mCancelModifyParamsBtn->setObjectName(QString::fromUtf8("mCancelModifyParamsBtn")); mCancelModifyParamsBtn->setObjectName(QString::fromUtf8("mCancelModifyParamsBtn"));
mCancelModifyParamsBtn->setGeometry(QRect(20, 420, 80, 22)); mCancelModifyParamsBtn->setGeometry(QRect(20, 390, 80, 22));
mDeviceNameEditBx = new QPlainTextEdit(mDeviceParamsGroupBox); mDeviceNameEditBx = new QPlainTextEdit(mDeviceParamsGroupBox);
mDeviceNameEditBx->setObjectName(QString::fromUtf8("mDeviceNameEditBx")); mDeviceNameEditBx->setObjectName(QString::fromUtf8("mDeviceNameEditBx"));
mDeviceNameEditBx->setGeometry(QRect(13, 23, 281, 31)); mDeviceNameEditBx->setGeometry(QRect(13, 23, 281, 31));
@ -152,22 +152,6 @@ public:
mRefreshRateLbl_2->setObjectName(QString::fromUtf8("mRefreshRateLbl_2")); mRefreshRateLbl_2->setObjectName(QString::fromUtf8("mRefreshRateLbl_2"));
mRefreshRateLbl_2->setGeometry(QRect(10, 350, 181, 16)); mRefreshRateLbl_2->setGeometry(QRect(10, 350, 181, 16));
mRefreshRateLbl_2->setFont(font1); 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(2048);
mWatchdogMsgIDSpinBx->setValue(1);
mWatchdogMsgIDSpinBx->setDisplayIntegerBase(16);
mDatabaseGroupBox = new QGroupBox(CCANbusSettingsPage); mDatabaseGroupBox = new QGroupBox(CCANbusSettingsPage);
mDatabaseGroupBox->setObjectName(QString::fromUtf8("mDatabaseGroupBox")); mDatabaseGroupBox->setObjectName(QString::fromUtf8("mDatabaseGroupBox"));
mDatabaseGroupBox->setGeometry(QRect(620, 100, 711, 491)); mDatabaseGroupBox->setGeometry(QRect(620, 100, 711, 491));
@ -213,6 +197,22 @@ public:
mCANIDComboBx->setObjectName(QString::fromUtf8("mCANIDComboBx")); mCANIDComboBx->setObjectName(QString::fromUtf8("mCANIDComboBx"));
mCANIDComboBx->setEnabled(true); mCANIDComboBx->setEnabled(true);
mCANIDComboBx->setGeometry(QRect(790, 20, 131, 20)); mCANIDComboBx->setGeometry(QRect(790, 20, 131, 20));
mWatchdogMsgIDPrefixLbl = new QLabel(CCANbusSettingsPage);
mWatchdogMsgIDPrefixLbl->setObjectName(QString::fromUtf8("mWatchdogMsgIDPrefixLbl"));
mWatchdogMsgIDPrefixLbl->setGeometry(QRect(370, 610, 30, 20));
mWatchdogMsgIDPrefixLbl->setFont(font1);
mWatchdogMsgIDPrefixLbl->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
mWatchdogMsgIDSpinBx = new QSpinBox(CCANbusSettingsPage);
mWatchdogMsgIDSpinBx->setObjectName(QString::fromUtf8("mWatchdogMsgIDSpinBx"));
mWatchdogMsgIDSpinBx->setGeometry(QRect(400, 610, 91, 20));
mWatchdogMsgIDSpinBx->setMinimum(1);
mWatchdogMsgIDSpinBx->setMaximum(2048);
mWatchdogMsgIDSpinBx->setValue(1);
mWatchdogMsgIDSpinBx->setDisplayIntegerBase(16);
mWatchdogMsgIDLbl = new QLabel(CCANbusSettingsPage);
mWatchdogMsgIDLbl->setObjectName(QString::fromUtf8("mWatchdogMsgIDLbl"));
mWatchdogMsgIDLbl->setGeometry(QRect(270, 610, 111, 16));
mWatchdogMsgIDLbl->setFont(font1);
retranslateUi(CCANbusSettingsPage); retranslateUi(CCANbusSettingsPage);
@ -235,8 +235,6 @@ public:
mCancelModifyParamsBtn->setText(QCoreApplication::translate("CCANbusSettingsPage", "Annuler", nullptr)); mCancelModifyParamsBtn->setText(QCoreApplication::translate("CCANbusSettingsPage", "Annuler", nullptr));
mCANDeviceWatchdogActivateChkBx->setText(QCoreApplication::translate("CCANbusSettingsPage", "Activer Watchdog", nullptr)); mCANDeviceWatchdogActivateChkBx->setText(QCoreApplication::translate("CCANbusSettingsPage", "Activer Watchdog", nullptr));
mRefreshRateLbl_2->setText(QCoreApplication::translate("CCANbusSettingsPage", "P\303\251riode rafra\303\256chissement (ms):", 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)); mDatabaseGroupBox->setTitle(QCoreApplication::translate("CCANbusSettingsPage", "Database", nullptr));
mDBMessageNameLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Message Name: ", nullptr)); mDBMessageNameLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Message Name: ", nullptr));
mDBMessageIDLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Message ID: ", nullptr)); mDBMessageIDLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Message ID: ", nullptr));
@ -246,6 +244,8 @@ public:
mDBMessageCommentLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Number of signals: ", nullptr)); mDBMessageCommentLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "Number of signals: ", nullptr));
mAddDeviceBtn->setText(QCoreApplication::translate("CCANbusSettingsPage", "Ajouter", nullptr)); mAddDeviceBtn->setText(QCoreApplication::translate("CCANbusSettingsPage", "Ajouter", nullptr));
mDeleteDeviceBtn->setText(QCoreApplication::translate("CCANbusSettingsPage", "Supprimer", nullptr)); mDeleteDeviceBtn->setText(QCoreApplication::translate("CCANbusSettingsPage", "Supprimer", nullptr));
mWatchdogMsgIDPrefixLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "0x", nullptr));
mWatchdogMsgIDLbl->setText(QCoreApplication::translate("CCANbusSettingsPage", "CAN Msg ID (HEX):", nullptr));
} // retranslateUi } // retranslateUi
}; };

View File

@ -11,6 +11,7 @@
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QGroupBox> #include <QtWidgets/QGroupBox>
#include <QtWidgets/QHeaderView> #include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel> #include <QtWidgets/QLabel>
@ -38,8 +39,10 @@ public:
QLabel *mBufferSizeLbl; QLabel *mBufferSizeLbl;
QLabel *mBufferingMode; QLabel *mBufferingMode;
QLabel *mBufferSizeValue; QLabel *mBufferSizeValue;
QGroupBox *groupBox; QGroupBox *mSystemStateGroupBox;
QLabel *mSystemStateLbl; QLabel *mSystemStateLbl;
QGroupBox *mDevDebugToolsGroupBx;
QCheckBox *mForceMQTTDisconnectChkBx;
void setupUi(QWidget *CGeneralStatusPage) void setupUi(QWidget *CGeneralStatusPage)
{ {
@ -97,10 +100,10 @@ public:
mInternetPresentStatLbl->setFont(font2); mInternetPresentStatLbl->setFont(font2);
MQTTBufferingGrpBx = new QGroupBox(CGeneralStatusPage); MQTTBufferingGrpBx = new QGroupBox(CGeneralStatusPage);
MQTTBufferingGrpBx->setObjectName(QString::fromUtf8("MQTTBufferingGrpBx")); MQTTBufferingGrpBx->setObjectName(QString::fromUtf8("MQTTBufferingGrpBx"));
MQTTBufferingGrpBx->setGeometry(QRect(1460, 190, 251, 91)); MQTTBufferingGrpBx->setGeometry(QRect(1460, 190, 231, 91));
mBufferingModeLbl = new QLabel(MQTTBufferingGrpBx); mBufferingModeLbl = new QLabel(MQTTBufferingGrpBx);
mBufferingModeLbl->setObjectName(QString::fromUtf8("mBufferingModeLbl")); mBufferingModeLbl->setObjectName(QString::fromUtf8("mBufferingModeLbl"));
mBufferingModeLbl->setGeometry(QRect(50, 30, 91, 21)); mBufferingModeLbl->setGeometry(QRect(10, 30, 91, 21));
QFont font4; QFont font4;
font4.setPointSize(10); font4.setPointSize(10);
mBufferingModeLbl->setFont(font4); mBufferingModeLbl->setFont(font4);
@ -110,20 +113,27 @@ public:
mBufferSizeLbl->setFont(font4); mBufferSizeLbl->setFont(font4);
mBufferingMode = new QLabel(MQTTBufferingGrpBx); mBufferingMode = new QLabel(MQTTBufferingGrpBx);
mBufferingMode->setObjectName(QString::fromUtf8("mBufferingMode")); mBufferingMode->setObjectName(QString::fromUtf8("mBufferingMode"));
mBufferingMode->setGeometry(QRect(150, 30, 111, 21)); mBufferingMode->setGeometry(QRect(110, 30, 111, 21));
mBufferingMode->setFont(font4); mBufferingMode->setFont(font4);
mBufferSizeValue = new QLabel(MQTTBufferingGrpBx); mBufferSizeValue = new QLabel(MQTTBufferingGrpBx);
mBufferSizeValue->setObjectName(QString::fromUtf8("mBufferSizeValue")); mBufferSizeValue->setObjectName(QString::fromUtf8("mBufferSizeValue"));
mBufferSizeValue->setGeometry(QRect(150, 60, 131, 21)); mBufferSizeValue->setGeometry(QRect(90, 60, 131, 21));
mBufferSizeValue->setFont(font4); mBufferSizeValue->setFont(font4);
groupBox = new QGroupBox(CGeneralStatusPage); mSystemStateGroupBox = new QGroupBox(CGeneralStatusPage);
groupBox->setObjectName(QString::fromUtf8("groupBox")); mSystemStateGroupBox->setObjectName(QString::fromUtf8("mSystemStateGroupBox"));
groupBox->setGeometry(QRect(1210, 290, 201, 121)); mSystemStateGroupBox->setGeometry(QRect(1210, 290, 201, 121));
mSystemStateLbl = new QLabel(groupBox); mSystemStateLbl = new QLabel(mSystemStateGroupBox);
mSystemStateLbl->setObjectName(QString::fromUtf8("mSystemStateLbl")); mSystemStateLbl->setObjectName(QString::fromUtf8("mSystemStateLbl"));
mSystemStateLbl->setGeometry(QRect(10, 20, 281, 131)); mSystemStateLbl->setGeometry(QRect(10, 20, 281, 131));
mSystemStateLbl->setFont(font4); mSystemStateLbl->setFont(font4);
mSystemStateLbl->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); mSystemStateLbl->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
mDevDebugToolsGroupBx = new QGroupBox(CGeneralStatusPage);
mDevDebugToolsGroupBx->setObjectName(QString::fromUtf8("mDevDebugToolsGroupBx"));
mDevDebugToolsGroupBx->setEnabled(true);
mDevDebugToolsGroupBx->setGeometry(QRect(1489, 299, 191, 111));
mForceMQTTDisconnectChkBx = new QCheckBox(mDevDebugToolsGroupBx);
mForceMQTTDisconnectChkBx->setObjectName(QString::fromUtf8("mForceMQTTDisconnectChkBx"));
mForceMQTTDisconnectChkBx->setGeometry(QRect(10, 30, 181, 20));
retranslateUi(CGeneralStatusPage); retranslateUi(CGeneralStatusPage);
@ -142,11 +152,13 @@ public:
mInternetPresentStatLbl->setText(QCoreApplication::translate("CGeneralStatusPage", "D\303\251tect\303\251", nullptr)); mInternetPresentStatLbl->setText(QCoreApplication::translate("CGeneralStatusPage", "D\303\251tect\303\251", nullptr));
MQTTBufferingGrpBx->setTitle(QCoreApplication::translate("CGeneralStatusPage", "Buffering MQTT", nullptr)); MQTTBufferingGrpBx->setTitle(QCoreApplication::translate("CGeneralStatusPage", "Buffering MQTT", nullptr));
mBufferingModeLbl->setText(QCoreApplication::translate("CGeneralStatusPage", "Mode buffering:", nullptr)); mBufferingModeLbl->setText(QCoreApplication::translate("CGeneralStatusPage", "Mode buffering:", nullptr));
mBufferSizeLbl->setText(QCoreApplication::translate("CGeneralStatusPage", "Taille buffer circulaire:", nullptr)); mBufferSizeLbl->setText(QCoreApplication::translate("CGeneralStatusPage", "Taille FIFO", nullptr));
mBufferingMode->setText(QCoreApplication::translate("CGeneralStatusPage", "Inactif", nullptr)); mBufferingMode->setText(QCoreApplication::translate("CGeneralStatusPage", "Inactif", nullptr));
mBufferSizeValue->setText(QCoreApplication::translate("CGeneralStatusPage", "0/5000", nullptr)); mBufferSizeValue->setText(QCoreApplication::translate("CGeneralStatusPage", "0/5000", nullptr));
groupBox->setTitle(QCoreApplication::translate("CGeneralStatusPage", "\303\211tat du syst\303\250me", nullptr)); mSystemStateGroupBox->setTitle(QCoreApplication::translate("CGeneralStatusPage", "\303\211tat du syst\303\250me", nullptr));
mSystemStateLbl->setText(QCoreApplication::translate("CGeneralStatusPage", "Syst\303\250me:", nullptr)); mSystemStateLbl->setText(QCoreApplication::translate("CGeneralStatusPage", "Syst\303\250me:", nullptr));
mDevDebugToolsGroupBx->setTitle(QCoreApplication::translate("CGeneralStatusPage", "Debug", nullptr));
mForceMQTTDisconnectChkBx->setText(QCoreApplication::translate("CGeneralStatusPage", "Force MQTT disconnect", nullptr));
} // retranslateUi } // retranslateUi
}; };

View File

@ -89,6 +89,11 @@ public:
QLabel *mInternetPresenceStatusLbl; QLabel *mInternetPresenceStatusLbl;
QPushButton *mDevicePresChangeParamsBtn; QPushButton *mDevicePresChangeParamsBtn;
QPushButton *mDevicePresCancelBtn; QPushButton *mDevicePresCancelBtn;
QGroupBox *mSyslogSettingsGroupBox;
QLineEdit *mSyslogServerAddEdit_2;
QLabel *mSyslogServerHostNameLbl;
QLabel *mCloudMQTTPortLbl_2;
QSpinBox *mSyslogServerPortSpinBx;
void setupUi(QWidget *CLoggingSettingsPage) void setupUi(QWidget *CLoggingSettingsPage)
{ {
@ -179,7 +184,7 @@ public:
mCancelBtn->setGeometry(QRect(260, 340, 80, 22)); mCancelBtn->setGeometry(QRect(260, 340, 80, 22));
groupBox_2 = new QGroupBox(CLoggingSettingsPage); groupBox_2 = new QGroupBox(CLoggingSettingsPage);
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
groupBox_2->setGeometry(QRect(590, 90, 351, 121)); groupBox_2->setGeometry(QRect(590, 70, 351, 121));
mLogFileVerbositySpinBx = new QSpinBox(groupBox_2); mLogFileVerbositySpinBx = new QSpinBox(groupBox_2);
mLogFileVerbositySpinBx->setObjectName(QString::fromUtf8("mLogFileVerbositySpinBx")); mLogFileVerbositySpinBx->setObjectName(QString::fromUtf8("mLogFileVerbositySpinBx"));
mLogFileVerbositySpinBx->setGeometry(QRect(170, 30, 51, 22)); mLogFileVerbositySpinBx->setGeometry(QRect(170, 30, 51, 22));
@ -208,7 +213,7 @@ public:
label_3->setFont(font1); label_3->setFont(font1);
groupBox_3 = new QGroupBox(CLoggingSettingsPage); groupBox_3 = new QGroupBox(CLoggingSettingsPage);
groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); groupBox_3->setObjectName(QString::fromUtf8("groupBox_3"));
groupBox_3->setGeometry(QRect(590, 240, 351, 101)); groupBox_3->setGeometry(QRect(590, 200, 351, 101));
mWDTimerTimeoutSpinBx = new QSpinBox(groupBox_3); mWDTimerTimeoutSpinBx = new QSpinBox(groupBox_3);
mWDTimerTimeoutSpinBx->setObjectName(QString::fromUtf8("mWDTimerTimeoutSpinBx")); mWDTimerTimeoutSpinBx->setObjectName(QString::fromUtf8("mWDTimerTimeoutSpinBx"));
mWDTimerTimeoutSpinBx->setGeometry(QRect(110, 60, 101, 22)); mWDTimerTimeoutSpinBx->setGeometry(QRect(110, 60, 101, 22));
@ -343,6 +348,27 @@ public:
mDevicePresCancelBtn = new QPushButton(CLoggingSettingsPage); mDevicePresCancelBtn = new QPushButton(CLoggingSettingsPage);
mDevicePresCancelBtn->setObjectName(QString::fromUtf8("mDevicePresCancelBtn")); mDevicePresCancelBtn->setObjectName(QString::fromUtf8("mDevicePresCancelBtn"));
mDevicePresCancelBtn->setGeometry(QRect(1170, 400, 80, 22)); mDevicePresCancelBtn->setGeometry(QRect(1170, 400, 80, 22));
mSyslogSettingsGroupBox = new QGroupBox(CLoggingSettingsPage);
mSyslogSettingsGroupBox->setObjectName(QString::fromUtf8("mSyslogSettingsGroupBox"));
mSyslogSettingsGroupBox->setGeometry(QRect(590, 310, 351, 91));
mSyslogServerAddEdit_2 = new QLineEdit(mSyslogSettingsGroupBox);
mSyslogServerAddEdit_2->setObjectName(QString::fromUtf8("mSyslogServerAddEdit_2"));
mSyslogServerAddEdit_2->setGeometry(QRect(90, 30, 241, 20));
mSyslogServerHostNameLbl = new QLabel(mSyslogSettingsGroupBox);
mSyslogServerHostNameLbl->setObjectName(QString::fromUtf8("mSyslogServerHostNameLbl"));
mSyslogServerHostNameLbl->setGeometry(QRect(10, 30, 71, 20));
mSyslogServerHostNameLbl->setFont(font1);
mSyslogServerHostNameLbl->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
mCloudMQTTPortLbl_2 = new QLabel(mSyslogSettingsGroupBox);
mCloudMQTTPortLbl_2->setObjectName(QString::fromUtf8("mCloudMQTTPortLbl_2"));
mCloudMQTTPortLbl_2->setGeometry(QRect(20, 55, 61, 16));
mCloudMQTTPortLbl_2->setFont(font1);
mCloudMQTTPortLbl_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
mSyslogServerPortSpinBx = new QSpinBox(mSyslogSettingsGroupBox);
mSyslogServerPortSpinBx->setObjectName(QString::fromUtf8("mSyslogServerPortSpinBx"));
mSyslogServerPortSpinBx->setGeometry(QRect(90, 50, 111, 22));
mSyslogServerPortSpinBx->setMaximum(65535);
mSyslogServerPortSpinBx->setValue(514);
retranslateUi(CLoggingSettingsPage); retranslateUi(CLoggingSettingsPage);
@ -399,6 +425,9 @@ public:
mInternetPresenceStatusLbl->setText(QCoreApplication::translate("CLoggingSettingsPage", "OFFLINE", nullptr)); mInternetPresenceStatusLbl->setText(QCoreApplication::translate("CLoggingSettingsPage", "OFFLINE", nullptr));
mDevicePresChangeParamsBtn->setText(QCoreApplication::translate("CLoggingSettingsPage", "Modifier", nullptr)); mDevicePresChangeParamsBtn->setText(QCoreApplication::translate("CLoggingSettingsPage", "Modifier", nullptr));
mDevicePresCancelBtn->setText(QCoreApplication::translate("CLoggingSettingsPage", "Annuler", nullptr)); mDevicePresCancelBtn->setText(QCoreApplication::translate("CLoggingSettingsPage", "Annuler", nullptr));
mSyslogSettingsGroupBox->setTitle(QCoreApplication::translate("CLoggingSettingsPage", "Serveur Syslog", nullptr));
mSyslogServerHostNameLbl->setText(QCoreApplication::translate("CLoggingSettingsPage", "Addresse", nullptr));
mCloudMQTTPortLbl_2->setText(QCoreApplication::translate("CLoggingSettingsPage", "Port", nullptr));
} // retranslateUi } // retranslateUi
}; };

BIN
Otarcik_CAN_V1.05.zip Normal file

Binary file not shown.

BIN
Paramètres CAN Otarcik.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

View File

@ -19,13 +19,13 @@ x Ajouter le buffering lors d'un blackout internet
- Implémenter un moyen de créer un fichier de config vide - Implémenter un moyen de créer un fichier de config vide
- Contrôler le process Zigbee dans l'application - Contrôler le process Zigbee dans l'application
x Ajouter la détection internet x Ajouter la détection internet
- Modifier l'assignation du registre watchdog CAN pour utiliser la DB CAN // Modifier l'assignation du registre watchdog CAN pour utiliser la DB CAN
- Syslog server??? - Syslog server???
- Vérifier pourquoi EMQX ne voulait pas se reconnecter le 2023-11-28 - Vérifier pourquoi EMQX ne voulait pas se reconnecter le 2023-11-28
- Implémenter au moins 2 retry avant de déclarer l'internet déconnecté // Implémenter au moins 2 retry avant de déclarer l'internet déconnecté
- Ajouter le bit de présence internet sur le CAN x Ajouter le bit de présence internet sur le CAN
- Ajouter les stats interne du PC (tensions, température, etc) x Ajouter les stats interne du PC (tensions, température, etc)
- Benchmarker le buffering des messages CAN x Benchmarker le buffering des messages CAN
Wet Dreams: Wet Dreams:

7
gitlab.ssh Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACDr//ERSTdeA3jFlnOvf9Z4DTAeWrqNkoG+Bmmohecz7AAAAJCcDNVZnAzV
WQAAAAtzc2gtZWQyNTUxOQAAACDr//ERSTdeA3jFlnOvf9Z4DTAeWrqNkoG+Bmmohecz7A
AAAEBO14JzXzjFvaRXnngUoHHfQDoBbc5Ur8lKrMzbBzp6muv/8RFJN14DeMWWc69/1ngN
MB5auo2Sgb4GaaiF5zPsAAAACWpmQEpGLVhQUwECAwQ=
-----END OPENSSH PRIVATE KEY-----

1
gitlab.ssh.pub Normal file
View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOv/8RFJN14DeMWWc69/1ngNMB5auo2Sgb4GaaiF5zPs jf@JF-XPS