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

Classes

struct  Properties
 

Public Types

enum class  SwtControlAction : int32_t { close = 2 , open = 1 }
 SwtControl: Action (DSS enumeration for SwtControl) More...
 
enum class  SwtControlState : int32_t { closed = 2 , open = 1 }
 SwtControl: State (DSS enumeration for SwtControl) More...
 

Public Member Functions

 SwtControl (APIUtil *util=nullptr, void *ptr_=nullptr)
 Create wrapper directly by a given object handle/pointer.
 
 SwtControl (APIUtil *util, int32_t idx)
 Create a wrapper for an element given by the integer index "idx".
 
 SwtControl (APIUtil *util, char *name)
 Create a wrapper for an element given its name.
 
const char * name ()
 Returns the object's name.
 
SwtControlbegin_edit ()
 Marks an object for edition. More...
 
SwtControlend_edit (int32_t num_edits=1)
 Finalizes an object edition. More...
 
string SwitchedObj ()
 Name of circuit element switch that the SwtControl operates. More...
 
SwtControlSwitchedObj (const string &value)
 
SwtControlSwitchedObj (dss::obj::DSSObj &value)
 
dss::obj::DSSObj SwitchedObj_obj ()
 Name of circuit element switch that the SwtControl operates. More...
 
SwtControlSwitchedObj_obj (dss::obj::DSSObj &value)
 
int32_t SwitchedTerm ()
 Terminal number of the controlled element switch. More...
 
SwtControlSwitchedTerm (int32_t value)
 
SwtControlAction Action ()
 {Open | Close} After specified delay time, and if not locked, causes the controlled switch to open or close. More...
 
SwtControlAction (int32_t value)
 
SwtControlAction (SwtControlAction value)
 
SwtControlAction (const string &value)
 
SwtControlAction (const char *value)
 
string Action_str ()
 {Open | Close} After specified delay time, and if not locked, causes the controlled switch to open or close. More...
 
SwtControlAction_str (const string &value)
 {Open | Close} After specified delay time, and if not locked, causes the controlled switch to open or close. More...
 
bool Lock ()
 {Yes | No} Delayed action. More...
 
SwtControlLock (bool value)
 
double Delay ()
 Operating time delay (sec) of the switch. More...
 
SwtControlDelay (double value)
 
SwtControlState Normal ()
 {Open | Closed] Normal state of the switch. More...
 
SwtControlNormal (int32_t value)
 
SwtControlNormal (SwtControlState value)
 
SwtControlNormal (const string &value)
 
SwtControlNormal (const char *value)
 
string Normal_str ()
 {Open | Closed] Normal state of the switch. More...
 
SwtControlNormal_str (const string &value)
 {Open | Closed] Normal state of the switch. More...
 
SwtControlState State ()
 {Open | Closed] Present state of the switch. More...
 
SwtControlState (int32_t value)
 
SwtControlState (SwtControlState value)
 
SwtControlState (const string &value)
 
SwtControlState (const char *value)
 
string State_str ()
 {Open | Closed] Present state of the switch. More...
 
SwtControlState_str (const string &value)
 {Open | Closed] Present state of the switch. More...
 
SwtControlReset (bool value)
 {Yes | No} If Yes, forces Reset of switch to Normal state and removes Lock independently of any internal reset command for mode change, etc. More...
 
double basefreq ()
 Base Frequency for ratings. More...
 
SwtControlbasefreq (double value)
 
bool enabled ()
 {Yes|No or True|False} Indicates whether this element is enabled. More...
 
SwtControlenabled (bool value)
 
SwtControllike (const string &value)
 Make like another object, e.g. More...
 
