dss.IMonitors#

Module Contents#

Classes#

IMonitors

API#

class dss.IMonitors.IMonitors(api_util)#

Bases: dss._cffi_api_util.Iterable

property AllNames: List[str]#

Array of all names of this object type

AsMatrix() dss._types.Float64Array#

Matrix of the active monitor, containing the hour vector, seconds vector, and all channels (index 2 = channel 1). If you need multiple channels, prefer using this function as it processes the monitor byte-stream once.

(API Extension)

property ByteStream: dss._types.Int8Array#

Byte Array containing monitor stream values. Make sure a “save” is done first (standard solution modes do this automatically)

Original COM help: https://opendss.epri.com/ByteStream.html

Channel(Index: int) dss._types.Float32Array#

(read-only) Array of float32 for the specified channel (usage: MyArray = DSSMonitor.Channel(i)). A Save or SaveAll should be executed first. Done automatically by most standard solution modes. Channels start at index 1.

Original COM help: https://opendss.epri.com/Channel.html

property Count: int#

Number of objects of this type

property Element: str#

Full object name of element being monitored.

Original COM help: https://opendss.epri.com/Element.html

property FileName: str#

Name of CSV file associated with active Monitor.

Original COM help: https://opendss.epri.com/FileName.html

property FileVersion: int#

Monitor File Version (integer)

Original COM help: https://opendss.epri.com/FileVersion.html

property First: int#

Sets the first object of this type active. Returns 0 if none.

property Header: List[str]#

Header string; Array of strings containing Channel names

Original COM help: https://opendss.epri.com/Header.html

property Mode: int#

Set Monitor mode (bitmask integer - see DSS Help)

Original COM help: https://opendss.epri.com/Mode1.html

property Name: str#

Gets the current name or sets the active object of this type by name

property Next: int#

Sets next object of this type active. Returns 0 if no more.

property NumChannels: int#

Number of Channels in the active Monitor

Original COM help: https://opendss.epri.com/NumChannels.html

Process()#

Post-process monitor samples taken so far, e.g., Pst for mode=4.

Original COM help: https://opendss.epri.com/Process.html

ProcessAll()#

Post-process all monitor samples taken so far, e.g., Pst for mode=4.

Original COM help: https://opendss.epri.com/ProcessAll.html

property RecordSize: int#

Size of each record in ByteStream (Integer). Same as NumChannels.

Original COM help: https://opendss.epri.com/RecordSize.html

Reset()#

Reset active Monitor object.

Original COM help: https://opendss.epri.com/Reset3.html

ResetAll()#

Reset all Monitor objects.

Original COM help: https://opendss.epri.com/ResetAll1.html

Sample()#

Instruct the active Monitor to take a sample of the present state.

Original COM help: https://opendss.epri.com/Sample2.html

SampleAll()#

Instruct all Monitor objects to take a sample of the present state.

Original COM help: https://opendss.epri.com/SampleAll1.html

property SampleCount: int#

Number of Samples in Monitor at Present

Original COM help: https://opendss.epri.com/SampleCount.html

Save()#

Instructs the active monitor to save its current sample buffer to its monitor stream.

After the data is on the stream, you can access the ByteStream or channel data.

Most standard solution modes do this automatically.

Original COM help: https://opendss.epri.com/Save1.html

SaveAll()#

Instructs the all monitor objects to save their current sample buffers to the respective monitor streams.

Most standard solution modes do this automatically.

Original COM help: https://opendss.epri.com/SaveAll1.html

Show()#

Convert the monitor data to text and displays it with the text editor.

Original COM help: https://opendss.epri.com/Show3.html

property Terminal: int#

Terminal number of element being monitored.

Original COM help: https://opendss.epri.com/Terminal.html

__init__(api_util)#
__iter__() Iterator[dss._cffi_api_util.Iterable]#

Get an iterator of the object collection.

Note that OpenDSS, via the classic APIs, only allow a single object of a specific type to be activated. That is, you cannot use references of distinct objects and interact with both at the same time, or keep a reference to use later. You need to reactivate the target object or ensure it is the active one.

For an alternative, consider using our AltDSS-Python package.

(API Extension)

__len__() int#
property dblFreq: dss._types.Float64Array#

Array of doubles containing frequency values for harmonics mode solutions; Empty for time mode solutions (use dblHour)

Original COM help: https://opendss.epri.com/dblFreq.html

property dblHour: dss._types.Float64Array#

Array of doubles containing time value in hours for time-sampled monitor values; Empty if frequency-sampled values for harmonics solution (see dblFreq)

Original COM help: https://opendss.epri.com/dblHour.html

property idx: int#

Gets the current index or sets the active object of this type by index

While the official API included this for some classes, this is an API Extension for:

  • Capacitors

  • CapControls

  • ISources

  • LineCodes

  • Lines

  • LoadShapes

  • Meters

  • Monitors

  • RegControls

  • Sensors

  • SwtControls

  • Transformers

  • Vsources

  • XYCurves

(API Extension)