Skip to content

Commit

Permalink
chore(site): Reorganize page titles by 1 level.
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Dywicki <[email protected]>
  • Loading branch information
splatch committed Oct 29, 2024
1 parent 6aa895a commit 0c710e5
Show file tree
Hide file tree
Showing 119 changed files with 541 additions and 518 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@

<!-- Site properties -->
<asciidoctor.maven.plugin.version>2.2.6</asciidoctor.maven.plugin.version>
<asciidoctorj.version>2.5.13</asciidoctorj.version>
<asciidoctorj.version>2.5.11</asciidoctorj.version>
<asciidoctorj.diagram.version>2.3.1</asciidoctorj.diagram.version>

<skip-code-generation>false</skip-code-generation>
Expand Down Expand Up @@ -1273,7 +1273,7 @@
<relativizeDecorationLinks>false</relativizeDecorationLinks>
<locales>en</locales>
<inputEncoding>${project.build.sourceEncoding}</inputEncoding>
<outputEncoding>${project.reporting.outputencoding}</outputEncoding>
<outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
<!--
IntelliJ can't find the asciidoc config option in the site plugin, which is correct.
However, this config section is used by the asciidoctor site plugin extension. So please
Expand Down
2 changes: 1 addition & 1 deletion src/site/asciidoc/apache/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
:imagesdir: ../images/
:icons: font

== Apache
= Apache
10 changes: 5 additions & 5 deletions src/site/asciidoc/developers/architecture.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
// limitations under the License.
//

== Architecture of PLC4X Connections
= Architecture of PLC4X Connections

=== Simple case
== Simple case

In this simple case, an application asks the DriverManager to forward a connection creation to the corresponding Driver implementation, which then creates both a Connection and a MessageCodec instance. The Connection is the logical link between the connection state and the MessageCodec.
A MessageCodec uses a TransportInstance to communicate with the target device.
Expand Down Expand Up @@ -84,13 +84,13 @@ note top of [Connection] : logical
....

=== Problems
== Problems

Serial transports based on RS475 and UDP Transports currently don't allow sharing. That means only one connection instance can have access to one RS485 or one shared local UDP Port (Multiple UDP transport instances with different local ports however are possible). As soon as one connection is established and a second connection would try to access this, this would result in errors.

However, multiple devices could be attached to the same RS458 port (Modbus RTU and Modbus ASCII explicitly supports this, however using different devices using different protocols over the same port is not possible) and in BACnet connecting to multiple remote BACnet devices would require one local UDP port to be used by multiple connections.

=== Protocols requiring us to use a fixed port on a non-broadcast address
== Protocols requiring us to use a fixed port on a non-broadcast address

Some protocols, such as BACnet require remotes to send data to a fixed udp port on a non-broadcast address. This causes problems as soon as we want to connect to multiple BACnet devices from the same host as only one instance can get access to that port.

Expand Down Expand Up @@ -157,6 +157,6 @@ note top of [Connection] : logical
....

=== Protocols only allowing one connection at a time
== Protocols only allowing one connection at a time


20 changes: 10 additions & 10 deletions src/site/asciidoc/developers/building.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// limitations under the License.
//

== Building PLC4X
= Building PLC4X

PLC4X is built with `Apache Maven` and we have tried to make the build as simple as possible.

Expand All @@ -27,15 +27,15 @@ More about these later down in this manual.

For your convenience we also have provided a `Maven-Wrapper`, that should allow building of PLC4X with only `Java 11` or greater as requirement.

=== Requirements
== Requirements

The only requirements to building PLC4X should be:

* Java 11 JDK (or newer)
* Git (Even if you are building the source distribution, the Kafka plugin seems to require a `git` executable being available on the systems `PATH`)
* Apache Maven (3.6.0 or newer) *(Optional)* (See next chapter)

=== Using the Maven-Wrapper
== Using the Maven-Wrapper

The so-called `Maven-Wrapper` is used by calling the Maven-Wrapper scripts `mvnw` (Mac & Linux) or `mvnw.cmd` (Windows) instead of the default Maven commands `mvn` and `mvn.cmd`.

Expand All @@ -45,7 +45,7 @@ If no suitable version can be found, it is automatically downloaded and installe
After the script has ensured a suitable Maven version is available, this is used and all arguments and parameters are transparently forwarded to this.
So simply adding the additional `w` to each of the Maven commands, there should be no difference to using a pre-installed Maven version.

=== Using Maven
== Using Maven

This document can't provide you with all the details needed to get started with `Maven` itself.
But there is a lot of good documentation out there.
Expand All @@ -57,7 +57,7 @@ It should handle all the details needed to get a general understanding of Maven
.Recording of a Maven Training for Apache Flex from 2016
https://vimeo.com/167857327

=== Building PLC4X with Maven
== Building PLC4X with Maven

As especially building the C++, and C# drivers requires building of some third party artifacts and increases build-time dramatically and requires setting up some additional third party tools, we have excluded these parts form the default Maven build.

Expand Down Expand Up @@ -95,7 +95,7 @@ If you want to skip the running of tests (even if this is not encouraged) you ca

This will not skip the compilation of tests, however.

=== Building the PLC4X Website with Maven
== Building the PLC4X Website with Maven

The PLC4X Website is also part of the same GIT repository that contains the code and it is built by Maven as well.

