Skip to content

Commit

Permalink
Add Updated to FaultEventType (#85)
Browse files Browse the repository at this point in the history
## Description

Add Updated to `FaultEventType` to allow updates of faults (also in case
they cannot be located).

## Changes Made

Add Updated to `FaultEventType`

## 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 cluster [name of the cluster] /
customer [name of the customer]
- [x] I have added appropriate documentation or updated existing
documentation.

---------

Co-authored-by: kdevelleZ <[email protected]>
  • Loading branch information
chicco785 and kdevelleZ authored Jan 21, 2025
1 parent 8462079 commit 1eb3107
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ all: proto-lint generate lint test docs

.PHONY: lint
lint:
golangci-lint run --fix
golangci-lint run --fix && golines . -w

.PHONY: test
test:
Expand Down
3 changes: 2 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# ProtoBuf Release Notes

## 0.0.9-dev - 2025-01-20
## 0.0.9-dev - 2025-01-21

### Features

- Add Updated to `FaultEventType` (PR #85 by @chicco785)
- Add `FrequencyVariation` Event (PR #80 by @chicco785)

### Continuous Integration
Expand Down
6 changes: 4 additions & 2 deletions docs/fault.proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ The collection of Fault Event Types defined so far.
| `FAULT_EVENT_TYPE_LOCATED` | 2 | Fault located |
| `FAULT_EVENT_TYPE_ENDED` | 3 | Fault ended |
| `FAULT_EVENT_TYPE_UNKNOWN` | 4 | Information available don't allow us to know if the Fault is active or complete |
| `FAULT_EVENT_TYPE_UPDATED` | 5 | Fault data requires to be updated |



Expand Down Expand Up @@ -177,6 +178,7 @@ class FaultEventType{
FAULT_EVENT_TYPE_LOCATED
FAULT_EVENT_TYPE_ENDED
FAULT_EVENT_TYPE_UNKNOWN
FAULT_EVENT_TYPE_UPDATED
}
```
### Fault Diagram
Expand All @@ -187,7 +189,7 @@ direction LR
%% Abnormal condition causing current flow through conducting equipment, such as caused by equipment failure or short circuits from objects not typically modelled (for example, a tree falling on a line).
%%
%% 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.
%% This message is modelled 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.
%%
%% Faults messages represent events linked to a given fault (identified by the id). From the point of view of storage the sequence of events may be handled in a way that does not map totally to the single event, e.g. by combining multiple events in a single database row.
%%
Expand Down Expand Up @@ -292,7 +294,7 @@ class FaultMeasurement {

Abnormal condition causing current flow through conducting equipment, such as caused by equipment failure or short circuits from objects not typically modelled (for example, a tree falling on a line).

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.
This message is modelled 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.

Faults messages represent events linked to a given fault (identified by the id). From the point of view of storage the sequence of events may be handled in a way that does not map totally to the single event, e.g. by combining multiple events in a single database row.

Expand Down
11 changes: 8 additions & 3 deletions go/grid/v1/fault.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions python/zaphiro/grid/v1/fault_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions python/zaphiro/grid/v1/fault_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class FaultEventType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
FAULT_EVENT_TYPE_LOCATED: _ClassVar[FaultEventType]
FAULT_EVENT_TYPE_ENDED: _ClassVar[FaultEventType]
FAULT_EVENT_TYPE_UNKNOWN: _ClassVar[FaultEventType]
FAULT_EVENT_TYPE_UPDATED: _ClassVar[FaultEventType]
PHASE_CONNECTED_FAULT_KIND_UNSPECIFIED: PhaseConnectedFaultKind
PHASE_CONNECTED_FAULT_KIND_LINE_TO_GROUND: PhaseConnectedFaultKind
PHASE_CONNECTED_FAULT_KIND_LINE_TO_LINE: PhaseConnectedFaultKind
Expand Down Expand Up @@ -86,6 +87,7 @@ FAULT_EVENT_TYPE_STARTED: FaultEventType
FAULT_EVENT_TYPE_LOCATED: FaultEventType
FAULT_EVENT_TYPE_ENDED: FaultEventType
FAULT_EVENT_TYPE_UNKNOWN: FaultEventType
FAULT_EVENT_TYPE_UPDATED: FaultEventType

class Fault(_message.Message):
__slots__ = ("Id", "description", "kind", "phases", "updatedAt", "faultEventType", "faultyEquipmentId", "faultCurrent", "impactedEquipmentIds", "usedMeasurementIds", "measurementTimestamp", "locationProbability")
Expand Down
3 changes: 2 additions & 1 deletion zaphiro/grid/v1/fault.proto
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ enum FaultEventType {
FAULT_EVENT_TYPE_LOCATED = 2; //Fault located
FAULT_EVENT_TYPE_ENDED = 3; //Fault ended
FAULT_EVENT_TYPE_UNKNOWN = 4; //Information available don't allow us to know if the Fault is active or complete
FAULT_EVENT_TYPE_UPDATED = 5; //Fault data requires to be updated
}

/* Abnormal condition causing current flow through conducting equipment, such as caused by equipment failure or short circuits from objects not typically modelled (for example, a tree falling on a line).
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.
This message is modelled 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.
Faults messages represent events linked to a given fault (identified by the id). From the point of view of storage the sequence of events may be handled in a way that does not map totally to the single event, e.g. by combining multiple events in a single database row.
Expand Down

0 comments on commit 1eb3107

Please sign in to comment.