Skip to content

Commit

Permalink
Changes implementing feedback from ISO publishing team.
Browse files Browse the repository at this point in the history
Signed-off-by: Frédéric Desbiens
<[email protected]>
  • Loading branch information
fdesbiens committed Oct 10, 2023
1 parent 9f3e909 commit 59b0bae
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 5 deletions.
93 changes: 93 additions & 0 deletions specification/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,99 @@ val asciidoctorDocbook by tasks.registering(AsciidoctorTask::class) {
failureLevel = Severity.WARN
}

// Full version of the spec in Docbook format. Used to produce the ISO/IEC 20237 version of the spec.
// To convert from Docbook to docx, use PanDoc.
// Once installed, execute the following commands from the specification/src/main/asciidoc folder:
// copy ..\..\..\build\docs\docbook\sparkplug_spec.xml
// pandoc --from docbook --to docx --output sparkplug_specv300_A4.docx --reference-doc sparkplug_spec_A4_reference_file.docx sparkplug_spec.xml
val asciidoctorDocbookFull by tasks.registering(AsciidoctorTask::class) {
group = "spec"

baseDirFollowsSourceDir()
sourceDirProperty.set(layout.dir(combineSpecSourceWithNormativeAppendix.map { it.destinationDir }))
dependsOn(combineSpecSourceWithNormativeAppendix) // needed as sourceDirProperty does not capture dependency
sources {
include("sparkplug_spec.adoc")
}
outputDirProperty.set(layout.buildDirectory.dir("docs/docbookA4"))

resources {
from("src/main/asciidoc/assets/images")
into("assets/images")
}

outputOptions {
setBackends(listOf("docbook"))
}

options = mapOf(
"doctype" to "article",
"header_footer" to "true"
)
attributes = mapOf(
"project-version" to version,
"imagesdir" to "assets/images",
"toc" to "auto"
)

failureLevel = Severity.WARN
}



val asciidoctorPdfA4 by tasks.registering(AsciidoctorTask::class) {
group = "spec"

baseDirFollowsSourceDir()
sourceDirProperty.set(layout.dir(combineSpecSourceWithNormativeAppendix.map { it.destinationDir }))
dependsOn(combineSpecSourceWithNormativeAppendix) // needed as sourceDirProperty does not capture dependency
sources {
include("sparkplug_spec.adoc")
}
outputDirProperty.set(layout.buildDirectory.dir("docs/pdf"))

resources {
from("src/main/asciidoc/assets/images")
into("assets/images")
}

outputOptions {
setBackends(listOf("pdf"))
}

configure<AsciidoctorJExtension> {
modules {
diagram.use()
pdf.version(project.property("plugin.asciidoctor.pdf.version"))
}
}

options = mapOf(
"doctype" to "book",
"header_footer" to "true",
"template_engine" to "slim",
"compact" to "false"
)
attributes = mapOf(
"source-highlighter" to "highlight.js",
"pagenums" to "true",
"numbered" to "true",
"docinfo2" to "true",
"experimental" to "false",
"linkcss" to "false",
"toc" to "true",
"project-version" to project.version,
"imagesdir" to "assets/images",
"outfilesuffix" to "A4.pdf",
"pdf-page-size" to "A4",
"pdf-themesdir" to "themes"
// Removed the Sparkplug PDF theme since ISO does not want the yellow highlighting.
)

failureLevel = Severity.WARN
}


val asciidoctorPdf by tasks.registering(AsciidoctorTask::class) {
group = "spec"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
"RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14
[BCP14].

All normative statements in this document are highlighted in [yellow-background]*yellow text as
shown here*.
All normative statements in this document are highlighted in **bold text as
shown here**.

[[introduction_leveragint_standards_and_open_source]]
=== Leveraging Standards and Open Source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ message denoting that the Primary Host application is online.
.Figure 4 - Host Session Establishment
plantuml::{assetsdir}assets/plantuml/host-session-establishment.puml[format=svg, alt="Host Session Establishment"]

The session diagram in Figure 3 - Host Session Establishment shows a very simple topology with a
The session diagram in Figure 4 - Host Session Establishment shows a very simple topology with a
single MQTT Server. The steps outlined in the session diagram are defined as follows:

[arabic]
Expand Down Expand Up @@ -256,7 +256,7 @@ MQTT 'Session Expiry Interval' to zero.
.Figure 5 - Edge Node MQTT Session Establishment
plantuml::{assetsdir}assets/plantuml/edge-node-mqtt-session-establishment.puml[format=svg, alt="Edge Node MQTT Session Establishment"]

The session diagram in Figure 4 - Edge Node MQTT Session Establishment shows a very simple topology
The session diagram in Figure 5 - Edge Node MQTT Session Establishment shows a very simple topology
with a single MQTT Server. The steps outlined in the session diagram are defined as follows:

[arabic]
Expand Down Expand Up @@ -436,7 +436,7 @@ session diagram outlines the requirements:
.Figure 6 - MQTT Device Session Establishment
plantuml::{assetsdir}assets/plantuml/mqtt-device-session-establishment.puml[format=svg, alt="MQTT Device Session Establishment"]

The session diagram in Figure 5 - MQTT Device Session Establishment shows a simple topology with
The session diagram in Figure 6 - MQTT Device Session Establishment shows a simple topology with
all the Sparkplug elements in place i.e. Host Application, MQTT Server(s), Sparkplug Edge Node and
this element, the device element. The steps outlined in the session diagram are defined as follows:

Expand Down
Binary file not shown.

0 comments on commit 59b0bae

Please sign in to comment.