SwtControllike (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 [] = "SwtControl"
 
static const int32_t dss_cls_idx = 33
 

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 Enumeration Documentation

◆ SwtControlAction

enum class dss::obj::SwtControl::SwtControlAction : int32_t
strong

SwtControl: Action (DSS enumeration for SwtControl)

Enumerator
close 

close

open 

open

◆ SwtControlState

enum class dss::obj::SwtControl::SwtControlState : int32_t
strong

SwtControl: State (DSS enumeration for SwtControl)

Enumerator
closed 

closed

open 

open

Member Function Documentation

◆ Action()

SwtControlAction dss::obj::SwtControl::Action ( )
inline

{Open | Close} After specified delay time, and if not locked, causes the controlled switch to open or close.

DSS property name: Action, DSS property index: 3

◆ Action_str() [1/2]

string dss::obj::SwtControl::Action_str ( )
inline

{Open | Close} After specified delay time, and if not locked, causes the controlled switch to open or close.

DSS property name: Action, DSS property index: 3

◆ Action_str() [2/2]

SwtControl & dss::obj::SwtControl::Action_str ( const string &  value)
inline

{Open | Close} After specified delay time, and if not locked, causes the controlled switch to open or close.

DSS property name: Action, DSS property index: 3

◆ basefreq()

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

Base Frequency for ratings.

DSS property name: basefreq, DSS property index: 9

◆ begin_edit()

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

Marks an object for edition.

Until end_edit is called, some actions are postponed.

◆ Delay()

double dss::obj::SwtControl::Delay ( )
inline

Operating time delay (sec) of the switch.

Defaults to 120.

DSS property name: Delay, DSS property index: 5

◆ enabled()

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

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

DSS property name: enabled, DSS property index: 10

◆ end_edit()

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

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 11

◆ like() [2/2]

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

Make like another object, e.g.

:

New Capacitor.C2 like=c1 ...

DSS property name: like, DSS property index: 11

◆ Lock()

bool dss::obj::SwtControl::Lock ( )
inline

{Yes | No} Delayed action.

Sends CTRL_LOCK or CTRL_UNLOCK message to control queue. After delay time, controlled switch is locked in its present open / close state or unlocked. Switch will not respond to either manual (Action) or automatic (COM interface) control or internal OpenDSS Reset when locked.

DSS property name: Lock, DSS property index: 4

◆ Normal()

SwtControlState dss::obj::SwtControl::Normal ( )
inline

{Open | Closed] Normal state of the switch.

If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared.

DSS property name: Normal, DSS property index: 6

◆ Normal_str() [1/2]

string dss::obj::SwtControl::Normal_str ( )
inline

{Open | Closed] Normal state of the switch.

If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared.

DSS property name: Normal, DSS property index: 6

◆ Normal_str() [2/2]

SwtControl & dss::obj::SwtControl::Normal_str ( const string &  value)
inline

{Open | Closed] Normal state of the switch.

If not Locked, the switch reverts to this state for reset, change of mode, etc. Defaults to first Action or State specified if not specifically declared.

DSS property name: Normal, DSS property index: 6

◆ Reset()

SwtControl & dss::obj::SwtControl::Reset ( bool  value)
inline

{Yes | No} If Yes, forces Reset of switch to Normal state and removes Lock independently of any internal reset command for mode change, etc.

DSS property name: Reset, DSS property index: 8

◆ State()

SwtControlState dss::obj::SwtControl::State ( )
inline

{Open | Closed] Present state of the switch.

Upon setting, immediately forces state of switch.

DSS property name: State, DSS property index: 7

◆ State_str() [1/2]

string dss::obj::SwtControl::State_str ( )
inline

{Open | Closed] Present state of the switch.

Upon setting, immediately forces state of switch.

DSS property name: State, DSS property index: 7

◆ State_str() [2/2]

SwtControl & dss::obj::SwtControl::State_str ( const string &  value)
inline

{Open | Closed] Present state of the switch.

Upon setting, immediately forces state of switch.

DSS property name: State, DSS property index: 7

◆ SwitchedObj()

string dss::obj::SwtControl::SwitchedObj ( )
inline

Name of circuit element switch that the SwtControl operates.

Specify the full object class and name.

DSS property name: SwitchedObj, DSS property index: 1

◆ SwitchedObj_obj()

dss::obj::DSSObj dss::obj::SwtControl::SwitchedObj_obj ( )
inline

Name of circuit element switch that the SwtControl operates.

Specify the full object class and name.

DSS property name: SwitchedObj, DSS property index: 1

◆ SwitchedTerm()

int32_t dss::obj::SwtControl::SwitchedTerm ( )
inline

Terminal number of the controlled element switch.

1 or 2, typically. Default is 1.

DSS property name: SwitchedTerm, DSS property index: 2


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