FACT++  1.0
ConnectionBias Class Reference
+ Inheritance diagram for ConnectionBias:
+ Collaboration diagram for ConnectionBias:

Public Member Functions

virtual void UpdateVA ()
 
 ConnectionBias (ba::io_service &ioservice, MessageImp &imp)
 
bool CheckDac (uint16_t dac)
 
bool CheckChannel (uint16_t ch)
 
bool CheckChannelVoltage (uint16_t ch, float volt)
 
bool RampSingleChannelDac (uint16_t ch, uint16_t dac)
 
bool RampAllChannelsDac (const vector< uint16_t > &dac)
 
bool RampAllDacs (uint16_t dac)
 
uint16_t ConvertVoltToDac (uint16_t ch, double volt)
 
double ConvertDacToVolt (uint16_t ch, uint16_t dac)
 
bool RampSingleChannelVoltage (uint16_t ch, float volt)
 
bool RampAllChannelsVoltage (const vector< float > &volt)
 
bool RampAllVoltages (float volt)
 
void OverCurrentReset ()
 
void ReadAllChannels (bool special=false)
 
bool SetReferences (const vector< float > &volt, const vector< float > &offset, const vector< float > &slope)
 
void RampStop ()
 
void RampStart ()
 
void SetRampTime (uint16_t val)
 
void SetRampStep (uint16_t val)
 
uint16_t GetRampStepVolt () const
 
bool IsRamping () const
 
void ExpertReset (bool expert_mode=true)
 
bool ExpertChannelSetDac (uint16_t ch, uint16_t dac)
 
bool ExpertChannelSetVolt (uint16_t ch, double volt)
 
bool ExpertGlobalSetDac (uint16_t dac)
 
bool ExpertGlobalSetVolt (float volt)
 
void SetVerbose (bool b)
 
void SetDummyMode (bool b)
 
void PrintInfo ()
 
void PrintLineA (int b, int ch)
 
void PrintA ()
 
void PrintLineV (int b, int ch)
 
void PrintV ()
 
void PrintLineGapd (int b, int ch)
 
void PrintReferenceVoltage ()
 
void SetUpdateInterval (uint32_t val)
 
void SetSyncDelay (uint16_t val)
 
void SetVoltMaxAbs (float max)
 
void SetVoltMaxRel (float max)
 
uint16_t GetVoltMaxAbs () const
 
uint16_t GetVoltMaxRel () const
 
State::states_t GetStatus ()
 
void SetReconnectDelay (uint32_t delay=1)
 
void SetEmergencyLimit (int32_t limit=0)
 
void ResetEmergencyShutdown ()
 
bool IsEmergencyShutdown () const
 
- Public Member Functions inherited from ConnectionUSB
void SetLogStream (MessageImp *log)
 
std::ostream & Out ()
 
void AsyncRead (const boost::asio::mutable_buffers_1 buffers, int type=0, int counter=0)
 
void AsyncWrite (const boost::asio::const_buffers_1 &buffers)
 
void AsyncWait (boost::asio::deadline_timer &timer, int millisec, void(ConnectionUSB::*handler)(const boost::system::error_code &))
 
 ConnectionUSB (boost::asio::io_service &io_service, std::ostream &out)
 
void SetEndpoint (const std::string &addr)
 
void Connect ()
 
void PostClose (int64_t delay=0)
 
void PostMessage (const void *msg, size_t s=0)
 
void PostMessage (const std::string &cmd, size_t s=-1)
 
template<typename T , size_t N>
void PostMessage (const std::array< T, N > &msg)
 
template<typename T >
void PostMessage (const std::vector< T > &msg)
 
virtual void HandleReceivedData (const boost::system::error_code &, size_t, int=0, int=0)
 
virtual void HandleTransmittedData (size_t)
 
virtual void HandleReadTimeout (const boost::system::error_code &)
 
int IsClosed () const
 
bool IsConnected () const
 
bool IsConnecting () const
 
std::string URL () const
 
- Public Member Functions inherited from MessageImp
 MessageImp (std::ostream &out=std::cout)
 
virtual ~MessageImp ()
 
virtual void IndicateStateChange (const Time &, const std::string &)
 
void StateChanged (const Time &time, const std::string &server, const std::string &msg, int state)
 
int Update (const std::string &txt, int severity=kMessage)
 
int Update (const char *txt, int severity=kMessage)
 
int Update (const std::ostringstream &str, int severity=kMessage)
 
