DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
dss::obj::Monitor Class Reference
Inheritance diagram for dss::obj::Monitor:
[legend]
Collaboration diagram for dss::obj::Monitor:
[legend]

Classes

struct  Properties
 

Public Types

enum class  MonitorAction : int32_t {
  Clear = 0 , Save = 1 , Take = 2 , Process = 3 ,
  Reset = 0
}
 Monitor: Action (DSS enumeration for Monitor) More...
 

Public Member Functions

 Monitor (APIUtil *util=nullptr, void *ptr_=nullptr)
 Create wrapper directly by a given object handle/pointer.
 
 Monitor (APIUtil *util, int32_t idx)
 Create a wrapper for an element given by the integer index "idx".
 
 Monitor (APIUtil *util, char *name)
 Create a wrapper for an element given its name.
 
const char * name ()
 Returns the object's name.
 
Monitorbegin_edit ()
 Marks an object for edition. More...
 
Monitorend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
string element ()
 Name (Full Object name) of element to which the monitor is connected. More...
 
Monitorelement (const string &value)
 
Monitorelement (dss::obj::DSSObj &value)
 
dss::obj::DSSObj element_obj ()
 Name (Full Object name) of element to which the monitor is connected. More...
 
Monitorelement_obj (dss::obj::DSSObj &value)
 
int32_t terminal ()
 Number of the terminal of the circuit element to which the monitor is connected. More...
 
Monitorterminal (int32_t value)
 
int32_t mode ()
 Bitmask integer designating the values the monitor is to capture: 0 = Voltages and currents at designated terminal 1 = Powers at designated terminal 2 = Tap Position (Transformer Device only) 3 = State Variables (PCElements only) 4 = Flicker level and severity index (Pst) for voltages. More...
 
Monitormode (int32_t value)
 
Monitoraction (int32_t value)
 {Clear | Save | Take | Process} (C)lears or (S)aves current buffer. More...
 
Monitoraction (MonitorAction value)
 {Clear | Save | Take | Process} (C)lears or (S)aves current buffer. More...
 
Monitoraction (const string &value)
 {Clear | Save | Take | Process} (C)lears or (S)aves current buffer. More...
 
Monitoraction (const char *value)
 {Clear | Save | Take | Process} (C)lears or (S)aves current buffer. More...
 
bool residual ()
 {Yes/True | No/False} Default = No. More...
 
Monitorresidual (bool value)
 
bool VIPolar ()
 {Yes/True | No/False} Default = YES. More...
 
MonitorVIPolar (bool value)
 
bool PPolar ()
 {Yes/True | No/False} Default = YES. More...
 
MonitorPPolar (bool value)
 
double basefreq ()
 Base Frequency for ratings. More...
 
Monitorbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
Monitorenabled (bool value)
 
Monitorlike (const string &value)
 Make like another object, e.g. More...
 
Monitorlike (const char *value)
 Make like another object, e.g. More...
 
- Public Member Functions inherited from dss::obj::DSSObj
 DSSObj (APIUtil *util=nullptr, void *ptr_=nullptr)
 

Static Public Attributes

static const char dss_cls_name [] = "Monitor"
 
static const int32_t dss_cls_idx = 46
 

Additional Inherited Members

- Public Attributes inherited from dss::obj::DSSObj
APIUtilapi_util
 
void * ptr
 
- Protected Member Functions inherited from dss::obj::DSSObj
void check_for_error ()
 
void set_string (int32_t index, const string &value)
 
void set_string (int32_t index, const char *value)
 
string get_prop_string (int32_t index)
 
complex get_complex (int32_t index)
 
void set_complex (int32_t index, complex value)
 
void set_string_array (int32_t index, strings &value)
 
void set_obj (int32_t index, DSSObj &value)
 
template<typename T >
get_obj (int32_t index)
 
template<typename T = VectorXd>
get_array (int32_t index)
 
template<typename T = VectorXd>
void set_array (int32_t index, T value)
 
- Static Protected Member Functions inherited from dss::obj::DSSObj
template<typename T = VectorXd>
static void set_array (void *ptr, int32_t index, T value)
 
- Protected Attributes inherited from dss::obj::DSSObj
friend DSSBatch
 

Member Enumeration Documentation

◆ MonitorAction

enum class dss::obj::Monitor::MonitorAction : int32_t
strong

Monitor: Action (DSS enumeration for Monitor)

Enumerator
Clear 

Clear.

Save 

Save.

Take 

Take.

Process 

Process.

Reset 

Reset.

Member Function Documentation

◆ action() [1/4]

Monitor & dss::obj::Monitor::action ( const char *  value)
inline

{Clear | Save | Take | Process} (C)lears or (S)aves current buffer.

(T)ake action takes a sample. (P)rocesses the data taken so far (e.g. Pst for mode 4).

Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action.

