|
| 1 | +''' |
| 2 | +A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface. |
| 3 | +
|
| 4 | +Copyright (c) 2022 Paulo Meira |
| 5 | +Copyright (c) 2022 DSS Extensions contributors |
| 6 | +''' |
| 7 | +from .._cffi_api_util import Iterable |
| 8 | + |
| 9 | +class IGICSources(Iterable): |
| 10 | + __slots__ = [] |
| 11 | + |
| 12 | + _columns = [ |
| 13 | + 'Name', |
| 14 | + 'idx', |
| 15 | + 'Phases', |
| 16 | + 'Bus1', |
| 17 | + 'Bus2', |
| 18 | + 'EN', |
| 19 | + 'EE', |
| 20 | + 'Lat1', |
| 21 | + 'Lat2', |
| 22 | + 'Lon1', |
| 23 | + 'Lon2', |
| 24 | + 'Volts', |
| 25 | + ] |
| 26 | + |
| 27 | + @property |
| 28 | + def Bus1(self): |
| 29 | + '''First bus name of GICSource (Created name)''' |
| 30 | + return self._get_string(self.CheckForError(self._lib.GICSources_Get_Bus1())) |
| 31 | + |
| 32 | + @property |
| 33 | + def Bus2(self): |
| 34 | + '''Second bus name''' |
| 35 | + return self._get_string(self.CheckForError(self._lib.GICSources_Get_Bus2())) |
| 36 | + |
| 37 | + @property |
| 38 | + def Phases(self): |
| 39 | + '''Number of Phases, this GICSource element.''' |
| 40 | + return self.CheckForError(self._lib.GICSources_Get_Phases()) |
| 41 | + |
| 42 | + @Phases.setter |
| 43 | + def Phases(self, Value): |
| 44 | + self.CheckForError(self._lib.GICSources_Set_Phases(Value)) |
| 45 | + |
| 46 | + @property |
| 47 | + def EN(self): |
| 48 | + '''Northward E Field V/km''' |
| 49 | + return self.CheckForError(self._lib.GICSources_Get_EN()) |
| 50 | + |
| 51 | + @EN.setter |
| 52 | + def EN(self, Value): |
| 53 | + self.CheckForError(self._lib.GICSources_Set_EN(Value)) |
| 54 | + |
| 55 | + @property |
| 56 | + def EE(self): |
| 57 | + '''Eastward E Field, V/km''' |
| 58 | + return self.CheckForError(self._lib.GICSources_Get_EE()) |
| 59 | + |
| 60 | + @EE.setter |
| 61 | + def EE(self, Value): |
| 62 | + self.CheckForError(self._lib.GICSources_Set_EE(Value)) |
| 63 | + |
| 64 | + @property |
| 65 | + def Lat1(self): |
| 66 | + '''Latitude of Bus1 (degrees)''' |
| 67 | + return self.CheckForError(self._lib.GICSources_Get_Lat1()) |
| 68 | + |
| 69 | + @Lat1.setter |
| 70 | + def Lat1(self, Value): |
| 71 | + self.CheckForError(self._lib.GICSources_Set_Lat1(Value)) |
| 72 | + |
| 73 | + @property |
| 74 | + def Lat2(self): |
| 75 | + '''Latitude of Bus2 (degrees)''' |
| 76 | + return self.CheckForError(self._lib.GICSources_Get_Lat2()) |
| 77 | + |
| 78 | + @Lat2.setter |
| 79 | + def Lat2(self, Value): |
| 80 | + self.CheckForError(self._lib.GICSources_Set_Lat2(Value)) |
| 81 | + |
| 82 | + @property |
| 83 | + def Lon1(self): |
| 84 | + '''Longitude of Bus1 (Degrees)''' |
| 85 | + return self.CheckForError(self._lib.GICSources_Get_Lon1()) |
| 86 | + |
| 87 | + @Lon1.setter |
| 88 | + def Lon1(self, Value): |
| 89 | + self.CheckForError(self._lib.GICSources_Set_Lon1(Value)) |
| 90 | + |
| 91 | + @property |
| 92 | + def Lon2(self): |
| 93 | + '''Longitude of Bus2 (Degrees)''' |
| 94 | + return self.CheckForError(self._lib.GICSources_Get_Lon2()) |
| 95 | + |
| 96 | + @Lon2.setter |
| 97 | + def Lon2(self, Value): |
| 98 | + self.CheckForError(self._lib.GICSources_Set_Lon2(Value)) |
| 99 | + |
| 100 | + @property |
| 101 | + def Volts(self): |
| 102 | + '''Specify dc voltage directly''' |
| 103 | + return self.CheckForError(self._lib.GICSources_Get_Volts()) |
| 104 | + |
| 105 | + @Volts.setter |
| 106 | + def Volts(self, Value): |
| 107 | + self.CheckForError(self._lib.GICSources_Set_Volts(Value)) |
0 commit comments