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 | |
XYcurve (APIUtil *util=nullptr, void *ptr_=nullptr) | |
Create wrapper directly by a given object handle/pointer. | |
XYcurve (APIUtil *util, int32_t idx) | |
Create a wrapper for an element given by the integer index "idx". | |
XYcurve (APIUtil *util, char *name) | |
Create a wrapper for an element given its name. | |
const char * | name () |
Returns the object's name. | |
XYcurve & | begin_edit () |
Marks an object for edition. More... | |
XYcurve & | end_edit (int32_t num_edits=1) |
Finalizes an object edition. More... | |
int32_t | npts () |
Max number of points to expect in curve. More... | |
XYcurve & | npts (int32_t value) |
VectorXd | Points () |
One way to enter the points in a curve. More... | |
XYcurve & | Points (VectorXd &value) |
VectorXd | Yarray () |
Alternate way to enter Y values. More... | |
XYcurve & | Yarray (VectorXd &value) |
VectorXd | Xarray () |
Alternate way to enter X values. More... | |
XYcurve & | Xarray (VectorXd &value) |
string | csvfile () |
Switch input of X-Y curve data to a CSV file containing X, Y points one per line. More... | |
XYcurve & | csvfile (const string &value) |
XYcurve & | csvfile (const char *value) |
string | sngfile () |
Switch input of X-Y curve data to a binary file of SINGLES containing X, Y points packed one after another. More... | |
XYcurve & | sngfile (const string &value) |
XYcurve & | sngfile (const char *value) |
string | dblfile () |
Switch input of X-Y curve data to a binary file of DOUBLES containing X, Y points packed one after another. More... | |
XYcurve & | dblfile (const string &value) |
XYcurve & | dblfile (const char *value) |
double | x () |
Enter a value and then retrieve the interpolated Y value from the Y property. More... | |
XYcurve & | x (double value) |
double | y () |
Enter a value and then retrieve the interpolated X value from the X property. More... | |
XYcurve & | y (double value) |
double | Xshift () |
Shift X property values (in/out) by this amount of offset. More... | |
XYcurve & | Xshift (double value) |
double | Yshift () |
Shift Y property values (in/out) by this amount of offset. More... | |
XYcurve & | Yshift (double value) |
double | Xscale () |
Scale X property values (in/out) by this factor. More... | |
XYcurve & | Xscale (double value) |
double | Yscale () |
Scale Y property values (in/out) by this factor. More... | |
XYcurve & | Yscale (double value) |
XYcurve & | like (const string &value) |
Make like another object, e.g. More... | |
XYcurve & | 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 [] = "XYcurve" |
static const int32_t | dss_cls_idx = 5 |
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 |
Marks an object for edition.
Until end_edit
is called, some actions are postponed.
|
inline |
Switch input of X-Y curve data to a CSV file containing X, Y points one per line.
NOTE: This action may reset the number of points to a lower value.
DSS property name: csvfile, DSS property index: 5
|
inline |
Switch input of X-Y curve data to a binary file of DOUBLES containing X, Y points packed one after another.
NOTE: This action may reset the number of points to a lower value.
DSS property name: dblfile, DSS property index: 7
|
inline |
Finalizes an object edition.
This will result more compelx side-effects like Yprim and other internal data recalculation, for example.
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 14
|
inline |
Make like another object, e.g.
:
New Capacitor.C2 like=c1 ...
DSS property name: like, DSS property index: 14
|
inline |
Max number of points to expect in curve.
This could get reset to the actual number of points defined if less than specified.
DSS property name: npts, DSS property index: 1
|
inline |
One way to enter the points in a curve.
Enter x and y values as one array in the order [x1, y1, x2, y2, ...]. For example:
Points=[1,100 2,200 3, 300]
Values separated by commas or white space. Zero fills arrays if insufficient number of values.
DSS property name: Points, DSS property index: 2
|
inline |
Switch input of X-Y curve data to a binary file of SINGLES containing X, Y points packed one after another.
NOTE: This action may reset the number of points to a lower value.
DSS property name: sngfile, DSS property index: 6
|
inline |
Enter a value and then retrieve the interpolated Y value from the Y property.
On input shifted then scaled to original curve. Scaled then shifted on output.
DSS property name: x, DSS property index: 8
|
inline |
Alternate way to enter X values.
Enter an array of X values corresponding to the Y values. You can also use the syntax: Xarray = (file=filename) !for text file one value per line Xarray = (dblfile=filename) !for packed file of doubles Xarray = (sngfile=filename) !for packed file of singles
Note: this property will reset Npts to a smaller value if the number of values in the files are fewer.
DSS property name: Xarray, DSS property index: 4
|
inline |
Scale X property values (in/out) by this factor.
Default = 1.0. Does not change original definition of arrays.
DSS property name: Xscale, DSS property index: 12
|
inline |
Shift X property values (in/out) by this amount of offset.
Default = 0. Does not change original definition of arrays.
DSS property name: Xshift, DSS property index: 10
|
inline |
Enter a value and then retrieve the interpolated X value from the X property.
On input shifted then scaled to original curve. Scaled then shifted on output.
DSS property name: y, DSS property index: 9
|
inline |
Alternate way to enter Y values.
Enter an array of Y values corresponding to the X values. You can also use the syntax: Yarray = (file=filename) !for text file one value per line Yarray = (dblfile=filename) !for packed file of doubles Yarray = (sngfile=filename) !for packed file of singles
Note: this property will reset Npts to a smaller value if the number of values in the files are fewer.
DSS property name: Yarray, DSS property index: 3
|
inline |
Scale Y property values (in/out) by this factor.
Default = 1.0. Does not change original definition of arrays.
DSS property name: Yscale, DSS property index: 13
|
inline |
Shift Y property values (in/out) by this amount of offset.
Default = 0. Does not change original definition of arrays.
DSS property name: Yshift, DSS property index: 11