From 2ffe0ca7fc83cce961bd284478b511dfc39e8fbd Mon Sep 17 00:00:00 2001 From: Paulo Meira <10246101+PMeira@users.noreply.github.com> Date: Mon, 18 Mar 2024 23:07:53 -0300 Subject: [PATCH] enums: add DSSObjectFlags --- dss_python_backend/enums.py | 45 ++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/dss_python_backend/enums.py b/dss_python_backend/enums.py index 0d39df0..7dc121e 100644 --- a/dss_python_backend/enums.py +++ b/dss_python_backend/enums.py @@ -423,7 +423,7 @@ class DSSCompatFlags(IntFlag): the current state of DSS objects. Set this flag to disable this behavior, following the original OpenDSS implementation for potential compatibility with older software that may require the original behavior; note that may lead to - errorneous interpretation of the data in the DSS properties. This was introduced in DSS C-API v0.14.0 + erroneous interpretation of the data in the DSS properties. This was introduced in DSS C-API v0.14.0 and will be further developed for future versions. """ @@ -617,6 +617,48 @@ class SetterFlags(IntFlag): """ +class DSSObjectFlags(IntFlag): + """ + Object flags are bit flags used by various of the internal processes of the DSS engine. + + Most are internal state, but advanced/expert users can manipulate them for some interesting uses. + """ + + Editing = 0x0001 + + HasBeenSaved = 0x0002 + + DefaultAndUnedited = 0x0004 + + Checked = 0x0008 + + Flag = 0x0010 + """General purpose flag for each object""" + + HasEnergyMeter = 0x0020 + + HasSensorObj = 0x0040 + + IsIsolated = 0x0080 + + HasControl = 0x0100 + + IsMonitored = 0x0200 + """Indicates some control is monitoring this element""" + + HasOCPDevice = 0x0400, + """Fuse, Relay, or Recloser""" + + HasAutoOCPDevice = 0x0800 + """Relay or Recloser only""" + + NeedsRecalc = 0x1000 + """Used for Edit command loops""" + + NeedsYPrim = 0x2000 + """Used for Edit command loops + setter flags""" + + class GeneratorVariables(IntEnum): """ Generator variables @@ -1015,6 +1057,7 @@ class VCCSNonRMSVariables(IntEnum): 'CoreType', 'DSSCompatFlags', 'DSSJSONFlags', + 'DSSObjectFlags', 'DSSPropertyNameStyle', 'DSSSaveFlags', 'EnergyMeterRegisters',