DSS property name: action, DSS property index: 4

◆ action() [2/4]

Monitor & dss::obj::Monitor::action ( const string &  value)
inline

{Clear | Save | Take | Process} (C)lears or (S)aves current buffer.

(T)ake action takes a sample. (P)rocesses the data taken so far (e.g. Pst for mode 4).

Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action.

DSS property name: action, DSS property index: 4

◆ action() [3/4]

Monitor & dss::obj::Monitor::action ( int32_t  value)
inline

{Clear | Save | Take | Process} (C)lears or (S)aves current buffer.

(T)ake action takes a sample. (P)rocesses the data taken so far (e.g. Pst for mode 4).

Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action.

DSS property name: action, DSS property index: 4

◆ action() [4/4]

Monitor & dss::obj::Monitor::action ( MonitorAction  value)
inline

{Clear | Save | Take | Process} (C)lears or (S)aves current buffer.

(T)ake action takes a sample. (P)rocesses the data taken so far (e.g. Pst for mode 4).

Note that monitors are automatically reset (cleared) when the Set Mode= command is issued. Otherwise, the user must explicitly reset all monitors (reset monitors command) or individual monitors with the Clear action.

DSS property name: action, DSS property index: 4

◆ basefreq()

double dss::obj::Monitor::basefreq ( )
inline

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 8

◆ begin_edit()

Monitor & dss::obj::Monitor::begin_edit ( )
inline

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ element()

string dss::obj::Monitor::element ( )
inline

Name (Full Object name) of element to which the monitor is connected.

DSS property name: element, DSS property index: 1

◆ element_obj()

dss::obj::DSSObj dss::obj::Monitor::element_obj ( )
inline

Name (Full Object name) of element to which the monitor is connected.

DSS property name: element, DSS property index: 1

◆ enabled()

bool dss::obj::Monitor::enabled ( )
inline

{Yes|No or True|False} Indicates whether this element is enabled.

DSS property name: enabled, DSS property index: 9

◆ end_edit()

Monitor & dss::obj::Monitor::end_edit ( int32_t  num_edits = 1)
inline

Finalizes an object edition.

This will result more compelx side-effects like Yprim and other internal data recalculation, for example.

◆ like() [1/2]

Monitor & dss::obj::Monitor::like ( const char *  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 10

◆ like() [2/2]

Monitor & dss::obj::Monitor::like ( const string &  value)
inline

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 10

◆ mode()

int32_t dss::obj::Monitor::mode ( )
inline

Bitmask integer designating the values the monitor is to capture: 0 = Voltages and currents at designated terminal 1 = Powers at designated terminal 2 = Tap Position (Transformer Device only) 3 = State Variables (PCElements only) 4 = Flicker level and severity index (Pst) for voltages.

No adders apply. Flicker level at simulation time step, Pst at 10-minute time step. 5 = Solution variables (Iterations, etc). Normally, these would be actual phasor quantities from solution. 6 = Capacitor Switching (Capacitors only) 7 = Storage state vars (Storage device only) 8 = All winding currents (Transformer device only) 9 = Losses, watts and var (of monitored device) 10 = All Winding voltages (Transformer device only) Normally, these would be actual phasor quantities from solution. 11 = All terminal node voltages and line currents of monitored device 12 = All terminal node voltages LL and line currents of monitored device Combine mode with adders below to achieve other results for terminal quantities: +16 = Sequence quantities +32 = Magnitude only +64 = Positive sequence only or avg of all phases

Mix adder to obtain desired results. For example: Mode=112 will save positive sequence voltage and current magnitudes only Mode=48 will save all sequence voltages and currents, but magnitude only.

DSS property name: mode, DSS property index: 3

◆ PPolar()

bool dss::obj::Monitor::PPolar ( )
inline

{Yes/True | No/False} Default = YES.

Report power in Apparent power, S, in polar form (Mag/Angle).(default) Otherwise, is P and Q

DSS property name: PPolar, DSS property index: 7

◆ residual()

bool dss::obj::Monitor::residual ( )
inline

{Yes/True | No/False} Default = No.

Include Residual cbannel (sum of all phases) for voltage and current. Does not apply to sequence quantity modes or power modes.

DSS property name: residual, DSS property index: 5

◆ terminal()

int32_t dss::obj::Monitor::terminal ( )
inline

Number of the terminal of the circuit element to which the monitor is connected.

1 or 2, typically. For monitoring states, attach monitor to terminal 1.

DSS property name: terminal, DSS property index: 2

◆ VIPolar()

bool dss::obj::Monitor::VIPolar ( )
inline

{Yes/True | No/False} Default = YES.

Report voltage and current in polar form (Mag/Angle). (default) Otherwise, it will be real and imaginary.

DSS property name: VIPolar, DSS property index: 6


The documentation for this class was generated from the following file: