26 void _subsBseExecEvent (
ClbEvent event)
46 static void configureEdfa() {
72 static bool _monitorBps()
100 static bool _monitorEdfa()
104 char *returnedString;
106 if (!edfaReadSerial(&returnedString))
goto failed;
115 if (!edfaReadStatus(&emi,&start))
goto failed;
129 static bool _monitorAcdc()
134 if (!acdcGetNFrames(&frame, 1)) {
151 #define CAROUSEL_MAX 3
152 static int _carousel = 0;
156 bool _subsBseUpdate(
ClbState state, uint32_t time)
163 case 0: s = _monitorEdfa();
break;
164 case 1: s = _monitorBps();
break;
165 case 2: s = _monitorAcdc();
break;
180 if (_carousel == CAROUSEL_MAX) _carousel = 0;
uint16_t bps_i12
Current of 12V line (0 to 1023 ADC raw)
uint16_t acdc_cur
ACDC Current, between 0 and 2560A.
uint8_t inst_fail
Bitmask containing error devices.
int8_t acdc_temp
ACDC Temperature in degrees Centigrade.
ClbEvent
All state change events.
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.
static void edfaInit()
Initializes the EDFA.
f32_t edfa_setp_wr
Settings for Power Setpoint (in dBm)
#define BSE_INST_FAIL_BPS
BPS.
bool bseReset()
Base Reset event.
uint8_t clbSys2Idx[6]
Mapping from subsystem ID to index.
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.
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.
#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_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_i375
Current of 375V line (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_alarm
Alarm Status.
uint16_t bps_breaker
Breaker status.