Skip to content

Commit

Permalink
Document headers/application properties data types for every Protobuf. (
Browse files Browse the repository at this point in the history
#27)

## Description

Document headers/application properties data types for every Protobuf.

## Changes Made

Document headers/application properties data types for every Protobuf.

## Related Issues

N/A

## Checklist

- [x] I have used a PR title that is descriptive enough for a release
note.
- [x] I have tested these changes locally.
- [ ] 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: chicco785 <[email protected]>
  • Loading branch information
3 people authored Dec 22, 2023
1 parent 91f6f9e commit a1422b3
Show file tree
Hide file tree
Showing 14 changed files with 129 additions and 137 deletions.
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
VERSION ?= latest

# Create a variable that contains the current date in UTC
# Different flow if this script is running on Darwin or Linux machines.
ifeq (Darwin,$(shell uname))
NOW_DATE = $(shell date -u +%d-%m-%Y)
else
NOW_DATE = $(shell date -u -I)
endif

all: proto-lint generate lint test docs

.PHONY: lint
Expand Down
4 changes: 3 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# ProtoBuf Release Notes

## 0.0.3-dev - 2023-12-13
## 0.0.3-dev - 2023-12-22

### Features

- Add protocol buffer for grid events (PR #19 by @chicco785)

### Documentation

- Document headers/application properties data types for every Protobuf. (PR #27
by @hiimjako)
- [Documentation] Change fault id data type (PR #26 by @tejo)

### Refactoring
Expand Down
32 changes: 16 additions & 16 deletions docs/data.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ direction LR
%% A single data.
%% Headers used in rabbitMQ (only if not sent as part of `DataSet`):
%% * `id`: id of the `Data`
%% * `type`: always `Data`
%% * `producerId`: the id of the producer (e.g. a PMU) linked to the dataset.
%% * `timestampId`: related measurement Unix msec timestamp (if any)
%% * `id` (string): id of the `Data`
%% * `type` (string): always `Data`
%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset.
%% * `timestampId` (int64): related measurement Unix msec timestamp (if any)
%%
class Data {
Expand All @@ -169,10 +169,10 @@ direction LR
%% A set of data.
%% Headers used in rabbitMQ:
%% * `id`: id of the `DataSet`
%% * `type`: always `DataSet`
%% * `producerId`: the id of the producer (e.g. a PMU) linked to the dataset.
%% * `timestampId`: related measurement Unix msec timestamp (if any)
%% * `id` (string): id of the `DataSet`
%% * `type` (string): always `DataSet`
%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset.
%% * `timestampId` (int64): related measurement Unix msec timestamp (if any)
%%
class DataSet {
Expand All @@ -189,10 +189,10 @@ DataSet .. ` Data`

A single data.
Headers used in rabbitMQ (only if not sent as part of `DataSet`):
* `id`: id of the `Data`
* `type`: always `Data`
* `producerId`: the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `id` (string): id of the `Data`
* `type` (string): always `Data`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)



Expand All @@ -211,10 +211,10 @@ Headers used in rabbitMQ (only if not sent as part of `DataSet`):

A set of data.
Headers used in rabbitMQ:
* `id`: id of the `DataSet`
* `type`: always `DataSet`
* `producerId`: the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `id` (string): id of the `DataSet`
* `type` (string): always `DataSet`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)



Expand Down
20 changes: 10 additions & 10 deletions docs/event.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ direction LR
%% A generic event.
%% Headers used in rabbitMQ (only if not sent as part of `DataSet`):
%% * `id`: id of the `Event`
%% * `type`: always `Event` - used for routing.
%% * `eventType`: the specific type of `Event`, this is required in addition
%% * `id` (string): id of the `Event`
%% * `type` (string): always `Event` - used for routing.
%% * `eventType` (string): the specific type of `Event`, this is required in addition
%% to `type` for de-serialization of the messages.
%% * `sourceId`: the id of the source (e.g. a PMU) that generated the event.
%% * `timestampId`: related measurement Unix msec timestamp (if any)
%% * `sourceId` (string): the id of the source (e.g. a PMU) that generated the event.
%% * `timestampId` (int64): related measurement Unix msec timestamp (if any)
%%
class Event {
Expand All @@ -120,12 +120,12 @@ Event --> `EventStatus`

A generic event.
Headers used in rabbitMQ (only if not sent as part of `DataSet`):
* `id`: id of the `Event`
* `type`: always `Event` - used for routing.
* `eventType`: the specific type of `Event`, this is required in addition
* `id` (string): id of the `Event`
* `type` (string): always `Event` - used for routing.
* `eventType` (string): the specific type of `Event`, this is required in addition
to `type` for de-serialization of the messages.
* `sourceId`: the id of the source (e.g. a PMU) that generated the event.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `sourceId` (string): the id of the source (e.g. a PMU) that generated the event.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)



Expand Down
36 changes: 18 additions & 18 deletions docs/fault.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ direction LR
%% This message is modeled after [CIM Fault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/Fault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.
%%
%% Headers used in rabbitMQ:
%% * `id`: id of the `Fault`
%% * `type`: always `Fault`
%% * `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
%% * `id` (string): id of the `Fault`
%% * `type` (string): always `Fault`
%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
%%
class Fault {
Expand Down Expand Up @@ -190,9 +190,9 @@ direction LR
%% This message is modeled after [CIM LineFault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/LineFault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.
%%
%% Headers used in rabbitMQ:
%% * `id`: id of the `Fault`
%% * `type`: always `LineFault`
%% * `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
%% * `id` (string): id of the `Fault`
%% * `type` (string): always `LineFault`
%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
%%
class LineFault {
Expand All @@ -215,9 +215,9 @@ direction LR
%% This message is modeled after [CIM EquipmentFault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/EquipmentFault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.
%%
%% Headers used in rabbitMQ:
%% * `id`: id of the `EquipmentFault`
%% * `type`: always `LineFault`
%% * `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
%% * `id` (string): id of the `EquipmentFault`
%% * `type` (string): always `LineFault`
%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
%%
class EquipmentFault {
Expand All @@ -237,9 +237,9 @@ Abnormal condition causing current flow through conducting equipment, such as ca
This message is modeled after [CIM Fault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/Fault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.

Headers used in rabbitMQ:
* `id`: id of the `Fault`
* `type`: always `Fault`
* `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
* `id` (string): id of the `Fault`
* `type` (string): always `Fault`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.



Expand Down Expand Up @@ -268,9 +268,9 @@ A fault that occurs on an AC line segment at some point along the length.
This message is modeled after [CIM LineFault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/LineFault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.

Headers used in rabbitMQ:
* `id`: id of the `Fault`
* `type`: always `LineFault`
* `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
* `id` (string): id of the `Fault`
* `type` (string): always `LineFault`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.



Expand All @@ -293,9 +293,9 @@ A fault applied at the terminal, external to the equipment. This class is not us
This message is modeled after [CIM EquipmentFault](https://zepben.github.io/evolve/docs/cim/cim100/TC57CIM/IEC61970/Base/Faults/EquipmentFault) according to the extensions defined in the [fault-data-storage](https://github.com/zaphiro-technologies/architecture/blob/main/features/31-fault-data-storage.md#data-structures) feature.

Headers used in rabbitMQ:
* `id`: id of the `EquipmentFault`
* `type`: always `LineFault`
* `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
* `id` (string): id of the `EquipmentFault`
* `type` (string): always `LineFault`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.



Expand Down
20 changes: 10 additions & 10 deletions docs/grid_event.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ direction LR
%% A grid event.
%% Headers used in rabbitMQ (only if not sent as part of `DataSet`):
%% * `id`: id of the `Event`
%% * `type`: always `Event` - used for routing.
%% * `eventType`: the specific type of `GridEvent`, this is required in addition
%% * `id` (string): id of the `Event`
%% * `type` (string): always `Event` - used for routing.
%% * `eventType` (string): the specific type of `GridEvent`, this is required in addition
%% to `type` for de-serialization of the messages.
%% * `sourceId`: the id of the source (e.g. a PMU) that generated the event.
%% * `timestampId`: related measurement Unix msec timestamp (if any)
%% * `sourceId` (string): the id of the source (e.g. a PMU) that generated the event.
%% * `timestampId` (int64): related measurement Unix msec timestamp (if any)
%%
class GridEvent {
Expand Down Expand Up @@ -283,12 +283,12 @@ TransientOscillation --> `PhaseEvent`

A grid event.
Headers used in rabbitMQ (only if not sent as part of `DataSet`):
* `id`: id of the `Event`
* `type`: always `Event` - used for routing.
* `eventType`: the specific type of `GridEvent`, this is required in addition
* `id` (string): id of the `Event`
* `type` (string): always `Event` - used for routing.
* `eventType` (string): the specific type of `GridEvent`, this is required in addition
to `type` for de-serialization of the messages.
* `sourceId`: the id of the source (e.g. a PMU) that generated the event.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `sourceId` (string): the id of the source (e.g. a PMU) that generated the event.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)



Expand Down
40 changes: 20 additions & 20 deletions docs/task.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ direction LR
%% A task message.
%% Headers used in rabbitMQ:
%% * `id`: id of the `Task`
%% * `type`: always `Task`
%% * `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
%% * `timestampId`: related measurement Unix msec timestamp (if any)
%% * `taskType`: The textual representation of the task type.
%% * `id` (string): id of the `Task`
%% * `type` (string): always `Task`
%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
%% * `timestampId` (int64): related measurement Unix msec timestamp (if any)
%% * `taskType` (int8): The textual representation of the task type.
%%
class Task {
Expand All @@ -133,11 +133,11 @@ direction LR
%% A notification message.
%% Headers used in rabbitMQ:
%% * `id`: id of the `Notification`
%% * `type`: always `Notification`
%% * `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
%% * `timestampId`: related measurement Unix msec timestamp (if any)
%% * `notificationType`: The textual representation of the notification type.
%% * `id` (string): id of the `Notification`
%% * `type` (string): always `Notification`
%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
%% * `timestampId` (int64): related measurement Unix msec timestamp (if any)
%% * `notificationType` (int8): The textual representation of the notification type.
%%
class Notification {
Expand Down Expand Up @@ -172,11 +172,11 @@ A parameter of a `Task` or `Notification`

A task message.
Headers used in rabbitMQ:
* `id`: id of the `Task`
* `type`: always `Task`
* `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `taskType`: The textual representation of the task type.
* `id` (string): id of the `Task`
* `type` (string): always `Task`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)
* `taskType` (int8): The textual representation of the task type.



Expand All @@ -195,11 +195,11 @@ Headers used in rabbitMQ:

A notification message.
Headers used in rabbitMQ:
* `id`: id of the `Notification`
* `type`: always `Notification`
* `producerId`: the id of the producer (e.g. a PMU) linked to the notification.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `notificationType`: The textual representation of the notification type.
* `id` (string): id of the `Notification`
* `type` (string): always `Notification`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the notification.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)
* `notificationType` (int8): The textual representation of the notification type.



Expand Down
20 changes: 10 additions & 10 deletions docs/topology.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ direction LR
%% A topology computed information.
%% Headers used in rabbitMQ:
%% * `id`: id of the `Topology`
%% * `type`: always `Topology`
%% * `producerId`: the id of the producer (e.g. a PMU) linked to the dataset.
%% * `timestampId`: related measurement Unix msec timestamp (if any)
%% * `subnetworkId`: the sub network id for which the topology was computed
%% * `id` (string): id of the `Topology`
%% * `type` (string): always `Topology`
%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset.
%% * `timestampId` (int64): related measurement Unix msec timestamp (if any)
%% * `subnetworkId` (string): the sub network id for which the topology was computed
%%
class Topology {
Expand All @@ -49,11 +49,11 @@ class Topology {

A topology computed information.
Headers used in rabbitMQ:
* `id`: id of the `Topology`
* `type`: always `Topology`
* `producerId`: the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `subnetworkId`: the sub network id for which the topology was computed
* `id` (string): id of the `Topology`
* `type` (string): always `Topology`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)
* `subnetworkId` (string): the sub network id for which the topology was computed



Expand Down
16 changes: 8 additions & 8 deletions proto/grid/v1/data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ enum DataType {

/* A single data.
Headers used in rabbitMQ (only if not sent as part of `DataSet`):
* `id`: id of the `Data`
* `type`: always `Data`
* `producerId`: the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `id` (string): id of the `Data`
* `type` (string): always `Data`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)
*/

message Data {
Expand All @@ -77,10 +77,10 @@ message Data {

/* A set of data.
Headers used in rabbitMQ:
* `id`: id of the `DataSet`
* `type`: always `DataSet`
* `producerId`: the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `id` (string): id of the `DataSet`
* `type` (string): always `DataSet`
* `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)
*/

message DataSet {
Expand Down
10 changes: 5 additions & 5 deletions proto/grid/v1/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ enum EventSourceType {

/* A generic event.
Headers used in rabbitMQ (only if not sent as part of `DataSet`):
* `id`: id of the `Event`
* `type`: always `Event` - used for routing.
* `eventType`: the specific type of `Event`, this is required in addition
* `id` (string): id of the `Event`
* `type` (string): always `Event` - used for routing.
* `eventType` (string): the specific type of `Event`, this is required in addition
to `type` for de-serialization of the messages.
* `sourceId`: the id of the source (e.g. a PMU) that generated the event.
* `timestampId`: related measurement Unix msec timestamp (if any)
* `sourceId` (string): the id of the source (e.g. a PMU) that generated the event.
* `timestampId` (int64): related measurement Unix msec timestamp (if any)
*/

message Event {
Expand Down
Loading

0 comments on commit a1422b3

Please sign in to comment.