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

Classes

struct  Properties
 

Public Member Functions

 Spectrum (APIUtil *util=nullptr, void *ptr_=nullptr)
 Create wrapper directly by a given object handle/pointer.
 
 Spectrum (APIUtil *util, int32_t idx)
 Create a wrapper for an element given by the integer index "idx".
 
 Spectrum (APIUtil *util, char *name)
 Create a wrapper for an element given its name.
 
const char * name ()
 Returns the object's name.
 
Spectrumbegin_edit ()
 Marks an object for edition. More...
 
Spectrumend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
int32_t NumHarm ()
 Number of frequencies in this spectrum. More...
 
SpectrumNumHarm (int32_t value)
 
VectorXd harmonic ()
 Array of harmonic values. More...
 
Spectrumharmonic (VectorXd &value)
 
VectorXd pctmag ()
 Array of magnitude values, assumed to be in PERCENT. More...
 
Spectrumpctmag (VectorXd &value)
 
VectorXd angle ()
 Array of phase angle values, degrees.You can also use the syntax angle = (file=filename) !for text file one value per line angle = (dblfile=filename) !for packed file of doubles angle = (sngfile=filename) !for packed file of singles. More...
 
Spectrumangle (VectorXd &value)
 
string CSVFile ()
 File of spectrum points with (harmonic, magnitude-percent, angle-degrees) values, one set of 3 per line, in CSV format. More...
 
SpectrumCSVFile (const string &value)
 
SpectrumCSVFile (const char *value)
 
Spectrumlike (const string &value)
 Make like another object, e.g. More...
 
Spectrumlike (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 [] = "Spectrum"
 
static const int32_t dss_cls_idx = 8
 

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

◆ angle()

VectorXd dss::obj::Spectrum::angle ( )
inline

Array of phase angle values, degrees.You can also use the syntax angle = (file=filename) !for text file one value per line angle = (dblfile=filename) !for packed file of doubles angle = (sngfile=filename) !for packed file of singles.

DSS property name: angle, DSS property index: 4

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ CSVFile()

string dss::obj::Spectrum::CSVFile ( )
inline

File of spectrum points with (harmonic, magnitude-percent, angle-degrees) values, one set of 3 per line, in CSV format.

If fewer than NUMHARM frequencies found in the file, NUMHARM is set to the smaller value.

DSS property name: CSVFile, DSS property index: 5

◆ end_edit()

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

◆ harmonic()

VectorXd dss::obj::Spectrum::harmonic ( )
inline

Array of harmonic values.

You can also use the syntax harmonic = (file=filename) !for text file one value per line harmonic = (dblfile=filename) !for packed file of doubles harmonic = (sngfile=filename) !for packed file of singles

DSS property name: harmonic, DSS property index: 2

◆ like() [1/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 6

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 6

◆ NumHarm()

int32_t dss::obj::Spectrum::NumHarm ( )
inline

Number of frequencies in this spectrum.

(See CSVFile)

DSS property name: NumHarm, DSS property index: 1

◆ pctmag()

VectorXd dss::obj::Spectrum::pctmag ( )
inline

Array of magnitude values, assumed to be in PERCENT.

You can also use the syntax mag = (file=filename) !for text file one value per line mag = (dblfile=filename) !for packed file of doubles mag = (sngfile=filename) !for packed file of singles

DSS property name: mag, DSS property index: 3


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