Replies: 1 comment
-
I wanted to close this discussion, so I created #256 for item 5. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I will use this discussion to make annotations while I read the documentation to implement the microgrid API client, with doubts or things I think are wrong or confusing, with the hopes we can use it to improve the docs.
Action points
To know what each number is about, please see the Issues section.
GridConnectionPoint
field and instead require to have aFuse
in the component graph (@tiyash-basu-frequenz)primary
andsecondary
are not actually voltages but number of coil turns or something like that (@tiyash-basu-frequenz)0
for any component category and can't be negative because it is auint64
(@llucax)Issues
Component.category_type
docs say "The metadata specific to the component category type.", which looks pretty odd. See Component Category Metadata/Type for more details.Fuse
message, but theGridConnectionPoint
message is still using aunint32
rated_fuse_current
field. Should it have aFuse
instead?primary
andsecondary
voltages. If this is a common term in the industry then OK, otherwise I recommend changing toinput_voltage
andoutput_voltage
. Also although it might be obvious, it could be worth specifying the units (volts?) for those fields.start
means it was there forever and the lack ofend
means the asset is still there and there is no plan to remove it (if the whole message is missing, I will also consider that the asset is there forever). I also wonder what does this mean for the microgrid API in particular, will it ever return assets that are already removed? Maybe it is worth documenting in https://github.com/frequenz-floss/frequenz-api-microgrid/blob/6291e8e9d1c0769ec7b93cb8300dfb3c3f096ec0/proto/frequenz/api/microgrid/v1/microgrid.proto#L38-L63.GRID
component. Does this still holds true?Ideas
[1, 2] Component Category Metadata/Type
For one side I feel a bit like the
ComponentCategory
is redundant withComponentCategoryMetadataVariant
, if we would define one message for every category, then it is enough withComponentCategoryMetadataVariant
, theoneof
will tell us which category we are dealing with.But I assume the
ComponentCategory
is used much more widely, so we need to keep it for other purposes, so let's keep looking for ideas assuming this.If we forget about the category, it seems like what we have here is the category-specific characteristics from a component. What about naming
ComponentCategoryMetadataVariant
something likeCategorySpecificInfo
. For me the nameMetadataVariant
is super confusing, and the field namecategory_type
is even more confusing.This is also how it reads when accessing this info:
For me this looks like an enum, like it is just saying it is a battery, not that we are actually getting information about the battery.
Looking at the problem in reverse, something more intuitive could look like:
We could use something different than
info
, an alternative could befield
(CategorySpecificFields
,BatteryFields
,component.category_specific.fields.battery
) or even the oldmetadata
(CategorySpecificMetadata
,BatteryMetadata
,component.category_specific.metadata.battery
). I think I personally preferinfo
though, it seems more general thanfields
and less cryptic (or more specific) thanmetadata
.(to be continued...)
Beta Was this translation helpful? Give feedback.
All reactions