-
Notifications
You must be signed in to change notification settings - Fork 1
/
strings.go
288 lines (276 loc) · 12.1 KB
/
strings.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
// Copyright 2016 Shannon Wynter. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
package aurora
var transmissionStates = map[TransmissionState]string{
TSOk: "Ok",
TSCommandNotImplemented: "Command is not implemented",
TSVariableDoesNotExist: "Variable does not exist",
TSValueOutOfRange: "Variable value is out of range",
TSEEpromNotAccessible: "EEProm not accessible",
TSMicroError: "Cannot send the command to internal micro",
TSNotExecuted: "Command not executed",
TSVariableNotAvailable: "The variable is not available, retry",
}
var dsParameterStrings = map[DSParameter]string{
DSPGridVoltage: "Grid Voltage (Global)",
DSPGridCurrent: "Grid Current (Global)",
DSPGridPower: "Grid Power (Global)",
DSPFrequency: "Frequency",
DSPVbulk: "VBulk",
DSPIleakDCDC: "Ileak (Dc/Dc)",
DSPIleakInverter: "Ileak (Inverter)",
DSPPin1: "Pin 1 (Global)",
DSPPin2: "Pin 2",
DSPInverterTemperature: "Inverter Temperature",
DSPBoosterTemperature: "Booster Temperature",
DSPInput1Voltage: "Input 1 Voltage",
DSPInput1Current: "Input 1 Current",
DSPInput2Voltage: "Input 2 Voltage",
DSPInput2Current: "Input 2 Current",
DSPGridVoltageDCDC: "Grid Voltage (Dc/Dc)",
DSPGridFrequencyDCDC: "Grid Frequency (Dc/Dc)",
DSPIsolationResistance: "Isolation Resistance (Riso)",
DSPVbulkDCDC: "Vbulk (Dc/Dc)",
DSPAverageGridVoltage: "Average Grid Voltage (VgridAvg)",
DSPVbulkMid: "Vbulk Mid",
DSPPowerPeak: "Power Peak",
DSPPowerPeakToday: "Power Peak Today",
DSPGridVoltageNeutral: "Grid Voltage neutral",
DSPWindGeneratorFrequency: "Wind Generator Frequency",
DSPGridVoltageNeutralPhase: "Grid Voltage neutral-phase",
DSPGridCurrentPhaseR: "Grid Current phase r",
DSPGridCurrentPhaseS: "Grid Current phase s",
DSPGridCurrentPhaseT: "Grid Current phase t",
DSPFrequencyPhaseR: "Frequency phase r",
DSPFrequencyPhaseS: "Frequency phase s",
DSPFrequencyPhaseT: "Frequency phase t",
DSPVbulkPositive: "Vbulk +",
DSPVbulkNegative: "Vbulk -",
DSPSupervisorTemperature: "Supervisor Temperature",
DSPAlimTemperature: "Alim Temperature",
DSPHeatSinkTemperature: "Heat Sink Temperature",
DSPTemperature1: "Temperature 1",
DSPTemperature2: "Temperature 2",
DSPTemperature3: "Temperature 3",
DSPFan1Speed: "Fan 1 Speed",
DSPFan2Speed: "Fan 2 Speed",
DSPFan3Speed: "Fan 3 Speed",
DSPFan4Speed: "Fan 4 Speed",
DSPFan5Speed: "Fan 5 Speed",
DSPPowerSaturationLimit: "Power Saturation Limit (Der.)",
DSPRiferimentoAnelloBulk: "Refeimento Anello Bulk",
DSPVpanelMicro: "Vpanel micro",
DSPGridVoltagePhaseR: "Grid Voltage phase r",
DSPGridVoltagePhaseS: "Grid Voltage phase s",
DSPGridVoltagePhaseT: "Grid Voltage phase t",
}
var productNames = map[Product]string{
Product2kWIndoor: "Aurora 2 kW indoor",
Product2kWOutdoor: "Aurora 2 kW outdoor",
Product3_6kWIndoor: "Aurora 3.6 kW indoor",
Product3_6kWOutdoor: "Aurora 3.0-3.6 kW outdoor",
Product5kWOutdoor: "Aurora 5.0 kW outdoor",
Product6kWOutdoor: "Aurora 6 kW outdoor",
Product3PhaseInterface: "3-phase interface (3G74)",
Product50kWModule: "Aurora 50 kW module",
Product4_2kWNew: "Aurora 4.2 kW new",
Product3_6kWNew: "Aurora 3.6 kW new",
Product3_3kWNew: "Aurora 3.3 kW new",
Product3_0kWNew: "Aurora 3.0 kW new",
Product12kW: "Aurora 12.0 kW",
Product10kW: "Aurora 10 kW",
}
var productSpecs = map[ProductSpec]string{
ProductSpecUL1741: "UL1741",
ProductSpecVDE0126: "VDE0126",
ProductSpecDR1663_2000: "DR 1663/2000",
ProductSpecENELDK5950: "ENL DK 5950",
ProductSpecUKG83: "UK G83",
ProductSpecAS4777: "AS 4777",
ProductSpecVDEFrench: "VDE French Model",
}
var globalStates = map[GlobalState]string{
GSSendingParameters: "Sending Parameters",
GSWaitingSunGrid: "Wait Sun/Grid",
GSCheckingGrid: "Checking Grid",
GSMeasuringRiso: "Measuring Riso",
GSDCDCStart: "DcDc Start",
GSInverterTurnOn: "Inverter Turn-On",
GSRun: "Run",
GSRecovery: "Recovery",
GSPause: "Pause",
GSGroundFault: "Ground Fault",
GSOTHFault: "OTH Fault",
GSAddressSetting: "Address Setting",
GSSelfTest: "Self Test",
GSSelfTestFail: "Self Test Fail",
GSSensorTestMeasureRiso: "Sensor Test + Measure Riso",
GSLeakFault: "Leak Fault",
GSWaitingManualReset: "Waiting for manual reset",
GSInternalErrorE026: "Internal Error E026",
GSInternalErrorE027: "Internal Error E027",
GSInternalErrorE028: "Internal Error E028",
GSInternalErrorE029: "Internal Error E029",
GSInternalErrorE030: "Internal Error E030",
GSSendingWindTable: "Sending Wind Table",
GSFailedSendingTable: "Failed Sending Table",
GSUTHFault: "UTH Fault",
GSRemoteOff: "Remote Off",
GSInterlockFail: "Interlock Fail",
GSExecutingAutotest: "Executing Autotest",
GSWaitingSun: "Waiting Sun",
GSTemperatureFault: "Temperature Fault",
GSFanStaucked: "Fan Staucked",
GSIntComFail: "Int. Com. Fail",
GSSlaveInsertion: "Slave Insertion",
GSDCSwitchOpen: "DC Switch Open",
GSTrasSwitchOpen: "TRAS Switch Open",
GSMasterExclusion: "MASTER switch Open",
GSAutoExclusion: "Auto Exclusion",
GSErasingInternalEEprom: "Erasing Internal EEprom",
GSErasingExternalEEprom: "Erasing External EEprom",
GSCountingEEprom: "Counting EEprom",
GSFreeze: "Freeze",
}
var inverterStates = map[InverterState]string{
ISStandBy: "Stand By",
ISCheckingGrid: "Checking Grid",
ISRun: "Run",
ISBulkOverVoltage: "Bulk Over Voltage",
ISOutOverCurrent: "Out Over Current",
ISIGBTSat: "IGPT Sat",
ISBulkUnderVoltage: "Bulk Under Voltage",
ISDegaussError: "Degauss Error",
ISNoParameters: "No Parameters",
ISBulkLow: "Bulk Low",
ISGridOverVoltage: "Grid Over Voltage",
ISCommunicationError: "Communication Error",
ISDegaussing: "Degaussing",
ISStarting: "Starting",
ISBulkCapFail: "Bulk Cap Fail",
ISLeakFail: "Leak Fail",
ISDCDCFail: "DcDc Fail",
ISIleakSensorFail: "Ileak Sensor Fail",
ISSelfTestRelayInverter: "SelfTest: relay inverter",
ISSelfTestWaitSensorTest: "SelfTest: wait for sensor test",
ISSelfTestTestRelayDCDCSensor: "SelfTest: test relay DcDc + sensor",
ISSelfTestRelayInverterFail: "SelfTest: relay inverter fail",
ISSelfTestTimeoutFail: "SelfTest: timeout fail",
ISSelfTestRelayDCDCFail: "SelfTest: relay DcDc fail",
ISSelfTest1: "Self Test 1",
ISWaitingSelfTestStart: "Waiting self test start",
ISDCInjection: "DC Injection",
ISSelfTest2: "Self Test 2",
ISSelfTest3: "Self Test 3",
ISSelfTest4: "Self Test 4",
ISInternalError30: "Internal Error (30)",
ISInternalError31: "Internal Error (31)",
ISForbiddenState: "Forbidden State",
ISInputUC: "Input UC",
ISZeroPower: "Zero Power",
ISGridNotPresent: "Grid Not Present",
ISWaitingStart: "Waiting Start",
ISMPPT: "MPPT",
ISGRIDFAIL: "Grid Fail",
ISINPUTOC: "Input OC",
}
var dcdcStates = map[DCDCState]string{
DCDCOff: "DcDc OFF",
DCDCRampStart: "Ramp Start",
DCDCMPPT: "MPPT",
DCDCInputOverCurrent: "Input Over Current",
DCDCInputUnderVoltage: "Input Under Voltage",
DCDCInputOverVoltage: "Input Over Voltage",
DCDCInputLow: "Input Low",
DCDCNoParameters: "No Parameters",
DCDCBulkOverVoltage: "Bulk Over Voltage",
DCDCCommunicationError: "Communications Error",
DCDCRampFail: "Ramp Fail",
DCDCInternalError: "Internal Error",
DCDCInputModeError: "Input mode Error",
DCDCGroundFault: "Ground Fault",
DCDCInverterFail: "Inverter Fail",
DCDCIGBTSat: "DcDc IGBT Sat",
DCDCILEAKFail: "DcDc ILEAK Fail",
DCDCGridFail: "DcDc Grid Fail",
DCDCCommError: "DcDc Comm. Error",
}
var alarmStates = map[AlarmState]string{
AlarmNone: "No Alarm",
AlarmSunLow1: "Sun Low W001 (1)",
AlarmInputOverCurrent: "Input Over Current E001",
AlarmInputUnderVoltage: "Input Under Voltage W002",
AlarmInputOverVoltage: "Input Over Voltage E002",
AlarmSunLow5: "Sun Low W001 (5)",
AlarmNoParameters: "No Parameters E003",
AlarmBulkOverVoltage: "Bulk Over Voltage E004",
AlarmCommError: "Comm. Error E005",
AlarmOutputOverCurrent: "Output Over Current E006",
AlarmIGBTSat: "IGBT Sat E007",
AlarmBulkUV11: "Bulk UV W011 (11)",
AlarmE009: "Internal error E009",
AlarmGridFail: "Grid Fail W003",
AlarmBulkLow: "Bulk Low E010",
AlarmRampFail: "Ramp Fail E010",
AlarmDCDCFail16: "Dc/Dc Fail E012 (16)",
AlarmWrongMode: "Wrong Mode E013",
AlarmGroundFault18: "Ground Fault (18)",
AlarmOverTemp: "Over Temp. E014",
AlarmBulkCapFail: "Bulk Cap Fail E015",
AlarmInverterFail: "Inverter Fail E016",
AlarmStartTimeout: "Start Timeout E017",
AlarmGroundFault23: "Ground Fault E018 (23)",
AlarmDegaussError: "Degauss Error (24)",
AlarmIleakSensFail: "Ileak Sens. fail E019",
AlarmDCDCFail25: "Dc/Dc Fail E012 (25)",
AlarmSelfTestError1: "Self Test Error 1 E020",
AlarmSelfTestError2: "Self Test Error 2 E021",
AlarmSelfTestError3: "Self Test Error 3 E019",
AlarmSelfTestError4: "Self Test Error 4 E022",
AlarmDCInjError: "DC inj error E023",
AlarmGridOverVoltage: "Grid Over Voltage W004",
AlarmGridUnderVoltage: "Grid Under Voltage W005",
AlarmGridOF: "Grid OF W006",
AlarmGridUF: "Grid UF W007",
AlarmZGridHi: "Z grid Hi W008",
AlarmE024: "Internal Error E024",
AlarmRisoLow: "Risa Low E025",
ALarmVrefError: "Vref Error E026",
AlarmErrorMeasV: "Error Meas V E027",
AlarmErrorMeasF: "Error Meas F E028",
AlarmErrorMeasI: "Error Meas I E029",
AlarmErrorMeasIleak: "Error Meas Ileak E030",
AlarmReadErrorV: "Read Error V E301",
AlarmReadErrorI: "Read Error I E032",
AlarmTableFail: "Table Fail W009",
AlarmFanFail: "Fan Fail W010",
AlarmUTH: "UTH E033",
AlarmInterlockFail: "Interlock Fail",
AlarmRemoteOff: "Remote Off",
AlarmVoutAvgError: "Vout Avg error",
AlarmBatteryLow: "Battery Low",
AlarmClkFail: "Clk Fail",
AlarmInputUC: "Input UC",
AlarmZeroPower: "Zero Power",
AlarmFanStucked: "Fan Stucked",
AlarmDCSwitchOpen: "DC Switch Open",
AlarmBulkUV58: "Bulk UV (58)",
AlarmAutoexclusion: "Autoexclusion",
AlarmGridDFDT: "Grid df/dt",
AlarmDenSwitchOpen: "Den switch Open",
AlarmJboxFail: "Jbox fail",
}
var configStates = map[ConfigurationState]string{
ConfigBoth: "System operating with both strings.",
ConfigString1: "String 1 connected, String 2 disconnected.",
ConfigString2: "String 2 connected, String 1 disconnected.",
}
var inverterTypes = map[InverterType]string{
InverterTransformer: "Transformer",
InverterTransformerless: "Transformerless",
}
var inputTypes = map[InputType]string{
InputWind: "Wind",
InputPhotovoltaic: "Photovoltaic",
}