int Debug (const std::string &str)
 
int Message (const std::string &str)
 
int Info (const std::string &str)
 
int Warn (const std::string &str)
 
int Error (const std::string &str)
 
int Alarm (const std::string &str)
 
int Fatal (const std::string &str)
 
int Comment (const std::string &str)
 
int Debug (const char *txt)
 
int Message (const char *txt)
 
int Info (const char *txt)
 
int Warn (const char *txt)
 
int Error (const char *txt)
 
int Alarm (const char *txt)
 
int Fatal (const char *txt)
 
int Comment (const char *txt)
 
int Debug (const std::ostringstream &str)
 
int Message (const std::ostringstream &str)
 
int Info (const std::ostringstream &str)
 
int Warn (const std::ostringstream &str)
 
int Alarm (const std::ostringstream &str)
 
int Error (const std::ostringstream &str)
 
int Fatal (const std::ostringstream &str)
 
int Comment (const std::ostringstream &str)
 
std::ostream & operator() () const
 
std::ostream & Out () const
 
virtual bool MessageQueueEmpty () const
 

Protected Member Functions

virtual void UpdateV (const Time=Time())
 
virtual void UpdateVgapd ()
 
- Protected Member Functions inherited from ConnectionUSB
void CloseImp (int64_t delay=0)
 

Protected Attributes

vector< int16_t > fCurrent
 
vector< float > fOperationVoltage
 
vector< float > fCalibrationOffset
 
vector< float > fCalibrationSlope
 
float fVoltageMaxAbs
 
float fVoltageMaxRel
 
vector< uint16_t > fDacTarget
 
vector< uint16_t > fDacCommand
 
vector< uint16_t > fDacActual
 
- Protected Attributes inherited from ConnectionUSB
boost::asio::deadline_timer fInTimeout
 

Private Member Functions

vector< char > GetCmd (uint16_t board, uint16_t channel, Command_t cmd, uint16_t dac=0)
 
vector< char > GetCmd (Command_t cmd, uint16_t id=0, uint16_t dac=0)
 
bool CheckMessageLength (int received, int expected, const string &msg)
 
bool EvalAnswer (const uint8_t *answer, uint16_t id, int command)
 
void DelayedReconnect ()
 
void HandleReceivedData (const vector< uint8_t > &buf, size_t bytes_received, int command, int send_counter)
 
void HandleReceivedData (const bs::error_code &err, size_t bytes_received, int command, int send_counter)
 
void HandleSyncTimer (int counter, const bs::error_code &error)
 
void ScheduleSync (int counter=0)
 
void ConnectionEstablished ()
 
void HandleUpdateTimer (const bs::error_code &error)
 
void ScheduleUpdate (int millisec)
 
void PrintLineCmdDac (int b, int ch, const vector< uint16_t > &dac)
 
void PrintCommandDac (const vector< uint16_t > &dac)
 
void SetAllChannels (const vector< uint16_t > &dac, bool special=false)
 
uint16_t RampOneStep (uint16_t ch)
 
bool RampOneStep ()
 
void HandleRampTimer (const bs::error_code &error)
 
void ScheduleRampStep ()
 

Private Attributes

boost::asio::deadline_timer fSyncTimer
 
boost::asio::deadline_timer fRampTimer
 
boost::asio::deadline_timer fUpdateTimer
 
vector< uint8_t > fBuffer
 
vector< uint8_t > fBufferRamp
 
vector< uint8_t > fBufferUpdate
 
bool fIsVerbose
 
bool fIsDummyMode
 
vector< bool > fPresent
 
int64_t fWrapCounter
 
int64_t fSendCounter
 
int16_t fGlobalDacCmd
 
int16_t fRampStep
 
int16_t fRampTime
 
uint32_t fUpdateTime
 
uint16_t fSyncTime
 
uint32_t fReconnectDelay
 
int fIsInitializing
 
bool fIsRamping
 
int fWaitingForAnswer
 
vector< uint64_t > fCounter
 
Time fLastConnect
 
int32_t fEmergencyLimit
 
bool fEmergencyShutdown
 

Additional Inherited Members

- Public Types inherited from MessageImp
enum  Severity {
  kMessage = 10, kInfo = 20, kWarn = 30, kError = 40,
  kAlarm = 45, kFatal = 50, kComment = 90, kDebug = 99
}
 Severity of a message. More...
 

Detailed Description

Definition at line 32 of file biasctrl.cc.


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