tdaq-develop-2025-02-12
ots::FESlowControlsChannel Class Reference

Public Member Functions

 FESlowControlsChannel (FEVInterface *interface, const std::string &channelName, const std::string &dataType, const std::string &universalAddress, const std::string &transformation, unsigned int universalDataBitOffset, bool readAccess, bool writeAccess, bool monitoringEnabled, bool recordChangesOnly, time_t delayBetweenSamples, bool saveEnabled, const std::string &savePath, const std::string &saveFileRadix, bool saveBinaryFormat, bool alarmsEnabled, bool latchAlarms, const std::string &lolo, const std::string &lo, const std::string &hi, const std::string &hihi)
 
void print (std::ostream &out=std::cout) const
 
const std::string & getUniversalAddress () const
 
unsigned int getReadSizeBytes () const
 
time_t getLastSampleTime () const
 
void doRead (std::string &readValue)
 
const std::string & getSample () const
 
void handleSample (const std::string &universalReadValue, std::string &txBuffer, FILE *fpAggregate=0, bool aggregateIsBinaryFormat=false, bool txBufferUsed=true)
 
const std::string & getLastSampleReadValue () const
 
void clearAlarms (int targetAlarm=-1)
 default to all More...
 
const std::string & getInterfaceUID (void) const
 
const std::string & getInterfaceType (void) const
 

Static Public Member Functions

static std::string underscoreString (const std::string &str)
 

Public Attributes

const std::string channelName
 
const std::string fullChannelName
 
const std::string dataType
 
const std::string transformation
 
const bool readAccess_
 
const bool writeAccess_
 
const bool monitoringEnabled
 
const bool recordChangesOnly_
 
const time_t delayBetweenSamples_
 
const bool saveEnabled_
 
const std::string savePath_
 
const std::string saveFileRadix_
 
const bool saveBinaryFormat_
 
const bool alarmsEnabled_
 
const bool latchAlarms_
 

Detailed Description

Definition at line 11 of file FESlowControlsChannel.h.

Constructor & Destructor Documentation

◆ FESlowControlsChannel()

FESlowControlsChannel::FESlowControlsChannel ( FEVInterface interface,
const std::string &  channelNameIn,
const std::string &  dataTypeIn,
const std::string &  universalAddress,
const std::string &  transformationIn,
unsigned int  universalDataBitOffset,
bool  readAccess,
bool  writeAccess,
bool  monitoringEnabledIn,
bool  recordChangesOnly,
time_t  delayBetweenSamples,
bool  saveEnabled,
const std::string &  savePath,
const std::string &  saveFileRadix,
bool  saveBinaryFormat,
bool  alarmsEnabled,
bool  latchAlarms,
const std::string &  lolo,
const std::string &  lo,
const std::string &  hi,
const std::string &  hihi 
)

Packet Types sent in txBuffer:

    create value packet:
      1B type (0: value, 1: loloalarm, 2: loalarm, 3: hioalarm, 4: hihialarm)
        1B sequence count from channel
        8B time
        4B sz of name
        name
        1B sz of value in bytes
        1B sz of value in bits
        value or alarm threshold value

Definition at line 32 of file FESlowControlsChannel.cc.

Member Function Documentation

◆ clearAlarms()

void FESlowControlsChannel::clearAlarms ( int  targetAlarm = -1)

default to all

clearAlarms clear target alarm if -1 clear all

Definition at line 906 of file FESlowControlsChannel.cc.

◆ handleSample()

void FESlowControlsChannel::handleSample ( const std::string &  universalReadValue,
std::string &  txBuffer,
FILE *  fpAggregate = 0,
bool  aggregateIsBinaryFormat = false,
bool  txBufferUsed = true 
)

handleSample adds to txBuffer if sample should be sent to monitor server

Definition at line 441 of file FESlowControlsChannel.cc.

◆ underscoreString()

std::string FESlowControlsChannel::underscoreString ( const std::string &  str)
static

underscoreString replace all non-alphanumeric with underscore

Definition at line 361 of file FESlowControlsChannel.cc.

Member Data Documentation

◆ channelName

const std::string ots::FESlowControlsChannel::channelName

Some members can be public because they are const and can avoid an extra Get method. Naming convention in general is for no trailing underscore in public member names (TODO):

Definition at line 66 of file FESlowControlsChannel.h.


The documentation for this class was generated from the following files: