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

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.
 
XYcurvebegin_edit ()
 Marks an object for edition. More...
 
XYcurveend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
int32_t npts ()
 Max number of points to expect in curve. More...
 
XYcurvenpts (int32_t value)
 
VectorXd Points ()
 One way to enter the points in a curve. More...
 
XYcurvePoints (VectorXd &value)
 
VectorXd Yarray ()
 Alternate way to enter Y values. More...
 
XYcurveYarray (VectorXd &value)
 
VectorXd Xarray ()
 Alternate way to enter X values. More...
 
XYcurveXarray (VectorXd &value)
 
string csvfile ()
 Switch input of X-Y curve data to a CSV file containing X, Y points one per line. More...
 
XYcurvecsvfile (const string &value)
 
XYcurvecsvfile (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...
 
XYcurvesngfile (const string &value)
 
XYcurvesngfile (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...
 
XYcurvedblfile (const string &value)
 
XYcurvedblfile (const char *value)
 
double x ()
 Enter a value and then retrieve the interpolated Y value from the Y property. More...
 
XYcurvex (double value)
 
double y ()
 Enter a value and then retrieve the interpolated X value from the X property. More...
 
XYcurvey (double value)
 
double Xshift ()
 Shift X property values (in/out) by this amount of offset. More...
 
XYcurveXshift (double value)
 
double Yshift ()
 Shift Y property values (in/out) by this amount of offset. More...
 
XYcurveYshift (double value)
 
double Xscale ()
 Scale X property values (in/out) by this factor. More...
 
XYcurveXscale (double value)
 
double Yscale ()
 Scale Y property values (in/out) by this factor. More...
 
XYcurveYscale (double value)
 
XYcurvelike (const string &value)
 Make like another object, e.g. More...
 
XYcurvelike (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
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

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ csvfile()

string dss::obj::XYcurve::csvfile ( )
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

◆ dblfile()

string dss::obj::XYcurve::dblfile ( )
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

◆ end_edit()

XYcurve & dss::obj::XYcurve::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]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 14

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 14

◆ npts()

int32_t dss::obj::XYcurve::npts ( )
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

◆ Points()

VectorXd dss::obj::XYcurve::Points ( )
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

◆ sngfile()

string dss::obj::XYcurve::sngfile ( )
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

◆ x()

double dss::obj::XYcurve::x ( )
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

◆ Xarray()

VectorXd dss::obj::XYcurve::Xarray ( )
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

◆ Xscale()

double dss::obj::XYcurve::Xscale ( )
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

◆ Xshift()

double dss::obj::XYcurve::Xshift ( )
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

◆ y()

double dss::obj::XYcurve::y ( )
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

◆ Yarray()

VectorXd dss::obj::XYcurve::Yarray ( )
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

◆ Yscale()

double dss::obj::XYcurve::Yscale ( )
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

◆ Yshift()

double dss::obj::XYcurve::Yshift ( )
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


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