Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aufraeumarbeiten im Zuge der Einfuehrung von statischer Codeanalyse.
- Loading branch information
ingo
authored and
ingo
committed
Nov 11, 2017
1 parent
ec581fb
commit 498206e
Showing
10 changed files
with
111 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[Wiki -> check_hcan](https://github.com/hcanIngo/openHCAN/wiki/check_hcan) | ||
[check_hcan: Ueberwachen einer HCAN-Installation via Nagios](https://github.com/hcanIngo/openHCAN/wiki/check_hcan) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,28 @@ | ||
TARGET = hcan4mqttpc | ||
OBJ = main.o mqttClient.o mqttHcan.o | ||
OBJ += ./MQTTPacket/src/MQTTConnectClient.o | ||
OBJ += ./MQTTPacket/src/MQTTSerializePublish.o | ||
OBJ += ./MQTTPacket/src/MQTTPacket.o | ||
OBJ += ./MQTTPacket/src/MQTTSubscribeClient.o | ||
OBJ += ./MQTTPacket/src/MQTTDeserializePublish.o | ||
|
||
SRC = main.c mqttClient.c mqttHcan.c | ||
SRC += ./MQTTPacket/src/MQTTConnectClient.c | ||
SRC += ./MQTTPacket/src/MQTTSerializePublish.c | ||
SRC += ./MQTTPacket/src/MQTTPacket.c | ||
SRC += ./MQTTPacket/src/MQTTSubscribeClient.c | ||
SRC += ./MQTTPacket/src/MQTTDeserializePublish.c | ||
|
||
CXX = clang | ||
|
||
CFLAGS = -I. -Wall -g -Os | ||
CFLAGS += -DDEBUG | ||
CFLAGS += -I ./MQTTPacket/src | ||
|
||
all: $(TARGET) | ||
|
||
$(TARGET): $(OBJ) | ||
$(CXX) -o $@ $(OBJ) | ||
#CFLAGS += -DDEBUG | ||
#CFLAGS += -I ./MQTTPacket/src | ||
|
||
$(OBJ): %.o:%.c | ||
$(CXX) $(CFLAGS) -o $@ -c $< | ||
all: | ||
$(CXX) $(CFLAGS) -o $(TARGET) $(SRC) | ||
|
||
clean: | ||
rm -f *.o $(TARGET) | ||
cd ./MQTTPacket/src; rm -f *.o | ||
|
||
ctags: | ||
ctags *.c *.h | ||
rm -f $(TARGET) | ||
test -d ./scanBuild || sudo rm -R ./scanBuild | ||
|
||
install: | ||
strip ./$(TARGET) | ||
strip $(TARGET) | ||
sudo install $(TARGET) /usr/sbin | ||
|
||
analyse: # clang Static Analyzer -> Report | ||
# scan-build ./configure” (für autoconf-Projekte) | ||
scan-build make | ||
|
||
run: | ||
./$(TARGET) -D | ||
$(TARGET) -D |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
socketCAN - MQTT-Paho-Client: HCAN-socketCAN <-> mqtt | ||
|
||
|
||
Installationsabhaendigkeiten: | ||
----------------------------- | ||
1. Der MQTTPaho-Client (Embedded MQTTPacket) benoetigt keine Shared lib. | ||
|
||
2. mosquitto MQTT-Broker (Datenvermittlungszentrale): | ||
sudo apt-get install mosquitto | ||
-> mosquitto startet automatisch. Kontrolle: ps -A | grep mosq | ||
----------------------------- | ||
|
||
Testmoeglichkeit z.B. per MQTTLens | ||
1. subscribe a topic="cb>" | ||
2. publish a topic="cb<", Msg=ON/2 | ||
|
||
|
||
... | ||
tt@bananapi:~/openHCAN/hcan4mqttc$ ./hcan4mqttc -D | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
TARGET = hcanaddressd | ||
OBJ = main.o socket.o | ||
SRC = main.c socket.c | ||
|
||
CXX = clang | ||
CFLAGS = -O2 -I. -Wall -g #-DDEBUG0 | ||
|
||
all: $(TARGET) | ||
|
||
$(TARGET): $(OBJ) | ||
$(CXX) $(LDFLAGS) -o $@ $(OBJ) | ||
|
||
$(OBJ): %.o:%.c | ||
$(CXX) $(CFLAGS) -o $@ -c $< | ||
all: | ||
$(CXX) $(CFLAGS) -o $(TARGET) $(SRC) | ||
|
||
clean: | ||
rm -f *.o $(TARGET) | ||
|
||
ctags: | ||
ctags *.c *.h | ||
rm -f $(TARGET) | ||
test -d ./scanBuild || sudo rm -R ./scanBuild | ||
|
||
install: | ||
strip ./$(TARGET) | ||
sudo install ./$(TARGET) /usr/sbin | ||
strip $(TARGET) | ||
sudo install $(TARGET) /usr/sbin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
TARGET = hcand | ||
OBJ = main.o socket.o | ||
CFLAGS = -O2 -I. -Wall -g #-DDEBUG0 | ||
SRC = main.c socket.c | ||
|
||
CXX = clang | ||
CFLAGS = -O2 -I. -Wall -g #-DDEBUG0 | ||
|
||
all: $(TARGET) | ||
|
||
$(TARGET): $(OBJ) | ||
$(CXX) $(LDFLAGS) -o $@ $(OBJ) | ||
|
||
$(OBJ): %.o:%.c | ||
$(CXX) $(CFLAGS) -o $@ -c $< | ||
all: | ||
$(CXX) $(CFLAGS) -o $(TARGET) $(SRC) | ||
|
||
clean: | ||
rm -f *.o $(TARGET) | ||
|
||
ctags: | ||
ctags *.c *.h | ||
rm -f $(TARGET) | ||
test -d ./scanBuild || sudo rm -R ./scanBuild | ||
|
||
install: | ||
strip ./$(TARGET) | ||
sudo install ./$(TARGET) /usr/sbin | ||
strip $(TARGET) | ||
sudo install $(TARGET) /usr/sbin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
TARGET = hcansocketd | ||
OBJ = main.o | ||
SRC = main.c | ||
|
||
CXX = clang | ||
|
||
CFLAGS = -O2 -I. -Wall -g #-DDEBUG0 | ||
|
||
|
||
all: $(CONDITIONAL_CLEAN) $(TARGET) | ||
|
||
$(TARGET): $(OBJ) | ||
$(CXX) $(LDFLAGS) -o $@ $(OBJ) | ||
|
||
$(OBJ): %.o:%.c | ||
$(CXX) $(CFLAGS) -o $@ -c $< | ||
|
||
all: | ||
$(CXX) $(CFLAGS) -o $(TARGET) $(SRC) | ||
|
||
clean: | ||
rm -f *.o $(TARGET) | ||
|
||
ctags: | ||
ctags *.c *.h | ||
rm -f $(TARGET) | ||
test -d ./scanBuild || sudo rm -R ./scanBuild | ||
|
||
install: | ||
strip ./$(TARGET) | ||
strip $(TARGET) | ||
sudo install $(TARGET) /usr/sbin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,18 @@ | ||
/* | ||
* This file is part of the HCAN tools suite. | ||
* | ||
* HCAN is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License as published by the Free | ||
* Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* HCAN is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with HCAN; if not, write to the Free Software Foundation, Inc., 51 | ||
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
* | ||
* (c) 2006 by Martin Haller, mah (at) iuse (dot) org | ||
* (c) 2010 by Martin Kramer and Ingo Lages, i (dot) lages (at) gmx (dot) de | ||
*/ | ||
|
||
|
||
|
||
Zum Compilieren und Linken der Dienste und Firmwares reicht ein | ||
|
||
make | ||
|
||
make | ||
auf der Verzeichnisebene dieser liesmich.txt. | ||
|
||
|
||
|
||
|
||
______________________________________________________ | ||
|
||
|
||
In der Datei ARCH.inc ggf. zuvor die gewuenschte/verwendete Architektur einstellen. | ||
|
||
|
||
|
||
Getestet mit folgender Compiler-Versionen: | ||
- clang-4.0 | ||
- libclang1-4.0 | ||
- libclang-common-4.0-dev | ||
- llvm-4.0 | ||
- avr-gcc-4.9.2 | ||
|
||
|
||
______________________________________________________ | ||
Aktuell verwendete Compiler-Versionen (Ubuntu 17.04): | ||
- clang 4.0 | ||
- gcc 6.3.0 | ||
- avr-gcc 4.9.2 | ||
|