Skip to content

Commit

Permalink
DOC: message
Browse files Browse the repository at this point in the history
  • Loading branch information
FerroO2000 committed May 18, 2024
1 parent 422cf1a commit 51f0968
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 64 deletions.
68 changes: 34 additions & 34 deletions examples/markdown/SC24.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Main CAN Bus
Baudrate: -

### BMS_LV/int0
### BMS_LV
The battery-management-system low-voltage.

Node ID: **0**
Expand All @@ -17,7 +17,7 @@ Size: **3** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-----------------|-----------|------|-----|-----|--------|-------|------|-------------------------------------------|
Expand All @@ -32,7 +32,7 @@ Size: **8** bytes

Cycle Time: **100** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-------------------|-----------|------|-----|---------|--------|-------|------|------------------------------------------------|
Expand All @@ -48,7 +48,7 @@ Size: **6** bytes

Cycle Time: **100** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-------------------|-----------|------|-----|---------|--------|-------|------|------------------------------------------------|
Expand All @@ -63,7 +63,7 @@ Size: **6** bytes

Cycle Time: **100** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------------------|-----------|------|-----|-----------|--------|-------|------|---------------------------------------------------------------------------------------------------|
Expand All @@ -78,7 +78,7 @@ Size: **4** bytes

Cycle Time: **100** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|----------------------|-----------|------|-----|-----|--------|-------|------|--------------------------------------------------------------------------------|
Expand Down Expand Up @@ -117,7 +117,7 @@ Size: **8** bytes

Cycle Time: **2000** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------------------|-----------|------|-----|----------|--------|-------|------|--------------------------------------------------------------------|
Expand All @@ -135,7 +135,7 @@ Size: **8** bytes

