DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
|
Classes | |
struct | Properties |
Public Member Functions | |
Sensor (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
Sensor (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
Sensor (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
Sensor & | begin_edit () |
Marks an object for edition. More... | |
Sensor & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
string | element () |
Name (Full Object name) of element to which the Sensor is connected. More... | |
Sensor & | element (const string &value) |
Sensor & | element (dss::obj::DSSObj &value) |
dss::obj::DSSObj | element_obj () |
Name (Full Object name) of element to which the Sensor is connected. More... | |
Sensor & | element_obj (dss::obj::DSSObj &value) |
int32_t | terminal () |
Number of the terminal of the circuit element to which the Sensor is connected. More... | |
Sensor & | terminal (int32_t value) |
double | kvbase () |
Voltage base for the sensor, in kV. More... | |
Sensor & | kvbase (double value) |
bool | clear () |
{ Yes | No }. More... | |
Sensor & | clear (bool value) |
VectorXd | kVs () |
Array of Voltages (kV) measured by the voltage sensor. More... | |
Sensor & | kVs (VectorXd &value) |
VectorXd | currents () |
Array of Currents (amps) measured by the current sensor. More... | |
Sensor & | currents (VectorXd &value) |
VectorXd | kWs () |
Array of Active power (kW) measurements at the sensor. More... | |
Sensor & | kWs (VectorXd &value) |
VectorXd | kvars () |
Array of Reactive power (kvar) measurements at the sensor. More... | |
Sensor & | kvars (VectorXd &value) |
Connection | conn () |
Voltage sensor Connection: { wye | delta | LN | LL }. More... | |
Sensor & | conn (int32_t value) |
Sensor & | conn (Connection value) |
Sensor & | conn (const string &value) |
Sensor & | conn (const char *value) |
string | conn_str () |
Voltage sensor Connection: { wye | delta | LN | LL }. More... | |
Sensor & | conn_str (const string &value) |
Voltage sensor Connection: { wye | delta | LN | LL }. More... | |
int32_t | Deltadirection () |
{1 or -1} Default is 1: 1-2, 2-3, 3-1. More... | |
Sensor & | Deltadirection (int32_t value) |
double | pctError () |
Assumed percent error in the measurement. More... | |
Sensor & | pctError (double value) |
double | Weight () |
Weighting factor: Default is 1. More... | |
Sensor & | Weight (double value) |
double | basefreq () |
Base Frequency for ratings. More... | |
Sensor & | basefreq (double value) |
bool | enabled () |
{Yes|No or True|False} Indicates whether this element is enabled. More... | |
Sensor & | enabled (bool value) |
Sensor & | like (const string &value) |
Make like another object, e.g. More... | |
Sensor & | like (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 [] = "Sensor" |
static const int32_t | dss_cls_idx = 48 |
Additional Inherited Members | |
Public Attributes inherited from dss::obj::DSSObj | |
APIUtil * | api_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 > | |
T | get_obj (int32_t index) |
template<typename T = VectorXd> | |
T | 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 |
|
inline |
Base Frequency for ratings.
DSS property name: basefreq, DSS property index: 13
|
inline |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
{ Yes | No }.
Clear=Yes clears sensor values. Should be issued before putting in a new set of measurements.
DSS property name: clear, DSS property index: 4
|
inline |
Voltage sensor Connection: { wye | delta | LN | LL }.
Default is wye. Applies to voltage measurement only. Currents are always assumed to be line currents. If wye or LN, voltage is assumed measured line-neutral; otherwise, line-line.
DSS property name: conn, DSS property index: 9
|
inline |
Voltage sensor Connection: { wye | delta | LN | LL }.
Default is wye. Applies to voltage measurement only. Currents are always assumed to be line currents. If wye or LN, voltage is assumed measured line-neutral; otherwise, line-line.
DSS property name: conn, DSS property index: 9
|
inline |
Voltage sensor Connection: { wye | delta | LN | LL }.
Default is wye. Applies to voltage measurement only. Currents are always assumed to be line currents. If wye or LN, voltage is assumed measured line-neutral; otherwise, line-line.
DSS property name: conn, DSS property index: 9
|
inline |
Array of Currents (amps) measured by the current sensor.
Specify this or power quantities; not both.
DSS property name: currents, DSS property index: 6
|
inline |
{1 or -1} Default is 1: 1-2, 2-3, 3-1.
For reverse rotation, enter -1. Any positive or negative entry will suffice.
DSS property name: Deltadirection, DSS property index: 10
|
inline |
Name (Full Object name) of element to which the Sensor is connected.
DSS property name: element, DSS property index: 1
|
inline |
Name (Full Object name) of element to which the Sensor is connected.
DSS property name: element, DSS property index: 1
|
inline |
{Yes|No or True|False} Indicates whether this element is enabled.
DSS property name: enabled, DSS property index: 14
|
inline |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
inline |
Array of Reactive power (kvar) measurements at the sensor.
Is converted into Currents along with p=[...]
DSS property name: kvars, DSS property index: 8
|
inline |
Voltage base for the sensor, in kV.
If connected to a 2- or 3-phase terminal, specify L-L voltage. For 1-phase devices specify L-N or actual 1-phase voltage. Like many other DSS devices, default is 12.47kV.
DSS property name: kvbase, DSS property index: 3
|
inline |
Array of Voltages (kV) measured by the voltage sensor.
For Delta-connected sensors, Line-Line voltages are expected. For Wye, Line-Neutral are expected.
DSS property name: kVs, DSS property index: 5
|
inline |
Array of Active power (kW) measurements at the sensor.
Is converted into Currents along with q=[...] Will override any currents=[...] specification.
DSS property name: kWs, DSS property index: 7
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 15
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 15
|
inline |
Assumed percent error in the measurement.
Default is 1.
DSS property name: Error, DSS property index: 11
|
inline |
Number of the terminal of the circuit element to which the Sensor is connected.
1 or 2, typically. Default is 1.
DSS property name: terminal, DSS property index: 2
|
inline |
Weighting factor: Default is 1.
DSS property name: Weight, DSS property index: 12