Skip to content

Commit

Permalink
Replace custom proto-gen-md-diagrams with official one (#50)
Browse files Browse the repository at this point in the history
## Description

Replace custom proto-gen-md-diagrams with official one

## Changes Made

* Replace custom proto-gen-md-diagrams with official one

## Related Issues

N/A

## Checklist

<!-- Please check off the following items by putting an "x" in the box:
-->

- [x] I have used a PR title that is descriptive enough for a release
note.
- [x] I have tested these changes locally.
- [x] I have added appropriate tests or updated existing tests.
- [ ] I have tested these changes on a dedicated VM or a customer VM
[name of the VM]
- [ ] I have added appropriate documentation or updated existing
documentation.

---------

Co-authored-by: hiimjako <[email protected]>
Co-authored-by: Bot <[email protected]>
  • Loading branch information
3 people authored May 20, 2024
1 parent 33b5e8e commit 200e441
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 98 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ jobs:
- name: Clone and build proto-gen-md-diagrams
run: |
cd ..
git clone https://github.com/zaphiro-technologies/proto-gen-md-diagrams.git
git clone https://github.com/GoogleCloudPlatform/proto-gen-md-diagrams.git
cd proto-gen-md-diagrams
git checkout 1-feature-better-support-for-markdown-generation
go build
cd ..
cd protobuf
Expand Down
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
6 changes: 5 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# ProtoBuf Release Notes

## 0.0.6-dev - 2024-04-16
## 0.0.6-dev - 2024-05-20

### Features

- Support `NormalizedResidual` and `ObjectiveFunction` data types (PR #49 by
@chicco785)

### Continuous Integration

- Replace custom proto-gen-md-diagrams with official one (PR #50 by @chicco785)

## 0.0.5 - 2024-03-22

### Features
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
32 changes: 16 additions & 16 deletions docs/fault.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ An unordered enumeration of phase identifiers. Allows designation of phases for
Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For the example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N.
The integer values are from IEC 61968-9 to support revenue metering applications.

This message is modeled after [CIM PhaseCode](https://zepben.github.io/evolve/docs/cim/evolve/IEC61970/Base/Core/PhaseCode/).
This message is modeled after [CIM PhaseCode](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Core/PhaseCode/).



Expand Down Expand Up @@ -114,7 +114,7 @@ direction LR
%% Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For the example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N.
%% The integer values are from IEC 61968-9 to support revenue metering applications.
%%
%% This message is modeled after [CIM PhaseCode](https://zepben.github.io/evolve/docs/cim/evolve/IEC61970/Base/Core/PhaseCode/).
%% This message is modeled after [CIM PhaseCode](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Core/PhaseCode/).
%%
class PhaseCode{
Expand Down 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
Loading

0 comments on commit 200e441

Please sign in to comment.