30 void _subsBseExecEvent (
ClbEvent event)
50 static void configureEdfa() {
76 static bool _monitorBps()
119 bse.
bps_alarm_max = (sens_max.mon_ALRMNEG2 & 0x01)<<3 | (sens_max.mon_ALRMNEG1 & 0x01)<<2 | (sens_max.mon_ALRMPOS2 & 0x01)<<1 | sens_max.mon_ALRMPOS1 & 0x01;
128 for(i_loop=0;i_loop<21;i_loop++)
182 static bool _monitorBps()
212 static bool _monitorEdfa()
216 char *returnedString;
218 if (!edfaReadSerial(&returnedString))
goto failed;
227 if (!edfaReadStatus(&emi,&start))
goto failed;
241 static bool _monitorAcdc()
246 if (!acdcGetNFrames(&frame, 1)) {
263 #define CAROUSEL_MAX 3
264 static int _carousel = 0;
268 bool _subsBseUpdate(
ClbState state, uint32_t time)
275 case 0: s = _monitorEdfa();
break;
276 case 1: s = _monitorBps();
break;
277 case 2: s = _monitorAcdc();
break;
292 if (_carousel == CAROUSEL_MAX) _carousel = 0;
uint16_t bps_i12
Current of 12V line (0 to 1023 ADC raw)
bool bpsReadSensorMaxV3(BpsRdSensAnswV3 *stat)
return all sensors' max values
uint16_t acdc_cur
ACDC Current, between 0 and 2560A.
bool bpsAlarmFiredGetV3(uint8_t ch, BpsAlarmV3 *AlarmFiredGet)
Return flag of one alarm.
uint8_t inst_fail
Bitmask containing error devices.
uint16_t bps_hydro_i_m
MON_HYDRO_I_VALUE from 0 to 1023 ADC raw.
uint16_t bps_mon_theatsink_max
MON_THEATSINK_MAX_VALUE.
uint16_t bps_tboard_m
MON_TBOARD_VALUE.
uint16_t bps_du_irtn_max
MON_DU_IRTN_MAX_VALUE.
int8_t acdc_temp
ACDC Temperature in degrees Centigrade.
ClbEvent
All state change events.
uint16_t bps_du_irtn_m
MON_DU_IRTN_VALUE.
uint16_t bps_lbl_i_max
MON_LBL_I_MAX_VALUE line 0 to 1023 ADC raw.
bool bseConfigure()
Base Configure event.
Provides access to all variables of the various subsystems.
uint8_t edfa_sn[32]
Serial number (Ascii string)
#define BSE_INST_FAIL_EDFA
EDFA.
uint16_t bps_alarm_max
Alarm Status: ALRMNEG2 ALRMNEG1 ALRMPOS2 ALRMPOS1.
static void edfaInit()
Initializes the EDFA.
f32_t edfa_setp_wr
Settings for Power Setpoint (in dBm)
#define BSE_INST_FAIL_BPS
BPS.
uint16_t bps_v_max
MON_BPS_V_MAX_VALUE 375V line from 0 to 1023 ADC raw.
bool bseReset()
Base Reset event.
uint8_t clbSys2Idx[6]
Mapping from subsystem ID to index.
uint16_t bps_lbl_i_m
MON_LBL_I_VALUE line 0 to 1023 ADC raw.
uint16_t bps_du_i_max
MON_DU_I_MAX_VALUE from 0 to 1023 ADC raw.
int32_t edfa_iop
Input Optical Power (in milli dBm)
int32_t edfa_temp
Temperature (in milli degrees celsius)
#define BSE_INST_FAIL_ACDC
ACDC.
uint16_t acdc_volt
ACDC Voltage, between 300 and 556.
uint16_t bps_v375
Voltage of 375V line (0 to 1023 ADC raw)
Undefined => Idle, for internal use only.
void errPrint(bool clear)
Prints the last error.
bool bpsReadSensorAverageV3(BpsRdSensAverageAnswV3 *stat)
return all sensors' mean values
uint16_t bps_5v_i_max
MON_5V_I_MAX_VALUE 0 to 1023 ADC raw.
uint16_t bps_iback
Backbone current (0 to 1023 ADC raw)
bool bpsReadSensor(BpsRdSensAnsw *stat)
return sensor values
void acdcInit(bool active)
Initializes the ACDC.
uint32_t bps_alarm_fired
Alarm Fired.
uint16_t bps_tboard_max
MON_TBOARD_MAX_VALUE.
#define LOG_DEF(NAME,...)
Define a logger for a module.
The CLB stare module tracks is responsible for state management of the various sub-systems on the CLB...
int32_t edfa_oop
Output Optical Power (in milli dBm)
static void bpsInit()
Initializes the BPS.
int32_t edfa_pumpdc
Diode Pump Current (in micro A)
uint16_t bps_mon_theatsink_m
MON_THEATSINK_VALUE.
uint16_t bps_v5
Voltage of 5V line (0 to 1023 ADC raw)
EDFA-EAU (30-C3-20-C) Uart driver.
Implements a generic logger facility.
bse_t bse
Provides access to all process variables of subsystem Base.
uint16_t bps_du_i_m
MON_DU_I_VALUE from 0 to 1023 ADC raw.
uint16_t bps_i375
Current of 375V line (0 to 1023 ADC raw)
uint16_t bps_hydro_i_max
MON_HYDRO_I_MAX_VALUE from 0 to 1023 ADC raw.
int32_t edfa_setp_rd
Monitored Power Setpoint for APC mode (in milli dBm)
void _clbStateUpdate(int idx, ClbEvent event, uint8_t status)
Invoked by the subsystem to indicate a state change has happened.
uint16_t bps_5v_i_m
MON_5V_I_VALUE 0 to 1023 ADC raw.
uint16_t bps_v_m
MON_BPS_V_VALUE 375V line from 0 to 1023 ADC raw.
uint16_t bps_alarm
Alarm Status.
uint16_t bps_breaker
Breaker status.