KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sub_opt.h File Reference

Optics subsystem. More...

#include "util/macro.h"
#include "appcode.h"
#include "modules/octopus.h"

Go to the source code of this file.

Macros

#define E_OPT_CHCFG   ( E_SUBOPT + 1 )
 Invalid channel mapping error.
 
#define E_OPT_CHCFG_DESCR   "Invalid channel configuration"
 
#define OPT_CH_COUNT   31
 
#define OPT_CHCFG_CHAN_MASK   MASK(5)
 ch number
 
#define OPT_CFG_ENABLE   BIT(0)
 Enable the channel (incl. More...
 
#define OPT_STS_ERR_COMM   BIT(6)
 I2C communication error.
 
#define OPT_STS_ERR_OVERCUR   BIT(5)
 Over current.
 
#define OPT_STS_WARN_HRVETO   BIT(4)
 High rate veto active.
 
#define OPT_STS_WARN_ID   BIT(3)
 ID is inconsistent.
 
#define OPT_STS_ENABLED   BIT(7)
 Enabled.
 
#define OPT_SYS_ERR_ANY   ( OPT_STS_ERR_COMM | OPT_STS_ERR_OVERCUR )
 
#define OPT_HV_DEFAULT   -800
 
#define OPT_THRS_DEFAULT   1070
 
#define _OCT_SMALL_MASK   0x00000FFF
 
#define _OCT_LARGE_MASK   0x7FFFF000
 
#define _OCT_SMALL_CH   12
 
#define _OCT_LARGE_CH   19
 
#define _OCT_BRD(IDX)   ( ( IDX ) < ( _OCT_SMALL_CH ) ? ( OCTO_BRD_SMALL ) : ( OCTO_BRD_LARGE ) )
 
#define _OCT_CH(IDX)   ( ( IDX ) < ( _OCT_SMALL_CH ) ? ( IDX ) : ( IDX - _OCT_SMALL_CH ) )
 

Functions

bool optHvEnabled ()
 Returns whether or not the HV is enabled.
 
void optHvEnable (bool hvOn)
 Enables high voltage. More...
 
bool optUpdate ()
 Updates the status of the optics.
 

Detailed Description

Optics subsystem.

Controls everything related to optical detection.

Definition in file sub_opt.h.

Macro Definition Documentation

#define OPT_CFG_ENABLE   BIT(0)

Enable the channel (incl.

PMT, TDCs)

Definition at line 40 of file sub_opt.h.

Function Documentation

void optHvEnable ( bool  hvOn)

Enables high voltage.

Use with caution.

Parameters
hvOntrue - Turn it on, false - turn it off.