Cycle Time: **2000** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------------------|-----------|------|-----|----------|--------|-------|------|---------------------------------------------------------------------|
Expand All @@ -147,7 +147,7 @@ Receivers: [DSPACE/int0](#DSPACE/int0)
| LV_CELL_NTC_11_resistance | 50 | 10 | 0 | 31968.75 | 1000 | 31.25 | Ohm | The resistance of the NTC #11 in the battery pack expressed in Ohm. |

---
### DASH/int0
### DASH
The dashboard ECU.

Node ID: **1**
Expand All @@ -159,7 +159,7 @@ Size: **3** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-----------------|-----------|------|-----|-----|--------|-------|------|----------------------------------------------|
Expand All @@ -174,7 +174,7 @@ Size: **1** bytes

Cycle Time: **500** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------|-----------|------|-----|-----|--------|-------|------|------------------|
Expand All @@ -187,7 +187,7 @@ Size: **1** bytes

Cycle Time: -

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------|-----------|------|-----|-----|--------|-------|------|---------------------------------------------|
Expand All @@ -197,7 +197,7 @@ Receivers: [DSPACE/int0](#DSPACE/int0)
| MOTOR_RR_isON | 3 | 1 | 0 | 1 | 0 | 1 | - | States whether the rear right motor is ON. |

---
### DSPACE/int0
### DSPACE
An automotive ECU.

Node ID: **2**
Expand All @@ -209,7 +209,7 @@ Size: **3** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-----------------|-----------|------|-----|-----|--------|-------|------|-------------------------------------------|
Expand All @@ -224,7 +224,7 @@ Size: **1** bytes

Cycle Time: -

Receivers: [DASH/int0](#DASH/int0)
Receivers: [DASH](#DASH)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------|-----------|------|-----|-----|--------|-------|------|-------------|
Expand All @@ -237,7 +237,7 @@ Size: **2** bytes

Cycle Time: -

Receivers: [BMS_LV/int0](#BMS_LV/int0)
Receivers: [BMS_LV](#BMS_LV)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-------------|-----------|------|-----|-------|--------|-------|------|-------------|
Expand All @@ -251,7 +251,7 @@ Size: **3** bytes

Cycle Time: -

Receivers: [DASH/int0](#DASH/int0)
Receivers: [DASH](#DASH)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-------------------|-----------|------|-----|-----|--------|-------|------|-------------|
Expand All @@ -260,7 +260,7 @@ Receivers: [DASH/int0](#DASH/int0)
| BattHVFan_CTRL | 16 | 8 | 0 | 255 | 0 | 1 | - | - |

---
### SB_FRONT/int0
### SB_FRONT
The sensorboard front ECU.

Node ID: **3**
Expand All @@ -272,7 +272,7 @@ Size: **8** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------------------|-----------|------|-----|-------|--------|-------|------|-----------------------------------------------------------------|
Expand All @@ -288,7 +288,7 @@ Size: **4** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-------------------------|-----------|------|-----|-------|--------|-------|------|---------------------------------------------------------------------------------------|
Expand All @@ -302,7 +302,7 @@ Size: **3** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-----------------|-----------|------|-----|-----|--------|-------|------|------------------------------------------------------|
Expand All @@ -317,7 +317,7 @@ Size: **1** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------------------|-----------|------|-----|-----|--------|-------|------|------------------------------------------------------------|
Expand All @@ -333,7 +333,7 @@ Size: **8** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|----------------------------|-----------|------|-----|----------|--------|-------|------|----------------------------------------------------------------|
Expand All @@ -345,7 +345,7 @@ Receivers: [DSPACE/int0](#DSPACE/int0)
| SPARE_NTC_1_resistance | 50 | 10 | 0 | 31968.75 | 1000 | 31.25 | Ohm | The resistance of the spare NTC #1 expressed in Ohm. |

---
### SB_REAR/int0
### SB_REAR
The sensorboard rear ECU.

Node ID: **4**
Expand All @@ -357,7 +357,7 @@ Size: **4** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-------------------------|-----------|------|-----|-------|--------|-------|------|--------------------------------------------------------------------------------------|
Expand All @@ -371,7 +371,7 @@ Size: **3** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-----------------|-----------|------|-----|-----|--------|-------|------|-----------------------------------------------------|
Expand All @@ -386,7 +386,7 @@ Size: **1** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|----------------------------|-----------|------|-----|-----|--------|-------|------|----------------------------------------------------------------------|
Expand All @@ -403,7 +403,7 @@ Size: **1** bytes

Cycle Time: -

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|------------------|-----------|------|-----|-----|--------|-------|------|---------------------------------------|
Expand All @@ -416,7 +416,7 @@ Size: **8** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------------------|-----------|------|-----|----------|--------|-------|------|---------------------------------------------------------------------|
Expand All @@ -434,7 +434,7 @@ Size: **6** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|--------------------------|-----------|------|-----|-------|--------|-------|------|-------------------------------------------------------------------|
Expand All @@ -443,7 +443,7 @@ Receivers: [DSPACE/int0](#DSPACE/int0)
| BRAKE_PRESS_REAR_voltage | 32 | 16 | 0 | 65535 | 0 | 1 | mV | The voltage of the rear brake pressure sensor expressed in mV. |

---
### TLB_BAT/int0
### TLB_BAT
The tsal-latch-board battery ECU.

Node ID: **5**
Expand All @@ -455,7 +455,7 @@ Size: **3** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|----------------------------------|-----------|------|-----|-----|--------|-------|------|-------------|
Expand All @@ -476,7 +476,7 @@ Size: **3** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|---------------------------------|-----------|------|-----|-----|--------|-------|------|-------------|
Expand Down Expand Up @@ -505,7 +505,7 @@ Size: **3** bytes

Cycle Time: **10** ms

Receivers: [DSPACE/int0](#DSPACE/int0)
Receivers: [DSPACE](#DSPACE)

| Name | Start Bit | Size | Min | Max | Offset | Scale | Unit | Description |
|-----------------|-----------|------|-----|-----|--------|-------|------|------------------------------------------------|
Expand Down
6 changes: 3 additions & 3 deletions md_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (e *mdExporter) exportBus(bus *Bus) {
}

func (e *mdExporter) exportNode(node *NodeInterface) {
e.w.H3(node.Name())
e.w.H3(node.node.name)

if len(node.node.desc) > 0 {
e.w.PlainText(node.node.desc).LF()
Expand Down Expand Up @@ -99,8 +99,8 @@ func (e *mdExporter) exportMessage(msg *Message) {
e.w.PlainTextf("Cycle Time: %s", cycleTimeStr).LF()

recStr := "Receivers: "
for idx, rec := range msg.Receivers() {
recLink := e.getLink(rec.Name())
for idx, recInt := range msg.Receivers() {
recLink := e.getLink(recInt.node.name)

if idx == 0 {
recStr += recLink
Expand Down
Loading

0 comments on commit 51f0968

Please sign in to comment.