Expand All @@ -105,13 +105,13 @@ In order to build the website the following command should be sufficient:

This is just a quick-start version of the site generation, for a fully detailed documentation please read the https://plc4x.apache.org/developers/infrastructure/website.html[Website] documentation page.

=== Some special Maven profiles
== Some special Maven profiles

Maven supports so-called `profiles` for customizing the build in special cases.
We have tried to keep the number of profiles as low as possible.
So far there is only one profile.

==== `apache-release` profile
=== `apache-release` profile

This profile is automatically enabled on a release-build and it automatically creates some additional artifacts:

Expand All @@ -123,7 +123,7 @@ This profile is automatically enabled on a release-build and it automatically cr

Generally it is not required to enable ths profile unless you are interested in these Artifacts.

==== `debug-pom` profile
=== `debug-pom` profile

Especially for Maven beginners, it might be difficult to understand why a module builds the way it does.
Maven contains a lot of concepts to inherit and override settings.
Expand All @@ -141,7 +141,7 @@ Some tests of the PLC4X project do require quite a bit of time to run.
Therefore we decided to disable these for a normal build on developer machines.
If you want to run them locally and not rely on them being run on the CI servers, enable the `enable-all-checks` profile.

=== Use the compiled library with Gradle
== Use the compiled library with Gradle

Compiling the library as explained here add the new version in the local Maven repository (i.e. usually under `~/.m2/repository` on linux like systems), if you would like to use Gradle as Build Tool for your project you have just to use a local repository in your Gradle `build.gradle` file.

Expand Down
18 changes: 9 additions & 9 deletions src/site/asciidoc/developers/code-gen/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
:imagesdir: ../../images/

== Code Generation
= Code Generation

As hand-writing code for a lot of drivers in multiple languages would be quite a nightmare, we have invested a very large amount of time into finding a way to automate this.

Expand Down Expand Up @@ -120,7 +120,7 @@ So for example in case of generating a `Siemens S7` Driver for `Java` this would

The dark blue parts are the ones released externally, the turquoise ones are part of the main PLC4X repo.

=== Introduction
== Introduction

The maven plugin is built up very modular.

Expand All @@ -141,7 +141,7 @@ The downside was, that the PLC4X community regarded this XML format as pretty co

In the end we came up with our own format which we called `MSpec` and is described in the link:protocol/mspec.html[MSpec Format description].

=== Configuration
== Configuration

The `plc4x-maven-plugin` has a very limited set of configuration options.

Expand Down Expand Up @@ -295,11 +295,11 @@ and:

The reason for why the dependencies are added as code-dependencies and why the scope is set the way it is, is described in the <<Why are the protocol and language dependencies done so strangely?>> section.

=== Custom Modules
== Custom Modules

The plugin uses the https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html[Java Serviceloader] mechanism to find modules.

==== Protocol Modules
=== Protocol Modules

In order to provide a new protocol module, all that is required, it so create a module containing a `META-INF/services/org.apache.plc4x.plugins.codegenerator.protocol.Protocol` file referencing an implementation of the `org.apache.plc4x.plugins.codegenerator.protocol.Protocol` interface.

Expand Down Expand Up @@ -346,7 +346,7 @@ As mentioned before, we support multiple versions of a protocol, so if `getVersi

The most important method for the actual code-generation however is the `getTypeContext()` method, which returns a `TypeContext` type which generally contains a list of all parsed types for this given protocol.

==== Language Modules
=== Language Modules

Analog to the <<Protocol Modules>> the Language modules are constructed very similar.

Expand Down Expand Up @@ -394,9 +394,9 @@ The `name` being used by the plugin to find the language output module defined b

`supportedOptions` provides a list of `options` that the current language module is able to use and which can be passed in to the maven configuration using the `options` settings.

=== Problems with Maven
== Problems with Maven

==== Why are the 4 modules released separately?
=== Why are the 4 modules released separately?

We mentioned in the introduction, that the first 4 modules are maintained and released from outside the main PLC4X repository.

Expand All @@ -417,7 +417,7 @@ For this reason we have stripped down the plugin and its dependencies to an abso

As soon as the tooling is released, the version is updated in the PLC4X build and the release version is used without any complications.

==== Why are the protocol and language dependencies done so strangely?
=== Why are the protocol and language dependencies done so strangely?

It would certainly be a lot cleaner, if we provided the dependencies to protocol and language modules as plugin dependencies.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
:imagesdir: ../../../images/

== Apache Freemarker
= Apache Freemarker

For the Freemarker language output we are using an unmodified version of https://freemarker.apache.org[Apache Freemarker] to generate output.

Expand Down Expand Up @@ -48,7 +48,7 @@ It will automatically create all needed intermediate directories and generate th

If this line is empty, the output is skipped for this type.

=== Example `Java` output
== Example `Java` output

....
package org.apache.plc4x.language.java;
Expand Down
2 changes: 1 addition & 1 deletion src/site/asciidoc/developers/code-gen/protocol/df1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// limitations under the License.
//

== Example: DF1 MSpec
= Example: DF1 MSpec

The DF1 protocol has three basic messages: a command message, acknowledge and not acknowledge.
A `0x10` is used as delimiter to differentiate between the messages and parts of the command message.
Expand Down
Loading

0 comments on commit 0c710e5

Please sign in to comment.