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::Sensor Class Reference
Inheritance diagram for dss::obj::Sensor:
[legend]
Collaboration diagram for dss::obj::Sensor:
[legend]

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.
 
Sensorbegin_edit ()
 Marks an object for edition. More...
 
Sensorend_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...
 
Sensorelement (const string &value)
 
Sensorelement (dss::obj::DSSObj &value)
 
dss::obj::DSSObj element_obj ()
 Name (Full Object name) of element to which the Sensor is connected. More...
 
Sensorelement_obj (dss::obj::DSSObj &value)
 
int32_t terminal ()
 Number of the terminal of the circuit element to which the Sensor is connected. More...
 
Sensorterminal (int32_t value)
 
double kvbase ()
 Voltage base for the sensor, in kV. More...
 
Sensorkvbase (double value)
 
bool clear ()
 { Yes | No }. More...
 
Sensorclear (bool value)
 
VectorXd kVs ()
 Array of Voltages (kV) measured by the voltage sensor. More...
 
SensorkVs (VectorXd &value)
 
VectorXd currents ()
 Array of Currents (amps) measured by the current sensor. More...
 
Sensorcurrents (VectorXd &value)
 
VectorXd kWs ()
 Array of Active power (kW) measurements at the sensor. More...
 
SensorkWs (VectorXd &value)
 
VectorXd kvars ()
 Array of Reactive power (kvar) measurements at the sensor. More...
 
Sensorkvars (VectorXd &value)
 
Connection conn ()
 Voltage sensor Connection: { wye | delta | LN | LL }. More...
 
Sensorconn (int32_t value)
 
Sensorconn (Connection value)
 
Sensorconn (const string &value)
 
Sensorconn (const char *value)
 
string conn_str ()
 Voltage sensor Connection: { wye | delta | LN | LL }. More...
 
Sensorconn_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...
 
SensorDeltadirection (int32_t value)
 
double pctError ()
 Assumed percent error in the measurement. More...
 
SensorpctError (double value)
 
double Weight ()
 Weighting factor: Default is 1. More...
 
SensorWeight (double value)
 
double basefreq ()
 Base Frequency for ratings. More...
 
Sensorbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
Sensorenabled (bool value)
 
Sensorlike (const string &value)
 Make like another object, e.g. More...
 
Sensorlike (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
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 Function Documentation

◆ basefreq()

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

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 13

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ clear()

bool dss::obj::Sensor::clear ( )
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

◆ conn()

Connection dss::obj::Sensor::conn ( )
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

◆ conn_str() [1/2]

string dss::obj::Sensor::conn_str ( )
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

◆ conn_str() [2/2]

Sensor & dss::obj::Sensor::conn_str ( const string &  value)
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

◆ currents()

VectorXd dss::obj::Sensor::currents ( )
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

◆ Deltadirection()

int32_t dss::obj::Sensor::Deltadirection ( )
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

◆ element()

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

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

DSS property name: element, DSS property index: 1

◆ element_obj()

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

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

DSS property name: element, DSS property index: 1

◆ enabled()

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

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

DSS property name: enabled, DSS property index: 14

◆ end_edit()

Sensor & dss::obj::Sensor::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.

◆ kvars()

VectorXd dss::obj::Sensor::kvars ( )
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

◆ kvbase()

double dss::obj::Sensor::kvbase ( )
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

◆ kVs()

VectorXd dss::obj::Sensor::kVs ( )
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

◆ kWs()

VectorXd dss::obj::Sensor::kWs ( )
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

◆ like() [1/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 15

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 15

◆ pctError()

double dss::obj::Sensor::pctError ( )
inline

Assumed percent error in the measurement.

Default is 1.

DSS property name: Error, DSS property index: 11

◆ terminal()

int32_t dss::obj::Sensor::terminal ( )
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

◆ Weight()

double dss::obj::Sensor::Weight ( )
inline

Weighting factor: Default is 1.

DSS property name: Weight, DSS property index: 12


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