Skip to content

Commit

Permalink
Add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
PMeira committed Jul 20, 2022
1 parent effef43 commit 5d78fa4
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 0 deletions.
107 changes: 107 additions & 0 deletions dss/dss_capi_gr/IGICSources.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
'''
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2022 Paulo Meira
Copyright (c) 2022 DSS Extensions contributors
'''
from .._cffi_api_util import Iterable

class IGICSources(Iterable):
__slots__ = []

_columns = [
'Name',
'idx',
'Phases',
'Bus1',
'Bus2',
'EN',
'EE',
'Lat1',
'Lat2',
'Lon1',
'Lon2',
'Volts',
]

@property
def Bus1(self):
'''First bus name of GICSource (Created name)'''
return self._get_string(self.CheckForError(self._lib.GICSources_Get_Bus1()))

@property
def Bus2(self):
'''Second bus name'''
return self._get_string(self.CheckForError(self._lib.GICSources_Get_Bus2()))

@property
def Phases(self):
'''Number of Phases, this GICSource element.'''
return self.CheckForError(self._lib.GICSources_Get_Phases())

@Phases.setter
def Phases(self, Value):
self.CheckForError(self._lib.GICSources_Set_Phases(Value))

@property
def EN(self):
'''Northward E Field V/km'''
return self.CheckForError(self._lib.GICSources_Get_EN())

@EN.setter
def EN(self, Value):
self.CheckForError(self._lib.GICSources_Set_EN(Value))

@property
def EE(self):
'''Eastward E Field, V/km'''
return self.CheckForError(self._lib.GICSources_Get_EE())

@EE.setter
def EE(self, Value):
self.CheckForError(self._lib.GICSources_Set_EE(Value))

@property
def Lat1(self):
'''Latitude of Bus1 (degrees)'''
return self.CheckForError(self._lib.GICSources_Get_Lat1())

@Lat1.setter
def Lat1(self, Value):
self.CheckForError(self._lib.GICSources_Set_Lat1(Value))

@property
def Lat2(self):
'''Latitude of Bus2 (degrees)'''
return self.CheckForError(self._lib.GICSources_Get_Lat2())

@Lat2.setter
def Lat2(self, Value):
self.CheckForError(self._lib.GICSources_Set_Lat2(Value))

@property
def Lon1(self):
'''Longitude of Bus1 (Degrees)'''
return self.CheckForError(self._lib.GICSources_Get_Lon1())

@Lon1.setter
def Lon1(self, Value):
self.CheckForError(self._lib.GICSources_Set_Lon1(Value))

@property
def Lon2(self):
'''Longitude of Bus2 (Degrees)'''
return self.CheckForError(self._lib.GICSources_Get_Lon2())

@Lon2.setter
def Lon2(self, Value):
self.CheckForError(self._lib.GICSources_Set_Lon2(Value))

@property
def Volts(self):
'''Specify dc voltage directly'''
return self.CheckForError(self._lib.GICSources_Get_Volts())

@Volts.setter
def Volts(self, Value):
self.CheckForError(self._lib.GICSources_Set_Volts(Value))
107 changes: 107 additions & 0 deletions dss/dss_capi_ir/IGICSources.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
'''
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2022 Paulo Meira
Copyright (c) 2022 DSS Extensions contributors
'''
from .._cffi_api_util import Iterable

class IGICSources(Iterable):
__slots__ = []

_columns = [
'Name',
'idx',
'Phases',
'Bus1',
'Bus2',
'EN',
'EE',
'Lat1',
'Lat2',
'Lon1',
'Lon2',
'Volts',
]

@property
def Bus1(self):
'''First bus name of GICSource (Created name)'''
return self._get_string(self.CheckForError(self._lib.GICSources_Get_Bus1()))

@property
def Bus2(self):
'''Second bus name'''
return self._get_string(self.CheckForError(self._lib.GICSources_Get_Bus2()))

@property
def Phases(self):
'''Number of Phases, this GICSource element.'''
return self.CheckForError(self._lib.GICSources_Get_Phases())

@Phases.setter
def Phases(self, Value):
self.CheckForError(self._lib.GICSources_Set_Phases(Value))

@property
def EN(self):
'''Northward E Field V/km'''
return self.CheckForError(self._lib.GICSources_Get_EN())

@EN.setter
def EN(self, Value):
self.CheckForError(self._lib.GICSources_Set_EN(Value))

@property
def EE(self):
'''Eastward E Field, V/km'''
return self.CheckForError(self._lib.GICSources_Get_EE())

@EE.setter
def EE(self, Value):
self.CheckForError(self._lib.GICSources_Set_EE(Value))

@property
def Lat1(self):
'''Latitude of Bus1 (degrees)'''
return self.CheckForError(self._lib.GICSources_Get_Lat1())

@Lat1.setter
def Lat1(self, Value):
self.CheckForError(self._lib.GICSources_Set_Lat1(Value))

@property
def Lat2(self):
'''Latitude of Bus2 (degrees)'''
return self.CheckForError(self._lib.GICSources_Get_Lat2())

@Lat2.setter
def Lat2(self, Value):
self.CheckForError(self._lib.GICSources_Set_Lat2(Value))

@property
def Lon1(self):
'''Longitude of Bus1 (Degrees)'''
return self.CheckForError(self._lib.GICSources_Get_Lon1())

@Lon1.setter
def Lon1(self, Value):
self.CheckForError(self._lib.GICSources_Set_Lon1(Value))

@property
def Lon2(self):
'''Longitude of Bus2 (Degrees)'''
return self.CheckForError(self._lib.GICSources_Get_Lon2())

@Lon2.setter
def Lon2(self, Value):
self.CheckForError(self._lib.GICSources_Set_Lon2(Value))

@property
def Volts(self):
'''Specify dc voltage directly'''
return self.CheckForError(self._lib.GICSources_Get_Volts())

@Volts.setter
def Volts(self, Value):
self.CheckForError(self._lib.GICSources_Set_Volts(Value))

0 comments on commit 5d78fa4

Please sign in to comment.