Hallo Richard,
danke für die Arbeit. Bei den meisten Sachen gehe ich mit. Genaueres
unten im zitierten Text und in den Tickets.
Ich hätte gern eine Auflistung von Ideen, wie die zukünftige Aufteilung
in Libraries aussehen soll/kann und was dann da rein gehört bzw. was
nicht, auch für Komponenten die es heute noch gar nicht gibt. Das macht
es einfacher darüber zu diskutieren, was man wohin schieben könnte.
Einiges ist ja recht klar. Anderes muss sicher diskutiert werden.
Unfertige Idee:
core
Die Kernfunktionalität: Interrupts, Scheduling, Event Channels
controller-xxx
Diverse Pakete für Controllerfamilien, hardwareabhängiges,
Debugging, (ohne wird core mglw. nicht kompilieren?!)
"platform" sollte hier vielleicht auch mit rein, zwar weiter
in einer extra Ordnerstruktur, aber es ist doch stark verwandt.
components
Einfache generische Komponenten sowie oft verwendetes, eine Art
"Standardbibliothek" mit Prescaler, Delay, Buffer und auch das
VirtualTimer Framework.
devices
Generische Interfaces (I2C, SPI, "I/O Ports", etc.)
Generische Treiberimplementierungen auf Basis dieser
Interfaces, die mit allen Controllern funktionieren.
Vielleicht auch sowas wie z.B. eine "RGB-Led".
examples
Beispielanwendungen für verschiedene Plattformen. Ich mächte ja
gern ein Beispiel immer für mehrere Plattformen haben. Das passt
leider mit den getrennten controller-Bibliotheken nicht so gut.
proof-of-concept/staging
Sachen wie das Update Zeug und Reflection könnten als proof
of concept in eine Art Staging-Area. Vielleicht kann es auch
einfach mit zu den Examples.
Die sinnvollen ADTs müssen wir auch irgendwo unterbringen. Und die nicht
ganz so sinnvollen sollten zur Übersichtlichkeit auch dort sein (oder
ganz entfernt werden). Aber ADTs sind keine Komponenten und keine
Geräte. Vielleicht brauchen wir hierfür eine eigene Library, mit Sachen
die von den "components" und "devices" für die interne Implementierung
genutzt werden können.
Eine weitere Sache sind Protokollstacks für Kommunikation. Ich bin mir
nicht sicher ob das mit zu "devices" gehört. Das sollte vielleicht eher
mit dem XML-Zeug zusammengelegt werden.
Grüße
Stefan
Am 08.07.2014 15:09, schrieb Richard Weickelt:
> Hallo EntwicklerInnen,
>
> im derzeitigen REFLEX-Repository https://bitbucket.org/reflex-dev/reflex/src
> wird der Code folgendermaßen eingeteilt:
>
> :controller:
> Hardwareunterstützung für einzelne Mikrocontroller
> :devices:
> Plattformunabhängige Gerätetreiber
> :lib:
> Plattformunabhängige Zusatzfunktionen
> :platform:
> Treiber und Komponenten für unterschiedliche Umgebungen eines Controllers
> :system:
> Kernfunktionalität
>
> Ich habe nun in den Teilen `devices`, `lib` und `system` sämtlichen
> Quellcode durchforstet und auf seine Verwendung geprüft. Das Ergebnis findet
> ihr im Anhang. Einige Teile sind verwaist und werden nirgendwo mehr benutzt.
> Einige Teile sind nicht ausreichend dokumentiert und ihr Sinn ist unklar. In
> `lib` befinden sich sowohl essentielle Systemfunktionen, als auch eine
> Sammlung von Komponenten und Zusatzfunktionen. In `system` befindet sich
> wiederum Code, der nichts im Kern zu suchen hat. Ich habe versucht, einzelne
> Dateien nach Zusammengehörigkeit zu gruppieren und Vorschläge über die
> weitere Verwendung zu unterbreiten, was in einigen Fällen auch wegschmeißen
> bedeutet. Ich möchte aber auf keinen Fall leichtfertig wertvolle Arbeit
> entwerten und bitte euch daher um Rückmeldungen. Sämtliche Teile habe ich
> auch als Tickets eingeplegt und können online unter
> https://bitbucket.org/reflex-dev/reflex/issues kommentiert werden.
>
> Mit besten Grüßen
> Richard
>
> Source Code Files and Folders
> =============================
>
> .. contents::
>
> Easy Radio driver
> -----------------
> *Files*
>
> - `devices/include/reflex/io/EasyRadio.h`
>
> *Usage*
>
> - none found
>
> *Remarks*
>
> - documentation not usable
>
> *Proposal*
>
> - remove
Ack, aber da Reflex viel für Funk etc. genutzt wird, fände ich es schön
eine Art generische Radiokommunikation anzubieten. Also generische
Kommunikationsstacks die mit verschiedenen Radioimplementierungen
funktionieren. Derzeit ist das glaube ich einfach über die Buffer
geregelt, was ich auch recht sinnvoll finde.
>
>
> EEPROM_24xx512 driver
> ---------------------
> *Files*
>
> - `devices/include/reflex/io/EEPROM_24xx512.h`
> - `devices/src/reflex/io/EEPROM_24xx512.cc`
>
> *Usage*
>
> - `examples/I2CMasterDemo/platform/EZ430-chronos/include/NodeConfiguration.h`
> - `examples/I2CMasterDemo/include/DataLogCompare.h`
>
> *Remarks*
>
> - platform independent driver implementation
> - contains a quite usable documentation
> - but documentation not fully doxygen-compliant
>
> *Proposal*
>
> - keep
> - rework and test documentation
>
Ack, ab damit in die 'devices' library zu I2C und SPI.
>
> I2C driver
> ----------
> *Files*
>
> - `devices/include/reflex/io/I2C.h`
>
> *Usage*
>
> - `platform/EZ430-chronos/include/reflex/io/SCP1000_I2C.h`
> - `examples/I2CMasterDemo/platform/EZ430-chronos/include/NodeConfiguration.h`
> - `controller/MSP430X/include/reflex/io/I2C_Master.h`
> - `controller/MSP430X/include/reflex/usci/USCI_I2C_Master.h`
>
> *Remarks*
>
> - quite good documentation, but not fully doxygen compliant
> - more explanations needed as this is a general interface which
> could be used for any platform
>
> *Proposal*
>
> - keep
> - rework documentation
>
Ack
>
> Abstract Radio module
> ---------------------
> *Files*
>
> - `devices/include/reflex/io/Radio.h`
>
> *Usage*
>
> - `devices/include/reflex/io/EasyRadio.h`
>
> *Remarks*
>
> - seems to be an orphan driver interface
>
> *Proposal*
>
> - remove
>
Ack. Siehe EasyRadio. Das "Radio" als Schnittstelle ist vermutlich nicht
richtig gewählt. Konkrete Treiberimplementierungen sollten stattdessen
auf Kompatibilität über den Ereignisfluss mit Buffern achten.
>
> Compact Flash Adapter Driver
> ----------------------------
> *Files*
>
> - devices/include/reflex/CFAdapter.h
> - devices/src/reflex/CFAdapter.cc
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - driver only used by Karsten
> - depends on a file `SizedFiFoBuffer` which does not exist
>
> *Proposal*
>
> - remove
>
Ack. Schade eigentlich, Zugriff auf Massenspeicher sollten wir elegant
lösen in unserer "devices" library.
>
> Stacktrace Debug Printer
> ------------------------
> *Files*
>
> - `lib/include/misc/stacktrace.h`
>
> *Usage*
>
> - `platform/OMNeTPP/include/reflex/debug/PlatformAssert.h`
>
> *Remarks*
>
> - depends on linux environment
> - only used for OMNeTPP
>
> *Proposal*
>
> - move to `platform/OMNeTPP/include/reflex/debug/stacktrace.h`
>
>
Können wir den für OMNeT++ und guest verwenden? Dann sollte das lieber
in den Controller ("linux", der eigentlich "posix" sein sollte). In lib
hat es aber nichts verloren.
> Component Update
> ----------------
> *Files*
>
> - `lib/include/reflex/componentUpdate/Command.h`
> - `lib/include/reflex/componentUpdate/ComponentManager.h`
> - `lib/src/reflex/componentUpdate/ComponentManager.cc`
> - `doc/ComponentUpdate.tex`
>
> *Usage*
>
> - `examples/update`
>
> *Remarks*
>
> - documentation only available for LaTeX
> - only used in an example application for EZ430-chronos
> - functionality is hard to test and very specific
>
> *Proposal*
>
> - merge driver with example application
> - convert documentation to doxygen
>
Ack. Das ist leider nicht so generisch wie wir es gern hätten. Eher nur
ein "Proof-of-Concept" für eine Plattform.
>
> ADT: BCD
> --------
> *Files*
>
> - `lib/include/reflex/data_types/BCD.h`
> - `lib/src/reflex/data_types/BCD.cc`
>
> *Usage*
>
> - `controller/MSP430X/include/reflex/rtc/Registers.h`
> - `platform/EM430/src/reflex/power/Battery.cc`
> - `platform/EZ430-chronos/include/reflex/io/Display.h`
>
> *Remarks*
>
> - documentation does not explain the purpose and usage of this adt
> - seems to be only used for EZ-chronos
>
> *Proposal*
>
> - move to MSP430X controller support package
>
BCD ist für "Binary-Coded-Decimal" Zahlen. Das würde ich gern als
generischen ADT behalten.
>
> ADT: BitField
> -------------
> *Files*
>
> - `lib/include/data_types/BitField.h`
>
> *Usage*
>
> - `controller/atmega/include/reflex/io/ExternalInterrupt.h`
> - has been used in a driver for an ethernet controller as well, which has
> been removed
>
> *Remarks*
>
> - documentation is usable, but deserves improvement
>
> *Proposal*
>
> - keep
>
Ack.
>
> ADT: ChainLink
> --------------
> *Files*
>
> - `lib/include/reflex/data_types/ChainLink.h`
>
> *Usage*
>
> - `lib/src/reflex/memory/FreeList.cc`
> - `lib/src/reflex/data_types/FiFoQueue.cc`
> - `lib/src/reflex/data_types/Queue.cc`
> - `lib/include/reflex/memory/SizedPool.h`
> - `lib/include/reflex/memory/Buffer.h`
> - `lib/include/reflex/memory/FreeList.h`
> - `lib/include/reflex/data_types/ChainLink.h`
> - `lib/include/reflex/data_types/List.h`
> - `lib/include/reflex/data_types/Queue.h`
> - `lib/include/reflex/data_types/FifoQueue.h`
> - all activity types and schedulers
> - `system/include/reflex/powerManagement/PowerManageAble.h`
> - `controller/atmega/include/reflex/io/ADChannel.h`
>
> *Remarks*
>
> - essential adt
>
> *Proposal*
>
> - keep in core
> - better documentation, but only for core-developers
> - no doxygen documentation
>
Hmm, ja ... core oder weiter bei den anderen ADTs. Oder alle ADTs in den
core... ich bin unsicher.
>
> ADT: Converter
> --------------
> *Files*
>
> - `lib/include/reflex/data_types/Converter.h`
>
> *Usage*
>
> - `lib/include/reflex/data_types/Partial.h`
>
> *Remarks*
>
> - not well documented
>
> *Proposal*
>
> - move to the same place as ADT Partial
> - integrate into ADT Partial if necessary
> - remove from doxygen documentation
>
Ich weiss grad auch nicht wofür das gut ist. Scheinbar dienen einige
ADTs ja nur der besseren Implementierung sinnvoller ADTs. Die sollten
dann tatsächlich als Implementierungsdetail vor Doxygen versteckt werden.
>
> ADT: Encode
> -----------
> *Files*
>
> - `lib/include/reflex/data_types/Encode.h`
>
> *Usage*
>
> - `lib/include/reflex/data_types/BCD.h`
> - `platform/EM430/src/reflex/power/Battery.cc`
> - `platform/EZ430-chronos/include/reflex/io/Display.h`
>
> *Remarks*
>
> - purpose and usage is undocumented
> - seems to be only used for platforms EM430 and ez-chronos
>
> *Proposal*
>
> - move to MSP430X controller support package
>
Nein, den möchte ich gern als generischen ADT bei den ADTs behalten.
Bzw. betrachte ich es als Implementierungshilfe für andere ADTs ähnlich
wie Partial.
>
> ADT: Automatic endianness containers
> ------------------------------------
> *Files*
>
> - `lib/include/reflex/data_types/Endianness.h`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - documentation contains code example
>
> *Proposal*
>
> - keep
> - purpose of this code is a little bit unclear
> - documentation should point out the application to network buffers
>
Ack.
>
> ADT: FifoQueue
> --------------
> *Files*
>
> - `lib/include/reflex/data_types/FifoQueue.h`
> - `lib/src/reflex/data_types/FifoQueue.cc`
>
> *Usage*
>
> - `platform/AIF430/include/reflex/io/T123A.h`
> - `system/include/reflex/scheduling/FifoScheduler.h`
> - `system/include/reflex/sinks/Queue.h`
> - `system/include/reflex/powerManagement/PowerManager.h`
>
> *Remarks*
>
> - essential ADT
> - FifoQueue is a misnomer, since it means just Queue
>
> *Proposal*
>
> - merge functionality with Queue
>
Full Ack. Dieses Queue/FifoQueue Zeug fand ich schon immer sehr verwirrend.
>
> ADT: Flags
> ----------
> *Files*
>
> - `lib/include/reflex/data_types/Flags.h`
>
> *Usage*
>
> - `lib/include/reflex/xml/XmlHandler.h`
> - `controller/atmega/include/reflex/io/PinChangeInterrupt.h`
> - `controller/atmega/include/reflex/io/IOPort.h`
>
> *Remarks*
>
> - well documented
>
> *Proposal*
>
> - keep
>
Ack.
>
> ADT: Helper
> -----------
> *Files*
>
> - `lib/include/reflex/data_types/Helper.h`
>
> *Usage*
>
> - `lib/include/reflex/data_types/ReadOnly.h`
> - `lib/include/reflex/data_types/Register.h`
> - `controller/MSP430X/include/reflex/io/Registers.h`
>
>
> *Remarks*
>
> - purpose of this file is unclear
>
> *Proposal*
>
> - move to MSP430X controller support package
>
Hab ich mir noch nicht angeguckt, aber vermutlich das gleiche wie
Partial und Encode. Da es von ReadOnly gebraucht wird, sollte es für die
generischen ADTs verfügbar bleiben.
>
> ADT: List
> ---------
> *Files*
>
> - `lib/include/reflex/data_types/List.h`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - no documentation
> - seems to be an unfinished implementation
> - mixes linked list and iterator
>
> *Proposal*
>
> - drop
>
Ack. Du beschreibst unten ja alternative Listenimplementierungen (TList).
>
> ADT: Partial
> ------------
> *Files*
>
> - `lib/include/reflex/data_types/Partial.h`
>
> *Usage*
>
> - `lib/include/reflex/data_types/BCD.h`
> - `lib/include/reflex/data_types/Register.h`
> - `controller/MSP430X/include/reflex/rtc/Registers.h`
> - `controller/MSP430X/include/reflex/adc/ADC12_A.h`
> - `controller/MSP430X/include/reflex/adc/ADC12_A.h`
>
> *Remarks*
>
> - causes doxygen to crash
> - documentation insufficient, purpose and usage not clear
>
> *Proposal*
>
> - move to MSP430X controller support package
>
Das ist wirklich "superior template-fu", sollte aber nicht zum
Controller sondern wie "Helper" als Implementierungsstütze für die ADTs
verfügbar bleiben.
>
> ADT: Queue
> ----------
> *Files*
>
> - `lib/include/reflex/data_types/Queue.h`
> - `lib/src/reflex/data_types/Queue.cc`
>
> *Usage*
>
> - `lib/include/reflex/data_types/FifoQueue.h`
>
> *Remarks*
>
> - does not include essential queue methods enqueue and dequeue
> - these methods are instead implemented in ``FifoQueue``
> - documentation does not exist
> - it's unclear, what code should be covered by runtime asserts
>
> *Proposal*
>
> - keep and merge with ``FifoQueue``
> - improve documentation, maybe steal from Qt
> http://qt-project.org/doc/qt-5/qqueue.html
>
Ack.
>
> ADT: ReadOnly / WriteOnly
> -------------------------
> *Files*
>
> - `lib/include/reflex/data_types/ReadOnly.h`
> - `lib/include/reflex/data_types/WriteOnly.h`
>
> *Usage*
>
> - `controller/MSP430X/include/reflex/rtc/Registers.h`
> - `controller/MSP430X/include/reflex/lcd/Registers.h`
> - `controller/MSP430X/include/reflex/timer/Registers.h`
> - `controller/MSP430X/include/reflex/MachineDefinitions.h`
> - `controller/MSP430X/include/reflex/io/Registers.h`
> - `controller/MSP430X/include/reflex/io/Ports.h`
> - `controller/MSP430X/include/reflex/adc/Registers.h`
> - `controller/MSP430X/include/reflex/usci/Registers.h`
> - `controller/MSP430X/include/reflex/sys/Registers.h`
> - `controller/MSP430/include/reflex/io/Port.h`
>
> *Remarks*
>
> - seems to be only used for MSP430(x)
> - WriteOnly isn't used at all
>
> *Proposal*
>
> - move to MSP430X controller support package if support for
> MSP430 (without X) is omitted
>
Ich würde die gern als ADT behalten. Es ist generisch genug um nicht in
einen Controller-Zweig verbannt zu werden.
>
> ADT: Register
> -------------
> *Files*
>
> - `lib/include/data_types/Register.h`
>
> *Usage*
>
> - `lib/include/reflex/data_types/ReadOnly.h`
> - `controller/MSP430X/include/reflex/io/Registers.h`
>
> *Remarks*
>
> - purpose and benefit over simple small integer types is not
> well documented
> - seems to be only used on MSP430X
>
> *Proposal*
>
> - move to MSP430X controller support package
>
Ich sehe keinen Grund das in den Controller-Zweig zu schieben.
>
> ADT: Singleton
> -------------------------------------
> *Files*
>
> - `lib/include/reflex/data_types/Singleton.h`
>
> *Usage*
>
> - `lib/include/reflex/timer/VirtualTimer.h`
> - `platform/EM430/include/reflex/io/Button_S2.h`
> - `platform/EZ430-chronos/include/reflex/io/SCP1000.h`
> - `platform/EZ430-chronos/include/reflex/io/Buttons.h`
> - `platform/EZ430-chronos/include/reflex/io/CMA3000.h`
> - `platform/EZ430-chronos/include/reflex/io/SCP1000_I2C.h`
> - `platform/EZ430-chronos/include/reflex/io/Button.h`
> - `platform/EZ430-chronos/include/reflex/io/SHT7x.h`
> - `examples/unitTest/include/TestEnvironment.h`
> - `controller/MSP430X/include/reflex/io/SoftUART.h`
> - `controller/atmega/include/reflex/io/ADConverter.h`
> - `controller/atmega/include/reflex/io/ADChannel.h`
>
> *Remarks*
>
> - well documented
> - essential adt
>
> *Proposal*
>
> - keep
>
Ack.
>
> ADT: Static
> -----------
> *Files*
>
> - `lib/include/reflex/data_types/Static.h`
>
> *Usage*
>
> - `platform/OMNeTPP/include/reflex/debug/OmnetDebug.h`
> - `system/include/reflex/interrupts/InterruptDispatcher.h`
> - `system/include/reflex/sinks/Sink.h`
>
> *Remarks*
>
> - unfinished documentation and implementation
> - unlike Singleton it does not provide constructor parameters
>
> *Proposal*
>
> - keep, but improve documentation
>
Ack.
>
> SizeOf Debug Printer
> --------------------
> *Files*
>
> - `lib/include/reflex/debug/SizeOf.h`
>
> *Usage*
>
> - `lib/include/reflex/data_types/Partial.h`
> - `lib/include/reflex/data_types/Register.h`
> - `examples/updateDataSend/platform/EZ430-chronos/include/NodeConfiguration.h`
> - `examples/update/platform/EZ430-chronos/include/NodeConfiguration.h`
>
>
> *Proposal*
>
> - remove includes in other files since this should be only used
> during development
> - merge with other debug files from system
>
Hmm, ich wollte das Debug Zeug ja gern zum Controller packen. Das wird
vielleicht problematisch mit den Abhängigkeiten zu den ADTs. Grundlegend
stimme ich aber zu.
>
> ADT: Type Markers
> -------------------------------------
> *Files*
>
> - `lib/include/reflex/data_types/TypeMarkers.h`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - unfinished implementation
>
> *Proposal*
>
> - remove
>
Ack.
>
> Event Channel Reflection API
> ----------------------------
> *Files*
>
> - `lib/include/reflex/io/Echo.h`
> - `lib/include/reflex/io/InteractiveElement.h`
> - `lib/include/reflex/io/IOManager.h`
> - `lib/include/reflex/io/OutputElement.h`
> - `lib/src/reflex/io/Echo.cc`
> - `lib/src/reflex/io/InteractiveElement.cc`
> - `lib/src/reflex/io/IOManager.cc`
> - `lib/src/reflex/io/OutputElement.cc`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - although some documentation exists, it does not explain the
> the concept behind and for what it is good
> - nobody has touched that for years
>
> *Proposal*
>
> - remove
>
Ack. Das habe ich noch nie in Benutzung gesehen. Vielleicht kann man es
auch in eine extra Anwendung (example/proof-of-concept) auslagern.
>
> OutputChannel
> -------------------------------------
> *Files*
>
> - `lib/include/reflex/io/OutputChannel.h`
> - `lib/src/reflex/io/OutputChannel.cc`
>
> *Usage*
>
> - `examples/update`
> - `examples/HelloWorld`
> - `examples/radiobeacon`
> - `examples/TmoteUpdate`
> - `examples/VirtualTimers`
> - `examples/unitTest`
> - `howto`
>
>
> *Remarks*
>
> - does not fit very well into the event-flow model
> - some of the methods check buffer size, some not;
> may lead to unexpected behaviour
>
> *Proposal*
>
> - should rather be a formatter object for arbitrary content
> in any memory and not bound to buffers -> `StringFormatter`
> - but sprintf which is available on many platforms can probably
> do a better job, or a light-weight implementation of sprintf
> could be copied from somewhere (license?!)
>
Sowas wie sprintf wird für Microcontroller glaube ich mittlerweile von
"newlib" bereitgestellt. Wir müssen aber schauen ob mspgcc4 damit klar
kommt. Der OutputChannel ist als Art Abstraktion gedacht, der Buffer
weiterleitet an die Serielle Schnittstelle oder Radio oder Ähnliches.
Das würde ich vielleicht lieber erstmal nicht anfassen, außer es in die
"components" library zu schieben.
>
> Generic Spi driver
> ------------------
> *Files*
>
> - `lib/include/reflex/io/Spi.h`
>
> *Usage*
>
> - `controller/atmega/include/reflex/io/SpiHardware.h`
>
> *Remarks*
>
> - documentation needs some spell corrections
> - driver only used on atmega
>
> *Proposal*
>
> - keep, since it's also one of the view better documented classes
>
Ack. Gehört aber zu den "devices" und nicht in "components"
>
> Buffers & Pools
> ---------------
> *Files*
>
> - `lib/include/reflex/memory/Buffer.h`
> - `lib/include/reflex/memory/BufferPointer.h`
> - `lib/include/reflex/memory/FreeList.h`
> - `lib/include/reflex/memory/Pool.h`
> - `lib/include/reflex/memory/PoolManager.h`
> - `lib/include/reflex/memory/SizedPool.h`
> - `lib/src/reflex/memory/Buffer.cc`
> - `lib/src/reflex/memory/FreeList.cc`
> - `lib/src/reflex/memory/Pool.cc`
> - `lib/src/reflex/memory/PoolManager.cc`
>
> *Usage*
>
> - `examples/update`
> - `examples/HelloWorld`
> - `examples/radiobeacon`
> - `examples/updateDataSend`
> - `examples/PingPong`
> - `lib/include/reflex/net/*`
> - `lib/include/reflex/xml/*`
> - different hardware drivers on all platforms
> - `OutputChannel`
> - `howto/doc/ReflexHowto.tex` and some code examples
>
> *Remarks*
>
> - contains documentation, but overall concept is not explained well
> - error-prone due to ambigious API
>
> *Proposal*
>
> - keep, since it's widely used and essential for many components
> in order to work
> - maybe move to seperate buffer module
> - remove application dependencies; find a solution for `PoolManager`
> similar to `VirtualizedTimer`
> - remove orphan `BufferPointer.h` file
>
Ack. Das gehört für mich zu "components" und für den PoolManager muss
tatsächlich eine bessere Lösung her.
>
> Memory operations
> -----------------
> *Files*
>
> - `lib/include/reflex/memory/memcmp.h`
> - `lib/include/reflex/memory/memcpy.h`
> - `lib/include/reflex/memory/memmove.h`
> - `lib/include/reflex/memory/memset.h`
>
> *Usage*
>
> - `lib/src/reflex/memory/Buffer.cc`
> - `system/include/reflex/SystemStatusBlock.h`
> - `controller/MSP430X/src/reflex/memory/memcpy.cc`
> - `controller/MSP430X/include/reflex/rtc/Registers.h`
> - `controller/MSP430/src/reflex/memory/Flash.cc`
>
> *Remarks*
>
> - functions rather belong into libc (e.g. gnu binutils)
> - gcc for avr, msp430 and linux support libc
>
> *Proposal*
>
> - remove, since this doubles functionality from libc
> - for platforms without libc, these functions could be implemented
> in a distinct package or on the platform itself
> - remove memcpy from system status block or remove
> SystemStatusBLock from core
> - remove memset from InterruptDispatcher or remove InterruptDispatcher
> from core
>
SystemStatusBlock ist gedacht für alle persistenten Systemdaten. Das ist
im Core vielleicht schon sinnvoll, auch wenn es kaum genutzt wird. Die
memory Operations gibt es z.B. auch in "newlib", was grad für
Embedded-Toolchains eine Art Standard zu werden scheint. Das gehört
tatsächlich zum controller, der entscheiden muss ob es von der Toolchain
bereitgestellt wird oder nicht.
>
> Placement new/delete Operator
> -------------------------------------
> *Files*
>
> - `lib/include/reflex/memory/new.h`
>
> *Usage*
>
> - `lib/include/reflex/memory/FreeList.h`
> - `lib/include/reflex/data_types/Singleton.h`
> - `examples/unitTest/include/TestSuite.h`
> - `controller/MSP430X/include/reflex/pmm/PMM.h`
>
>
> *Remarks*
>
> - discussion needed, whether to keep this in kernel or not
>
> *Proposal*
>
> - rework implementation of new / delete in FreeList because
> dependency should not be necessary
>
Das hab ich mir noch nicht angeguckt, aber Abhängigkeiten beseitigen
klingt gut.
>
> Random Generator
> ----------------
> *Files*
>
> - `lib/include/reflex/misc/random/Random.h`
> - `lib/include/reflex/misc/random/XORSHIFT16b.h`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - none
>
> *Proposal*
>
> - remove
>
Ich würde es lieber zu den "components" packen. Es ist ein sinnvoller
Algorithmus in Software. Leider ist es keine Komponente sondern eher ein
ADT. Da müssen wir diskutieren.
>
> Delay Component
> ---------------
> *Files*
>
> - 'lib/include/reflex/misc/Delay.h'
> - 'lib/include/reflex/misc/Delay.cc'
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - purpose and usage is unclear from the documentation
>
> *Proposal*
>
> - keep, but move to a component library
> - merge .cc and .h file
>
Ack.
>
> Distributor Component
> ---------------------
> *Files*
>
> - `lib/include/reflex/misc/Distributor.h`
> - `lib/include/reflex/misc/Distributor.cc`
>
> *Usage*
>
> *Remarks*
>
> - purpose and usage and behaviour is unclear from the documentation
>
> *Proposal*
>
> - keep, but move to a component library
> - merge .h and .cc file
>
Ack.
>
> Logarithm Calculation Class
> ---------------------------
> *Files*
>
> - `lib/include/reflex/misc/Logarithm.h`
>
> *Usage*
>
> - `lib/include/reflex/xml/XmlConverterInteger.h`
>
> *Remarks*
>
> - not very well documented
> - seems to be only used in XML library
>
> *Proposal*
>
> - remove from doxygen documentation
> - move to separate XML library
>
Hihi, das ist schick. So einen richtigen Platz hat das leider nicht. Für
die XML library (bzw. Kommunikationsstacks library) ist mir das
eigentlich zu generisch. Vielleicht lieber zu den ADTs?
>
> Prescaler.h
> -----------
> *Files*
>
> - `lib/include/reflex/misc/Prescaler.h`
> - `lib/src/reflex/misc/Prescaler.h`
>
> *Usage*
>
> - `lib/include/reflex/net/CAMac.h`
> - `examples/TmoteUpdate/1/include/HelloWorld.h`
> - `examples/TmoteUpdate/2/include/HelloWorld.h`
> - `examples/XmlBlinker/include/XmlBlinker.h`
>
> *Remarks*
>
> - documentation is short
>
> *Proposal*
>
> - move to separate component library
>
Ack.
>
> Timetable
> ---------
> *Files*
>
> - `lib/include/reflex/misc/Timetable.h`
> - `lib/src/reflex/misc/Timetable.cc`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - purpose unclear
> - seems to be an outdated implementation
>
> *Proposal*
>
> - remove
>
Ack.
>
> CAMac Component
> ---------------
> *Files*
>
> - `lib/include/reflex/net/CAMac.h`
> - `lib/src/reflex/net/CAMac.cc`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - does not contain any documentation
> - purpose unknown
>
> *Proposal*
>
> - remove
>
Ack. Das Zeug ist leider alles nicht so recht zu gebrauchen. Sonst
sollte es mit zu den Kommunikationsstacks.
>
> Manchester Coder Component
> --------------------------
> *Files*
>
> - `lib/include/reflex/net/ManchesterCoder.h`
> - `lib/src/reflex/net/ManchesterCoder.cc`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - does not contain any documentation
> - purpose unknown
>
> *Proposal*
>
> - remove
>
Ich glaube die Implementierung ist nicht so toll, sonst zu den
Kommunikationsstacks.
>
> Serial Packetizer
> -----------------
> *Files*
>
> - `lib/include/reflex/net/Packetizer.h`
> - `lib/src/reflex/net/Packetizer.cc`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - even though it contains some documentation, it seems to be unused
>
> *Proposal*
>
> - remove
>
>
Siehe CAMac/Manchester/...
> Packet (De-)Multiplexer
> -----------------------
> *Files*
>
> - `lib/include/reflex/net/PacketMuxDemux.h`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - no documentation
>
> *Proposal*
>
> - remove
>
Siehe CAMac/Manchester/...
>
> Timer Functor Component
> -----------------------
> *Files*
>
> - `lib/include/reflex/timer/TimerFunctor.h`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - none
>
> *Proposal*
>
> - remove
>
Das war als Shortcut für ActivityFunctor getriggert durch Timer gedacht.
Ich weiss nicht ob der unbedingt weg muss, aber er ist sicher nicht
essentiell.
>
> Virtual Timer
> -------------
> *Files*
>
> - `lib/include/reflex/timer/VirtualizedTimer.h`
> - `lib/include/reflex/timer/VirtualTimer.h`
> - `lib/include/reflex/timer/VTimerBase.h`
> - `lib/src/reflex/timer/VirtualizedTimer.cc`
> - `lib/src/reflex/timer/VirtualTimer.cc`
> - `system/include/reflex/timer/HardwareTimer.h`
>
> *Usage*
>
> - various drivers on various platforms
> - various examples
>
>
> *Remarks*
>
> - essential for most applications
> - dependencies to all platforms in order to work
> (HardwareTimer, VirtualTimerSupport)
> - underlaying hardware timer is currently fixed for each
> platform. But this should be up to the application.
>
> *Proposal*
>
> - move platform-independent parts to separate virtual timer
> library
> - move hardware timer to controller support package
> - implement virtual timer support in a way that it can be
> configured during application startup e.g.
> ``VirtualTimer::core()->setHardwareTimer(hwTimer);``.
> Any platform is free to provide helper classes / methods
> for convenience.
>
Ack. Ich mächte den aber lieber mit zu den "components" anstatt eine
eigene library. Siehe Ticket.
>
> Demangle
> --------
> *Files*
>
> - `lib/include/reflex/utils/Demangle.h`
>
> *Usage*
>
> - none
>
> *Remarks*
>
> - purpose and functionality unclear
>
> *Proposal*
>
> - remove
>
Hab ich mir noch nicht angeschaut.
>
> XML Event Channel Wrappers
> --------------------------
> *Files*
>
> - `lib/include/reflex/xml/*`
> - `lib/src/reflex/xml/*`
> - `lib/include/reflex/memory/DefaultMemoryPolicy.h`
> - `controller/XXX/include/reflex/memory/MemoryPolicy.h`
>
> *Usage*
>
> - XMLBlinker example
>
> *Remarks*
>
> - platform dependent through memory policy -- a way for transparent
> access to flash memory on different architectures
> - well documented
>
> *Proposal*
>
> - move to separate XML library
> - try to use named address spaces for harvard architectures
>
Ack. Oder Kommunikationsstacks library.
>
> Assertions
> ----------
>
> *Files*
>
> - `system/include/reflex/debug/Assert.h`
> - `system/include/reflex/debug/StaticAssert.h`
>
> *Usage*
>
> - everywhere
>
> *Remarks*
>
> - static asserts are a built-in feature of C++11 compilers
> - platform-specific asserts are not possible for the kernel if we
> compile the kernel before platform package has been loaded
>
> *Proposal*
>
> - replace ``STATIC_ASSERT`` with built-in ``static_assert``
> - start discussion about assertions on mailing list
>
Hätte ich gern bei dem Debug-Zeug zum Controller, der dann über die
Implementierung entscheiden muss. Die mspgcc4 Toolchain macht da
bestimmt Probleme.
>
> Configurable Driver Objects
> ---------------------------
> *Files*
>
> - `system/include/reflex/driverConfiguration/AccelerationSensorConfiguration.`
> - `system/include/reflex/driverConfiguration/ConfigurableDriver.h`
> - `system/include/reflex/driverConfiguration/ConfigurableObject.h`
> - `system/include/reflex/driverConfiguration/RadioConfiguration.h`
> - `system/include/reflex/driverConfiguration/RTCConfiguration.h`
>
> *Usage*
>
> - `controller/MSP430X/include/reflex/rf/RADIO.h`
> - `controller/MSP430X/include/reflex/rtc/RTC_A.h`
> - `platform/EZ430-chronos/include/reflex/io/CMA3000.h`
>
> *Remarks*
>
> - documentation is not bad, but needs to better point out the big picture
> - seems to be only used in MSP430X, example is missing
>
>
> *Proposal*
>
> - move to MSP430X controller support package or into a separate package if
> somebody wants to maintain it
>
Das ist viellleicht sinnvoll bei den "devices". Könnte eine Möglichkeit
sein viele davon plattformunabhängiger zu machen. Es gehört nicht zum
Kern aber eigentlich auch nicht nur zu dem einen Controller.
>
> Interrupt Dispatcher
> --------------------
> *Files*
>
> - `system/include/reflex/interrupts/InterruptDispatcher.h`
>
> *Usage*
>
> - `controller/MSP430X/include/reflex/rtc/Registers.h`
> - `controller/MSP430X/include/reflex/timer/Timer0_A5.h`
> - `controller/MSP430X/include/reflex/timer/Registers.h`
> - `controller/MSP430X/include/reflex/io/Ports.h`
> - `controller/MSP430X/include/reflex/adc/Registers.h`
> - `controller/MSP430X/include/reflex/usci/Registers.h`
> - `controller/MSP430X/include/reflex/sys/Registers.h`
> - `controller/MSP430X/include/reflex/sys/SYS.h`
> - `platform/EZ430-chronos/include/reflex/io/SCP1000.h`
> - `platform/EZ430-chronos/include/reflex/io/Buttons.h`
> - `platform/EZ430-chronos/include/reflex/io/CMA3000.h`
> - `platform/EZ430-chronos/include/reflex/io/SCP1000_I2C.h`
> - `platform/EZ430-chronos/include/reflex/io/SHT7x.h`
>
>
> *Remarks*
>
> - contains some documentation, but not enough to fully understand it
> - specific implementation under the assumption to use MSP430X
> - seems to be only used on MSP430X
>
> *Proposal*
>
> move to MSP430X controller support package
>
Der Dispatcher löst ein Problem mit der Implementierung der Interrupts
auf MSP430X, wo ein Interrupt (für ein Gerät) über ein Register
signalisiert, welcher Interrupt (für das Gerät) tatsächlich eingetreten
ist. Wir sind davon ausgegangen, dass es in Zukunft auch noch andere
Controller geben wird, die sowas benötigen. Ich bin mir unsicher über
die Zukunft ;)
>
> Interrupt Subsystem
> -------------------
> *Files*
>
> - `system/include/reflex/interrupts/InterruptFunctor.h`
> - `system/include/reflex/interrupts/InterruptGuardian.h`
> - `system/include/reflex/interrupts/InterruptHandler.h`
> - `system/include/reflex/interrupts/InterruptLock.h`
>
> *Usage*
>
> - everywhere
>
> *Remarks*
>
> - ``InterruptGuardian`` depends on the maximum number of interrupt handlers
> which
> is defined in the controller support package
> - ``InterruptGuardian`` needs direct access to the scheduler to call
> ``enterScheduling()`` and ``leaveScheduling()``
> - ``InterruptHandler`` is interwoven with power management which is
> problematic
> (see issue #10)
> - the documentation of ``InterruptLock`` not enough to understand it
> - the general concept of interrupt locking applies only to single-core systems
> which is not a problem at the moment
>
> *Proposal*
>
> - remove machine dependency by using a pointer to the interrupt table and
> taking table size via constructor. This is not less efficiant than the
> current implementation
> - move implementation of ``registerInterruptHandler()`` and
> ``unregisterInterruptHandler()`` to the platform independent part
> - move init functionality to platform independent constructor
> - seperate interrupt handling from power mangement
> - improve documentation of ``InterruptLock``
>
Ack. Hört sich gut an hat aber vielleicht Zeit. Die Abhängigkeit
zwischen Core und Controller werden wir vielleicht auch nicht komplett
weg bekommen. "Dependency Injection" durch den Konstruktor ist aber
guter Stil.
>
> Scheduling List Implementation
> ------------------------------
> *Files*
>
> - `system/include/reflex/lib/TList.h`
>
> *Usage*
>
> - `system/include/reflex/scheduling/PrioritySchedulerNonPreemptive.h` (sorted)
> - `system/include/reflex/scheduling/EDFScheduler_simple.h` (sorted)
> - `system/include/reflex/scheduling/PriorityScheduler.h` (sorted, unsorted)
> - `system/include/reflex/scheduling/TimeTriggeredScheduler.h`
> (sorted/unsorted)
> - `system/include/reflex/scheduling/EDFSchedulerNonPreemprive.h` (sorted)
> - `system/include/reflex/scheduling/EDFScheduler.h` (sorted/unsorted)
> - `system/include/reflex/scheduling/PriorityScheduler_simple.h` (sorted)
>
> *Remarks*
>
> - a list implementation only used inside the scheduler framework
> - implements sorted and unsorted behaviour, which makes the API messy
>
> *Proposal*
>
> - split API in sorted and unsorted behaviour: ``LinkedList``,
> ``SortedLinkedList``
> - harmonize API with STL or Qt
> - integrate list with other abstract data types
> - base the Queue (``LinkedQueue``) implementation on ``LinkedList``
>
Ack.
>
> Proto Threads
> ---------------------
> *Files*
>
> - `system/include/reflex/scheduling/LocalContinuation.h`
> - `system/include/reflex/scheduling/LocalContinuationSwitch.h`
> - `system/include/reflex/scheduling/ProtoThread.h`
> - `system/include/reflex/scheduling/ProtoThreadFunctor.h`
> - `system/include/reflex/scheduling/ProtoThreadSemaphore.h`
> - `system/include/reflex/scheduling/ProtoThreadTimer.h`
> - `system/include/reflex/scheduling/ProtoThreadWait.h`
>
> *Usage*
>
> - `platform/EZ430-chronos/include/reflex/io/SCP1000.h` / `.cc`
> - `platform/EZ430-chronos/include/reflex/io/CMA3000.h` / `.cc`
>
>
> *Remarks*
>
> - good documentation
> - seems to be only used on ED430-chronos
>
> *Proposal*
>
> - move to separate library
>
ich weiss grad nicht wohin damit. Ich will nicht zu viele Libraries.
ProtoThreads sind sehr praktisch für die Implementierung von State
Machines wie sie in vielen Gerätetreibern benötigt werden. Vielleicht
sollten wir das im Kern behalten. Ich gehe davon aus, dass es oft in der
"devices" library benutzt werden kann.
>
> Scheduling Framework
> --------------------
> keep as is
>
Ack.
>
> Event Channels
> --------------
> keep as is
>
Ack.
>
> Clock
> -----
> *Files*
>
> - `system/include/reflex/timer/Clock.h`
> - `system/src/reflex/timer/Clock.cc`
>
> *Usage*
>
> - `system/include/reflex/scheduling/EDFScheduler_simple.h`
> - `system/include/reflex/scheduling/EDFSchedulerNonPreemptive.h`
> - `system/include/reflex/scheduling/EDFSchedulerNonPreemptive.h`
>
> *Remarks*
>
> - application dependency to ``MAXTIME``
> - nearly the same functionality as ``Prescaler``
>
> *Proposal*
>
> - integrate into the schedulers as this has been done in
> time-triggered scheduler as well
>
Ack. Siehe Ticket.
>
> Over-the-air Update on TMoteSky
> -------------------------------
> *Files*
>
> - `system/include/reflex/update/*`
> - `system/src/reflex/update/*`
> - `system/include/reflex/SystemStatusBlock.h`
> - `system/src/reflex/SystemStatusBlock.cc`
>
> *Usage*
>
> - `controller/MSP430/include/reflex/update/*`
> - `examples/TmoteUpdate/*`
> - `controller/SKELETON/include/reflex/System.h`
> - `controller/MSP430X/include/reflex/System.h`
> - `controller/MSP430/include/reflex/System.h`
>
> *Remarks*
>
> - overall concept not documented
> - not platform-independent, implemented only for MSP430
> - ``SystemStatusBlock`` pollutes every ``System`` object even though
> it is not used
>
> *Proposal*
>
> - remove or move the code to separate library / example
>
Ack. Example oder "proof-of-concept". An den Tmotes macht bei uns auch
keiner mehr aktiv etwas.
>
> Unknown Updater
> ---------------
> *Files*
>
> - `system/include/reflex/updater/BSL_Update.h`
> - `system/include/reflex/updater/UpdateTypes.h`
> - `system/src/reflex/updater/BSL_Update.cc`
> - `system/utils/wirelessUpdate/uploaderv1.0.py`
>
> *Usage*
>
> - `controller/MSP430X/include/reflex/System.h`
> - `controller/MSP430X/src/reflex/rf/RADIO.cc`
> - `examples/updateDataSend/include/UpdateDataSend.h`
>
> *Remarks*
>
> - undocumented, purpose and functionality is unclear
>
> *Proposal*
>
> - remove
>
Ich kenne den Stand davon nicht. Aber vermutlich auch maximal
"proof-of-concept". OTA Updates sind aber eine schöne Sache, die wir
vielleicht nochmal richtig angehen sollten.
Grüße
Stefan.