Skip to content

Commit

Permalink
Merge pull request #3 from BlueAndi/release/v0.1.x
Browse files Browse the repository at this point in the history
Initial release preparation v0.1.0
  • Loading branch information
BlueAndi authored Jun 14, 2024
2 parents c45887d + 5b0bac5 commit a1ea268
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 3 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This library provides for this use case some Arduino interfaces, but not all yet
## Table of content

* [Architecture](#architecture)
* [The Principle](#the-principle)
* [Detail](#detail)
* [How to integrate the library?](#how-to-integrate-the-library)
* [Example](#example)
* [Used Libraries](#used-libraries)
Expand All @@ -20,15 +22,23 @@ This library provides for this use case some Arduino interfaces, but not all yet

# Architecture

TODO
## The Principle

![Principle](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com//BlueAndi/ArduinoNative/master/doc/uml/Principle.plantuml)

## Detail

![ArduinoNative](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/ArduinoNative/master/doc/uml/ArduinoNative.plantuml)

![DynamicFlow](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/ArduinoNative/master/doc/uml/DynamicFlow.plantuml)

# How to integrate the library?
1. Add it to the _platformio.ini_ in your environment to the _lib\_deps_ section:
```
lib_deps =
BlueAndi/ArduinoNative @ ~0.1.0
```
3. TODO
2. Call the ```Arduino::setup()``` once and the ```Arduino::loop()``` in a infinite loop in your main entry point function.
## Example
See [minimal example](./examples/example/).
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.

GENERATE_LATEX = YES
GENERATE_LATEX = NO

# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
Expand Down
92 changes: 92 additions & 0 deletions doc/uml/ArduinoNative.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
@startuml ArduinoNative

package "Library" as DeviceClasses {

package "Interfaces" as Interfaces {

interface "Print" as iPrint {
+ {abstract} print(str : const char[]) : void

+ {abstract} print(value : uint8_t) : void
+ {abstract} print(value : uint16_t) : void
+ {abstract} print(value : uint32_t) : void

+ {abstract} print(value : int8_t) : void
+ {abstract} print(value : int16_t) : void
+ {abstract} print(value : int32_t) : void

'* with linefeed: *'
+ {abstract} println(str : const char[]) : void
+ {abstract} println(value : uint8_t) : void
+ {abstract} println(value : uint16_t) : void
+ {abstract} println(value : uint32_t) : void

+ {abstract} println(value : int8_t) : void
+ {abstract} println(value : int16_t) : void
+ {abstract} println(value : int32_t) : void

+ {abstract} write(buffer : const uint8_t * , length: size_t ) : size_t
}

interface "Stream" as iStream {
+ {abstract} available(void) : int
+ {abstract} readBytes(buffer : uint8_t *, length : size_t ) : size_t
}

iStream <|-- iPrint : <<derive>>
}



class "Serial_" as Serial_ {
# Serial_(stream : Stream& )

+ setStream(stream : Stream& ) : void
+ begin(baudrate : unsigned long) : void
+ end(void) : void
}

iPrint <|.. Serial_ : <<realize>>

class "Terminal" as Terminal {
}

iPrint <|.. Terminal : <<realize>>



class Arduino <<namespace>> {

+ setup(
getSystemTickFunc : (unsigned long (*)() ),
systemDelayFunc : (void (*)(unsigned long)) ) : void

+ loop () : void
}

}
' --- end of DeviceClasses

Terminal <-- Arduino : <<instantiate>>
Serial_ <-- Arduino : <<instantiate>>


package Application {

class App {
+ setup() : void
+ loop() : void
}

Arduino ..> App : <<call>>

class main {
+ main(argc : int, argv : char**) : int
}

Arduino <.. main : <<use>>
}

}

@enduml
28 changes: 28 additions & 0 deletions doc/uml/DynamicFlow.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@startuml DynamicFlow

autoactivate on

participant main
participant Arduino
participant App

-> main

main -> Arduino : Arduino::setup()

Arduino -> App : ::setup()
Arduino <-- App

main <-- Arduino

loop
main -> Arduino : Arduino::loop()

Arduino -> App : ::loop()
Arduino <-- App

main <-- Arduino
end loop


@enduml
38 changes: 38 additions & 0 deletions doc/uml/Principle.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@startuml Principle

package "Application" {
class "Aaaa" as Aaaa
}

package "HAL Interfaces" {
interface "IXxxx" as iXxxx
}

package "HAL Native" {
class "Yxxx" as YxxxWebots

note bottom of YxxxWebots
Native environment specific implementation.
end note
}

Aaaa ...> iXxxx: <<use>>
iXxxx <|... YxxxWebots: <<realize>>

note top of Aaaa
Target independed application.
end note

package "Arduino Native" {

class Arduino
}

Aaaa ...> Arduino: <<use>>

note bottom of Arduino
Provides Arduino functionality
for the native environment.
end note

@enduml

0 comments on commit a1ea268

Please sign in to comment.