Skip to content

Commit 2ffe0ca

Browse files
committed
enums: add DSSObjectFlags
1 parent bb497cd commit 2ffe0ca

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

dss_python_backend/enums.py

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class DSSCompatFlags(IntFlag):
423423
the current state of DSS objects.
424424
Set this flag to disable this behavior, following the original OpenDSS implementation for potential
425425
compatibility with older software that may require the original behavior; note that may lead to
426-
errorneous interpretation of the data in the DSS properties. This was introduced in DSS C-API v0.14.0
426+
erroneous interpretation of the data in the DSS properties. This was introduced in DSS C-API v0.14.0
427427
and will be further developed for future versions.
428428
"""
429429

@@ -617,6 +617,48 @@ class SetterFlags(IntFlag):
617617
"""
618618

619619

620+
class DSSObjectFlags(IntFlag):
621+
"""
622+
Object flags are bit flags used by various of the internal processes of the DSS engine.
623+
624+
Most are internal state, but advanced/expert users can manipulate them for some interesting uses.
625+
"""
626+
627+
Editing = 0x0001
628+
629+
HasBeenSaved = 0x0002
630+
631+
DefaultAndUnedited = 0x0004
632+
633+
Checked = 0x0008
634+
635+
Flag = 0x0010
636+
"""General purpose flag for each object"""
637+
638+
HasEnergyMeter = 0x0020
639+
640+
HasSensorObj = 0x0040
641+
642+
IsIsolated = 0x0080
643+
644+
HasControl = 0x0100
645+
646+
IsMonitored = 0x0200
647+
"""Indicates some control is monitoring this element"""
648+
649+
HasOCPDevice = 0x0400,
650+
"""Fuse, Relay, or Recloser"""
651+
652+
HasAutoOCPDevice = 0x0800
653+
"""Relay or Recloser only"""
654+
655+
NeedsRecalc = 0x1000
656+
"""Used for Edit command loops"""
657+
658+
NeedsYPrim = 0x2000
659+
"""Used for Edit command loops + setter flags"""
660+
661+
620662
class GeneratorVariables(IntEnum):
621663
"""
622664
Generator variables
@@ -1015,6 +1057,7 @@ class VCCSNonRMSVariables(IntEnum):
10151057
'CoreType',
10161058
'DSSCompatFlags',
10171059
'DSSJSONFlags',
1060+
'DSSObjectFlags',
10181061
'DSSPropertyNameStyle',
10191062
'DSSSaveFlags',
10201063
'EnergyMeterRegisters',

0 commit comments

Comments
 (0)