Skip to content

Commit

Permalink
fix support for new version of proto-gen-md-diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
chicco785 committed Apr 22, 2024
1 parent 3c636f9 commit cffd247
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 92 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ generate:

.PHONY: docs
docs:
../proto-gen-md-diagrams/proto-gen-md-diagrams -d zaphiro -md true
mkdir -p docs
# mv -f zaphiro/**/*.md docs #why it works on my mac but not in the action?
mv -f zaphiro/*/v1/*.md docs
../proto-gen-md-diagrams/proto-gen-md-diagrams -d zaphiro -o docs -md true

.PHONY: proto-lint
proto-lint:
Expand Down
54 changes: 27 additions & 27 deletions docs/conf2.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ direction LR
%%
class Conf2Frame {
+ uint32 DATA_RATE
+ List~Config~ configs
+ Conf2Header header
+ List~Config~ configs
+ uint32 DATA_RATE
}
Conf2Frame --> `Config`
Conf2Frame --> `Conf2Header`
Conf2Frame --> `Config`
```
### Conf2Header Diagram
Expand All @@ -55,13 +55,13 @@ direction LR
%% Configuration frame 2 header
class Conf2Header {
+ uint32 FRACSEC
+ uint32 SYNC
+ uint32 FRAMESIZE
+ uint32 IDCODE
+ uint32 NUM_PMU
+ uint32 SOC
+ uint32 SYNC
+ uint32 FRACSEC
+ uint32 TIME_BASE
+ uint32 NUM_PMU
}
```
Expand All @@ -74,18 +74,18 @@ direction LR
%% Single PMU configuration according to Configuration frame 2
class Config {
+ string STN
+ uint32 IDCODE
+ uint32 FORMAT
+ uint32 PHNMR
+ uint32 ANNMR
+ List~uint32~ ANUNIT
+ uint32 CFGCNT
+ string CHNAM
+ uint32 DGNMR
+ string CHNAM
+ List~uint32~ PHUNIT
+ List~uint32~ ANUNIT
+ List~uint32~ DIGUNIT
+ uint32 FNOM
+ uint32 FORMAT
+ uint32 IDCODE
+ uint32 PHNMR
+ List~uint32~ PHUNIT
+ string STN
+ uint32 CFGCNT
}
```
Expand All @@ -105,9 +105,9 @@ Headers used in rabbitMQ:

| Field | Ordinal | Type | Label | Description |
|-------------|---------|---------------|----------|-------------------------------|
| `DATA_RATE` | 3 | `uint32` | | Rate of data transmission |
| `configs` | 2 | `Config` | Repeated | Set of PMU configurations |
| `header` | 1 | `Conf2Header` | | Configuration frame 2 header |
| `configs` | 2 | `Config` | Repeated | Set of PMU configurations |
| `DATA_RATE` | 3 | `uint32` | | Rate of data transmission |



Expand All @@ -121,13 +121,13 @@ Configuration frame 2 header

| Field | Ordinal | Type | Label | Description |
|-------------|---------|----------|-------|------------------------------------------------------|
| `FRACSEC` | 5 | `uint32` | | Fraction of Second and Message Time Quality |
| `SYNC` | 1 | `uint32` | | Sync byte followed by frame type and version number |
| `FRAMESIZE` | 2 | `uint32` | | Number of bytes in the frame |
| `IDCODE` | 3 | `uint32` | | Stream source ID number |
| `NUM_PMU` | 7 | `uint32` | | The number of PMUs included in the data frame |
| `SOC` | 4 | `uint32` | | SOC time stamp |
| `SYNC` | 1 | `uint32` | | Sync byte followed by frame type and version number |
| `FRACSEC` | 5 | `uint32` | | Fraction of Second and Message Time Quality |
| `TIME_BASE` | 6 | `uint32` | | Resolution of FRACSEC time stamp |
| `NUM_PMU` | 7 | `uint32` | | The number of PMUs included in the data frame |



Expand All @@ -141,18 +141,18 @@ Single PMU configuration according to Configuration frame 2

| Field | Ordinal | Type | Label | Description |
|-----------|---------|----------|----------|----------------------------------------|
| `STN` | 1 | `string` | | Station name |
| `IDCODE` | 2 | `uint32` | | Data source ID number |
| `FORMAT` | 3 | `uint32` | | Data format within data frame |
| `PHNMR` | 4 | `uint32` | | Number of phasors |
| `ANNMR` | 5 | `uint32` | | Number of analog values |
| `ANUNIT` | 9 | `uint32` | Repeated | Conversion factor for analog channels |
| `CFGCNT` | 12 | `uint32` | | Configuration change count |
| `CHNAM` | 7 | `string` | | Phasor and channel names |
| `DGNMR` | 6 | `uint32` | | Number of digital status words |
| `CHNAM` | 7 | `string` | | Phasor and channel names |
| `PHUNIT` | 8 | `uint32` | Repeated | Conversion factor for phasor channels |
| `ANUNIT` | 9 | `uint32` | Repeated | Conversion factor for analog channels |
| `DIGUNIT` | 10 | `uint32` | Repeated | Mask words for digital status words |
| `FNOM` | 11 | `uint32` | | Nominal line frequency code and flags |
| `FORMAT` | 3 | `uint32` | | Data format within data frame |
| `IDCODE` | 2 | `uint32` | | Data source ID number |
| `PHNMR` | 4 | `uint32` | | Number of phasors |
| `PHUNIT` | 8 | `uint32` | Repeated | Conversion factor for phasor channels |
| `STN` | 1 | `string` | | Station name |
| `CFGCNT` | 12 | `uint32` | | Configuration change count |



Expand Down
4 changes: 2 additions & 2 deletions docs/data.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ direction LR
%%
class DataSet {
+ Map~string, Data~ data
+ string producerId
+ Map~string, Data~ data
}
DataSet .. ` Data`
Expand Down Expand Up @@ -228,8 +228,8 @@ Headers used in rabbitMQ:

| Field | Ordinal | Type | Label | Description |
|--------------|---------|----------------|-------|-------------------------------------------------------------|
| `data` | 2 | `string, Data` | Map | The map of data included in the dataset. |
| `producerId` | 1 | `string` | | The id of the device / service that produced the data set. |
| `data` | 2 | `string, Data` | Map | The map of data included in the dataset. |



Expand Down
12 changes: 6 additions & 6 deletions docs/device_event.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ direction LR
%%
class DeviceEvent {
+ Optional~string~ code
+ string deviceID
+ Event event
+ Optional~double~ referenceLimit
+ string deviceID
+ string substationID
+ Optional~double~ value
+ Optional~double~ referenceLimit
+ Optional~string~ code
}
DeviceEvent --> `Event`
Expand Down Expand Up @@ -165,12 +165,12 @@ Headers used in rabbitMQ:

| Field | Ordinal | Type | Label | Description |
|------------------|---------|----------|----------|-----------------------------------------------------------|
| `code` | 6 | `string` | Optional | The device event code (or the mapped string) |
| `deviceID` | 2 | `string` | | The ID of the device where the event occurred. |
| `event` | 1 | `Event` | | The base event message |
| `referenceLimit` | 5 | `double` | Optional | The reference limit or expected value. |
| `deviceID` | 2 | `string` | | The ID of the device where the event occurred. |
| `substationID` | 3 | `string` | | The ID of the substation where the event occurred. |
| `value` | 4 | `double` | Optional | The measured / estimated value in relation to the event. |
| `referenceLimit` | 5 | `double` | Optional | The reference limit or expected value. |
| `code` | 6 | `string` | Optional | The device event code (or the mapped string) |



Expand Down
12 changes: 6 additions & 6 deletions docs/event.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ direction LR
class Event {
+ string Id
+ Optional~int64~ detectedAt
+ string message
+ int64 occurredAt
+ string sourceId
+ EventSourceType sourceType
+ int64 occurredAt
+ Optional~int64~ detectedAt
+ string message
+ Optional~EventStatus~ status
}
Event --> `EventSourceType`
Expand All @@ -132,11 +132,11 @@ Headers used in rabbitMQ (only if not sent as part of `DataSet`):
| Field | Ordinal | Type | Label | Description |
|--------------|---------|-------------------|----------|-----------------------------------------------------------------------------------------------------|
| `Id` | 1 | `string` | | The uuid of the event. |
| `detectedAt` | 5 | `int64` | Optional | The time of detection of the event (Unix msec timestamp). |
| `message` | 6 | `string` | | Event message. |
| `occurredAt` | 4 | `int64` | | The time of occurency of the event (Unix msec timestamp) usually is the same value as timestampId. |
| `sourceId` | 2 | `string` | | The id of the source (e.g. a PMU) that generated the event. |
| `sourceType` | 3 | `EventSourceType` | | The type of data see `DataType` enum. |
| `occurredAt` | 4 | `int64` | | The time of occurency of the event (Unix msec timestamp) usually is the same value as timestampId. |
| `detectedAt` | 5 | `int64` | Optional | The time of detection of the event (Unix msec timestamp). |
| `message` | 6 | `string` | | Event message. |
| `status` | 7 | `EventStatus` | Optional | The status of the event. |


Expand Down
28 changes: 14 additions & 14 deletions docs/fault.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ direction LR
class Fault {
+ string Id
+ Optional~string~ description
+ Optional~float~ faultCurrent
+ Optional~string~ faultyEquipmentId
+ List~string~ impactedEquipmentIds
+ PhaseConnectedFaultKind kind
+ Optional~bool~ located
+ Optional~int64~ locatedAt
+ int64 occurredAt
+ PhaseCode phases
+ int64 occurredAt
+ Optional~string~ faultyEquipmentId
+ Optional~int64~ locatedAt
+ Optional~float~ faultCurrent
+ Optional~bool~ located
+ List~string~ impactedEquipmentIds
}
Fault --> `PhaseConnectedFaultKind`
Fault --> `PhaseCode`
Expand All @@ -196,9 +196,9 @@ direction LR
%%
class LineFault {
+ Optional~string~ acLineSegmentID
+ Fault fault
+ Optional~float~ lengthFromTerminal1
+ Optional~string~ acLineSegmentID
}
LineFault --> `Fault`
Expand Down Expand Up @@ -247,14 +247,14 @@ Headers used in rabbitMQ:
|------------------------|---------|---------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------|
| `Id` | 1 | `string` | | The textual id of the fault. |
| `description` | 2 | `string` | Optional | The textual description of the fault. |
| `faultCurrent` | 8 | `float` | Optional | The current associated to the fault. |
| `faultyEquipmentId` | 6 | `string` | Optional | The equipment with the fault. |
| `impactedEquipmentIds` | 10 | `string` | Repeated | The set of IDs of equipments impacted by the fault. |
| `kind` | 3 | `PhaseConnectedFaultKind` | | The kind of phase fault. |
| `located` | 9 | `bool` | Optional | Was the fault located. |
| `locatedAt` | 7 | `int64` | Optional | The time when the fault was located. |
| `occurredAt` | 5 | `int64` | | The date and time at which the fault occurred (Unix msec timestamp). |
| `phases` | 4 | `PhaseCode` | | The phases participating in the fault. The fault connections into these phases are further specified by the type of fault. |
| `occurredAt` | 5 | `int64` | | The date and time at which the fault occurred (Unix msec timestamp). |
| `faultyEquipmentId` | 6 | `string` | Optional | The equipment with the fault. |
| `locatedAt` | 7 | `int64` | Optional | The time when the fault was located. |
| `faultCurrent` | 8 | `float` | Optional | The current associated to the fault. |
| `located` | 9 | `bool` | Optional | Was the fault located. |
| `impactedEquipmentIds` | 10 | `string` | Repeated | The set of IDs of equipments impacted by the fault. |



Expand All @@ -276,9 +276,9 @@ Headers used in rabbitMQ:

| Field | Ordinal | Type | Label | Description |
|-----------------------|---------|----------|----------|--------------------------------------------------------------------------------------------------------------------------------|
| `acLineSegmentID` | 3 | `string` | Optional | The line segment of this line fault. |
| `fault` | 1 | `Fault` | | The base fault message. |
| `lengthFromTerminal1` | 2 | `float` | Optional | The length to the place where the fault is located starting from terminal with sequence number 1 of the faulted line segment. |
| `acLineSegmentID` | 3 | `string` | Optional | The line segment of this line fault. |



Expand Down
12 changes: 6 additions & 6 deletions docs/grid_event.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ direction LR
%%
class GridEvent {
+ string componentID
+ Event event
+ Optional~double~ probability
+ double referenceLimit
+ string componentID
+ Optional~string~ substationID
+ double value
+ double referenceLimit
+ Optional~double~ probability
}
GridEvent --> `Event`
Expand Down Expand Up @@ -294,12 +294,12 @@ Headers used in rabbitMQ (only if not sent as part of `DataSet`):

| Field | Ordinal | Type | Label | Description |
|------------------|---------|----------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `componentID` | 2 | `string` | | The ID of the component where the event occurred. |
| `event` | 1 | `Event` | | The base event message |
| `probability` | 6 | `double` | Optional | The probability that the event actually occurred. |
| `referenceLimit` | 5 | `double` | | The reference limit or expected value. |
| `componentID` | 2 | `string` | | The ID of the component where the event occurred. |
| `substationID` | 3 | `string` | Optional | The ID of the substation where the event occurred. |
| `value` | 4 | `double` | | The measured / estimated value in relation to the event (e.g. in the case of a `VoltageEvent` is the voltage, in the case of a `CurrentEvent` is the current event). |
| `referenceLimit` | 5 | `double` | | The reference limit or expected value. |
| `probability` | 6 | `double` | Optional | The probability that the event actually occurred. |



Expand Down
Loading

0 comments on commit cffd247

Please sign in to comment.