DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq Namespace Reference

Including Qt Headers. More...

Namespaces

namespace  appfwk
 
namespace  appmodel
 
namespace  asiolibs
 
namespace  cmdlib
 
namespace  conffwk
 
namespace  config
 
namespace  confmodel
 
namespace  crtmodules
 
namespace  ctbmodules
 
namespace  daphnemodules
 
namespace  daqdataformats
 
namespace  datahandlinglibs
 
namespace  detchannelmaps
 
namespace  detdataformats
 
namespace  dfmessages
 Dataflow Messages.
 
namespace  dfmodules
 An ERS Issue for DataStore creation failure.
 
namespace  dpdklibs
 
namespace  env
 
namespace  erskafka
 
namespace  ersschema
 
namespace  fddetdataformats
 
namespace  fdreadoutlibs
 
namespace  flxlibs
 
namespace  hdf5libs
 
namespace  hermesmodules
 
namespace  hsilibs
 
namespace  iomanager
 
namespace  ipm
 An ERS Error indicating that an exception was thrown from ZMQ while performing an operation.
 
namespace  kafkaopmon
 
namespace  listrev
 
namespace  logging
 
namespace  oks
 
namespace  oksconflibs
 
namespace  oksdalgen
 
namespace  oksutils
 
namespace  opmon
 
namespace  opmonlib
 
namespace  rawdatautils
 
namespace  rcif
 
namespace  restcmd
 
namespace  serialization
 
namespace  sspmodules
 
namespace  tdemodules
 
namespace  timing
 < Message parameters
 
namespace  timinglibs
 
namespace  tpglibs
 
namespace  trgdataformats
 
namespace  trgtools
 
namespace  trigger
 
namespace  utilities
 
namespace  wibmod
 

Functions

 ERS_DECLARE_ISSUE (timinglibs, TimingEndpointNotReady, endpoint<< " timing endpoint did not become ready in time. State 0x"<< std::hex<< state,((std::string) endpoint)((uint) state)) namespace timinglibs
 
 ERS_DECLARE_ISSUE_BASE (timinglibs, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(timinglibs
 
 ERS_DECLARE_ISSUE (timinglibs, GatherThreadingIssue, "Gather Threading Issue detected: "<< err,((std::string) err)) ERS_DECLARE_ISSUE(timinglibs
 An ERS Issue raised when a threading state error occurs.
 
 DUNE_DAQ_SERIALIZABLE (timinglibs::timingcmd::TimingHwCmd, "TimingHwCmd")
 
 DUNE_DAQ_SERIALIZABLE (nlohmann::json, "JSON")
 
 ERS_DECLARE_ISSUE (timinglibs, TimingMasterNotReady, master<< " timing master did not become ready in time.",((std::string) master)) namespace timinglibs
 
 ERS_DECLARE_ISSUE (datahandlinglibs, InternalError, "SourceID["<< sourceid<< "] Internal Error: "<< error,((daqdataformats::SourceID) sourceid)((std::string) error)) ERS_DECLARE_ISSUE(datahandlinglibs
 
SourceID[" << sourceid << "] Command daqdataformats::SourceID sourceid ((std::string) commanderror)) ERS_DECLARE_ISSUE(datahandlinglibs
 
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror ERS_DECLARE_ISSUE (datahandlinglibs, ConfigurationError, "SourceID["<< sourceid<< "] Readout Configuration Error: "<< conferror,((daqdataformats::SourceID) sourceid)((std::string) conferror)) ERS_DECLARE_ISSUE(datahandlinglibs
 
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror ERS_DECLARE_ISSUE (datahandlinglibs, DataRecorderConfigurationError, "Configuration Error: "<< conferror,((std::string) conferror)) ERS_DECLARE_ISSUE(datahandlinglibs
 
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror Configuration std::string conferror ERS_DECLARE_ISSUE (datahandlinglibs, FileHasExtraData, "Binary file contains extra data, "<< numbytes<< " bytes beyond an exact integer number of super-chunks. "<< "This is not a problem and those bytes will be ignored, "<< "filesize is "<< filesize<< ", "<< "chunk_size is "<< chunksize<< ", "<< "filename is "<< filename,((int32_t) numbytes)((size_t) filesize)((int32_t) chunksize)((std::string) filename)) ERS_DECLARE_ISSUE(datahandlinglibs
 
 ERS_DECLARE_ISSUE (trigger, InvalidConfiguration, "Invalid configuration error:"<< conferror,((std::string) conferror)) ERS_DECLARE_ISSUE(trigger
 
 ERS_DECLARE_ISSUE (trigger, DroppedTPSet, "Failed to send TPs from "<< s_ts<< " to "<< e_ts,((uint64_t) s_ts)((uint64_t) e_ts)) ERS_DECLARE_ISSUE(trigger
 
 ERS_DECLARE_ISSUE (detchannelmaps, ChannelMapCreationFailed, "Failed to create TPCChannelMap of type "<< plugin_name,((std::string) plugin_name)) ERS_DECLARE_ISSUE(detchannelmaps
 A ERS Issue for TPCChannelMap creation failure.
 
 ERS_DECLARE_ISSUE_BASE (listrev, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(listrev
 
 DUNE_DAQ_SERIALIZABLE (listrev::IntList, "IntList")
 
 DUNE_DAQ_SERIALIZABLE (listrev::ReversedList::Data, "ReversedListData")
 
 DUNE_DAQ_SERIALIZABLE (listrev::ReversedList, "ReversedList")
 
 DUNE_DAQ_SERIALIZABLE (listrev::CreateList, "CreateList")
 
 DUNE_DAQ_SERIALIZABLE (listrev::RequestList, "RequestList")
 
 ERS_DECLARE_ISSUE (fdreadoutlibs, PDSPeakIgnored, "Ignoring PDS Peak with ts="<< timestamp<< ", ch="<< channel<< ", sc_iframe="<< superchunk_iframe<< ", ipeak="<< ipeak,((uint64_t) timestamp)((uint64_t) channel)((size_t) superchunk_iframe)((size_t) ipeak)) ERS_DECLARE_ISSUE(fdreadoutlibs
 
 ERS_DECLARE_ISSUE (fdreadoutlibs, TPGAlgorithmInexistent, "The selected algorithm does not exist: "<< algorithm_selection<< " . Check your configuration file and seelect either SimpleThreshold or AbsRS.",((std::string) algorithm_selection)) ERS_DECLARE_ISSUE(fdreadoutlibs
 
 ERS_DECLARE_ISSUE (dpdklibs, FailedToSetupInterface, "Interface ["<< ifaceid<< "] setup failed: "<< error,((int) ifaceid)((int) error))
 
 ERS_DECLARE_ISSUE (dpdklibs, InvalidEALPort, "Interface ["<< ifaceid<< "] is not a valid port: ",((int) ifaceid))
 
 ERS_DECLARE_ISSUE (dpdklibs, LinkOffline, "Link offline for interface ["<< ifaceid<< "]",((int) ifaceid))
 
 ERS_DECLARE_ISSUE (dpdklibs, MainCoreConflict, "The main core ["<< main_core<< "] conflicts with the worker cores list ",((int) main_core))
 
 ERS_DECLARE_ISSUE (dpdklibs, FailedToRetrieveInterfaceInfo, "Failed to retrieve device info for interfce ["<< ifaceid<< "]: "<< error,((int) ifaceid)((int) error))
 
 ERS_DECLARE_ISSUE (dpdklibs, FailedToRetrieveLinkStatus, "Failed to retrieve link status for interfce ["<< ifaceid<< "]: "<< error,((int) ifaceid)((int) error))
 
 ERS_DECLARE_ISSUE (dpdklibs, FailedToResetInterface, "Failed to reset interfce ["<< ifaceid<< "]: "<< error,((int) ifaceid)((int) error))
 
 ERS_DECLARE_ISSUE (dpdklibs, FailedToConfigureInterface, "Failed to configure interface ["<< ifaceid<< "], stage "<< stage<< " : "<< error,((int) ifaceid)((std::string) stage)((int) error))
 
 ERS_DECLARE_ISSUE (dpdklibs, FailedToSendData, "Sink ID ["<< sink_id<< "] Number of packets that failed to send: "<< count,((std::string) sink_id)((int) count))
 
 ERS_DECLARE_ISSUE (dpdklibs, PacketErrors, "Interface ["<< id<< "] "<< error<< " packet error counts: "<< count,((std::string) id)((std::string) error)((int) count))
 
 ERS_DECLARE_ISSUE (dpdklibs, BadPacketHeaderIssue, "BadPacketHeaderIssue: \""<< ers_messg<< "\"",((std::string) ers_messg)) namespace dpdklibs
 
 ERS_DECLARE_ISSUE (dpdklibs, MetricPublishFailed, "Field "<< field<< " was not reported",((std::string) field)) namespace dpdklibs
 
 ERS_DECLARE_ISSUE_BASE (wibmod, UnreachableError, appfwk::GeneralDAQModuleIssue, "An unreachable part of the code has been reached.",((std::string) name), ERS_EMPTY) ERS_DECLARE_ISSUE_BASE(wibmod
 
 ERS_DECLARE_ISSUE (confmodel, InvalidOpMonFile, file_name<< " is an invalid name for the opmon output",((std::string) file_name)) ERS_DECLARE_ISSUE_BASE(confmodel
 
The opmon infrastructure has not been set up in the ERS_DECLARE_ISSUE_BASE (confmodel, NoControlServiceDefined, ConfigurationError, "The control service has not been set up for the application "+app_name+" you need to define a service called which has a name finishing with \'_control\'",,((std::string) app_name)) ERS_DECLARE_ISSUE_BASE(confmodel
 
 ERS_DECLARE_ISSUE_BASE (confmodel, BadVariableUsage, AlgorithmError, message,,((std::string) message)) ERS_DECLARE_ISSUE_BASE(confmodel
 
 ERS_DECLARE_ISSUE (opmonlib, OpmonServiceCreationFailed, "OpmonServiceCreationFailed: "<< error,((std::string) error))
 
 ERS_DECLARE_ISSUE (opmonlib, OpMonFacilityCreationFailed, "Facility "<< type<< ": creation failed",((std::string) type))
 
 ERS_DECLARE_ISSUE (opmonlib, NonUniqueNodeName, name<< " already present in the node list of "<< opmon_id,((std::string) name)((std::string) opmon_id)) ERS_DECLARE_ISSUE(opmonlib
 
 ERS_DECLARE_ISSUE (opmonlib, ThreadNameTooLong, "The name "<< name<< " is too long for a thread name",((std::string) name)) ERS_DECLARE_ISSUE(opmonlib
 
Monitoring thread not ERS_EMPTY ERS_DECLARE_ISSUE (opmonlib, FailedMonitoringThread, "Monitoring thread failed to start", ERS_EMPTY) ERS_DECLARE_ISSUE(opmonlib
 
 ERS_DECLARE_ISSUE (opmonlib, FailedInfoReconstruction, "Failure to create an object of type "<< type,((std::string) type)) ERS_DECLARE_ISSUE_BASE(opmonlib
 
 ERS_DECLARE_ISSUE (sspmodules, ConfigurationError, "SSP Configuration Error: "<< conferror,((std::string) conferror)) ERS_DECLARE_ISSUE(sspmodules
 
LED calibration failed to ERS_EMPTY ERS_DECLARE_ISSUE (sspmodules, FailedLEDCalibrationConf, "LED calibration failed to configure", ERS_EMPTY) ERS_DECLARE_ISSUE(sspmodules
 
 ERS_DECLARE_ISSUE (daphnemodules, SocketCreationError, "Failed to create a socket", ERS_EMPTY) ERS_DECLARE_ISSUE(daphnemodules
 
Invalid std::string ip ERS_DECLARE_ISSUE (daphnemodules, FailedPing, "Failed to ping daphne board at "<< ip<< ':'<< port,((std::string) ip)((int) port)) ERS_DECLARE_ISSUE(daphnemodules
 
 ERS_DECLARE_ISSUE (utilities, ServiceNotFound, "The service "<< service<< " was not found in DNS",((std::string) service)) ERS_DECLARE_ISSUE(utilities
 
 ERS_DECLARE_ISSUE (utilities, ThreadingIssue, "Threading Issue detected: "<< err,((std::string) err)) namespace utilities
 An ERS Issue raised when a threading state error occurs.
 
 ERS_DECLARE_ISSUE (hdf5libs, InvalidRecordName, "Record name "<< name<< " is unknown.",((std::string) name)) ERS_DECLARE_ISSUE(hdf5libs
 
 ERS_DECLARE_ISSUE (hdf5libs, DeprecatedUsage, func_name<< " is deprecated. "<< message,((std::string) func_name)((std::string) message)) ERS_DECLARE_ISSUE(hdf5libs
 
 ERS_DECLARE_ISSUE (serialization, UnknownSerializationTypeString, "Unknown serialization type "<< t,((std::string) t)) ERS_DECLARE_ISSUE(serialization
 
Unknown serialization ERS_DECLARE_ISSUE (serialization, UnknownSerializationTypeByte, "Unknown serialization type "<< t,((char) t)) ERS_DECLARE_ISSUE(serialization
 
template<typename T >
Unknown serialization Cannot deserialize std::string datatype_to_string ()
 
 ERS_DECLARE_ISSUE (oks, DeprecatedFormat, "the file "<< file<< " contains OKS time data stored in deprecated format \'"<< data<< "\'. Please refresh it using an oks application. Support for such format will be removed in a future release.",((const char *) file)((const char *) data)) namespace oks
 
 ERS_DECLARE_ISSUE (hermesmodules, LinkDoesNotExist, "Hermes Link "<< lid<< " does not exist",((int) lid))
 
 ERS_DECLARE_ISSUE (hermesmodules, InputBufferDoesNotExist, "Hermes Input Buffer "<< bid<< " does not exist",((int) bid))
 
 ERS_DECLARE_ISSUE (hermesmodules, MagicNumberError, "Hermes Magic number failed "<< found<< " ("<< expected<< ")",((uint32_t) found)((uint32_t) expected))
 
 ERS_DECLARE_ISSUE (hermesmodules, LinkInError, "Hermes Link "<< link<< " is in error (err:"<< err<< ", eth_rdy:"<< eth_rdy<< ", src_rdy:"<< src_rdy<< ", udp_rdy:"<< udp_rdy<<" )",((uint16_t) link)((bool) err)((bool) eth_rdy)((bool) src_rdy)((bool) udp_rdy))
 
 ERS_DECLARE_ISSUE (iomanager, ConnectionInstanceNotFound, "Connection Instance not found for name "<< name,((std::string) name)) ERS_DECLARE_ISSUE(iomanager
 
static std::shared_ptr< iomanager::IOManagerget_iomanager ()
 
template<typename Datatype >
static std::shared_ptr< iomanager::SenderConcept< Datatype > > get_iom_sender (iomanager::ConnectionId const &id)
 
template<typename Datatype >
static std::shared_ptr< iomanager::ReceiverConcept< Datatype > > get_iom_receiver (iomanager::ConnectionId const &id)
 
template<typename Datatype >
static std::shared_ptr< iomanager::SenderConcept< Datatype > > get_iom_sender (std::string const &uid)
 
template<typename Datatype >
static std::shared_ptr< iomanager::ReceiverConcept< Datatype > > get_iom_receiver (std::string const &uid)
 
 ERS_DECLARE_ISSUE (iomanager, NetworkMessageNotSerializable, "Object of type "<< type<< " is not serializable but configured for network transfer!",((std::string) type)) ERS_DECLARE_ISSUE(iomanager
 
 ERS_DECLARE_ISSUE (iomanager, QueueTypeUnknown, "Queue type \""<< queue_type<< "\" is unknown ",((std::string) queue_type)) ERS_DECLARE_ISSUE(iomanager
 QueueTypeUnknown ERS Issue.
 
 ERS_DECLARE_ISSUE (conffwk, DalPackageNameNotFound, "Failed to find the dal package name for class "<< class_name<< " in its schema path '"<< schema_path<< "'",((std::string) class_name)((std::string) schema_path)) ERS_DECLARE_ISSUE(conffwk
 
 ERS_DEFINE_ISSUE_BASE_CXX (conffwk, Generic, conffwk::Exception, what,,((const char *) what)) ERS_DEFINE_ISSUE_BASE_CXX(conffwk
 
static type<< " \""<< data<< "\" is not found",,((const char *) type)((const char *) data)) ERS_DEFINE_ISSUE_BASE_CXX(conffwk, DeletedObject, conffwk::Exception, "object \'"<< object_id<< '@'<< class_name<< "\' was deleted",,((const char *) class_name)((const char *) object_id)) namespace conffwk {template< typename T > T * get_new (ConfigObject &co, const std::string &attrname)
 
static bool check_prefetch_needs ()
 
static void init_regex (std::unique_ptr< std::regex > &ptr, const std::string &str, const char *what)
 
template<class T >
static void add_array_item (boost::property_tree::ptree &pt, const T &val)
 
template<class T >
static void add_data (boost::property_tree::ptree &pt, const ConfigObject &obj, const dunedaq::conffwk::attribute_t &attribute, const std::string &empty_array_item)
 
static void add_data (boost::property_tree::ptree &pt, const ConfigObject &obj, const dunedaq::conffwk::relationship_t &relationship, const std::string &empty_array_item)
 
static void print_svect (std::ostream &s, const std::vector< std::string > &v, const char *name)
 
std::ostream & operator<< (std::ostream &s, const ConfigurationChange &c)
 
std::ostream & operator<< (std::ostream &s, const std::vector< ConfigurationChange * > &v)
 
std::ostream & operator<< (std::ostream &s, const Configuration &c)
 
 ERS_DECLARE_ISSUE (ctbmodules, CTBCommunicationError, " CTB Hardware Communication Error: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(ctbmodules
 
CTB Buffer std::string descriptor ERS_DECLARE_ISSUE (ctbmodules, CTBWordMatchWarning, " CTB Word Matching Issue: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(ctbmodules
 
CTB Buffer std::string descriptor CTB Repeated Word std::string descriptor ERS_DECLARE_ISSUE (ctbmodules, CTBMessage, " Mesage from CTB: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(ctbmodules
 
 ERS_DECLARE_ISSUE_BASE (dfmodules, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(dfmodules
 
 ERS_DECLARE_ISSUE (dfmodules, NoTPsInWindow, "No TriggerPrimitives were used from a TPSet with start_time="<< tpset_start_time<< ", end_time="<< tpset_end_time<< ", TSAccumulator begin and end times:"<< window_begin_time<< ", "<< window_end_time,((daqdataformats::timestamp_t) tpset_start_time)((daqdataformats::timestamp_t) tpset_end_time)((daqdataformats::timestamp_t) window_begin_time)((daqdataformats::timestamp_t) window_end_time)) ERS_DECLARE_ISSUE(dfmodules
 
Cannot add TPSet with because another TPSet with these values already size_t tpset_source_id ((daqdataformats::timestamp_t) tpset_start_time)) ERS_DECLARE_ISSUE(dfmodules
 
 ERS_DECLARE_ISSUE (dfmodules, DFOThresholdsNotConsistent, "Busy threshold ("<< busy<< ") is smaller than free threshold ("<< free<< ')',((size_t) busy)((size_t) free)) ERS_DECLARE_ISSUE(dfmodules
 
 ERS_DECLARE_ISSUE (timing, DACChannelOutOfRange, " DAC channel out of range: "<< channel,((std::string) channel)) ERS_DECLARE_ISSUE(timing
 
 ERS_DECLARE_ISSUE (timing, SI534xConfigError, " SI534xConfigError: "<< message,((std::string) message)) ERS_DECLARE_ISSUE(timing
 
Missing configuration std::string tag ERS_DECLARE_ISSUE (timing, SI534xRegWriteFailed, " Failed to write Si53xx reg: "<< reg<< "with data: "<< data,((std::string) reg)((std::string) data)) ERS_DECLARE_ISSUE(timing
 < Message parameters
 
 ERS_DECLARE_ISSUE (timing, TimestampNotReady, " Timestamp not ready in time; loaded: "<< loaded<< ", error: "<< error,((uint32_t) loaded)((uint32_t) error)) namespace timing
 
 ERS_DECLARE_ISSUE (timing, FileNotFound, file_path<< " does not exist!",((std::string) file_path)) ERS_DECLARE_ISSUE(timing
 
 ERS_DECLARE_ISSUE (flxlibs, CardError, " FELIX Card Internal Error: "<< intererror,((std::string) intererror)) ERS_DECLARE_ISSUE(flxlibs
 
FELIX Initialization std::string initerror ERS_DECLARE_ISSUE (flxlibs, ConfigurationError, " FELIX Configuration Error: "<< conferror,((std::string) conferror)) ERS_DECLARE_ISSUE(flxlibs
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename ERS_DECLARE_ISSUE (flxlibs, ChannelAlignment, " Channel not aligned: "<< channel,((int) channel)) ERS_DECLARE_ISSUE(flxlibs
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int chunksize ((size_t) expected)) ERS_DECLARE_ISSUE(flxlibs
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOps couldn t push to queue !Failed std::string chunk ERS_DECLARE_ISSUE (flxlibs, ElinkConfigurationInconsistency, " Inconsistent number of ELinks requested. Num links: "<< num_links,((int) num_links)) ERS_DECLARE_ISSUE(flxlibs
 
 ERS_DECLARE_ISSUE (cmdlib, MalformedUri, "Malformed uri: "<< error<< " uri:"<< uri,((std::string) error)((std::string) uri)) ERS_DECLARE_ISSUE(cmdlib
 cmdlib specific issues
 
Unsupported std::string uri ERS_DECLARE_ISSUE (cmdlib, CannotParseCommand, "Failed to parse command: "<< error,((std::string) error)) ERS_DECLARE_ISSUE(cmdlib
 
Unsupported std::string uri Execution of command std::string error ERS_DECLARE_ISSUE (cmdlib, CommandFacilityInitialization, "Problem configuring the command facility: "<< error,((std::string) error)) ERS_DECLARE_ISSUE(cmdlib
 
Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility std::string uri ERS_DECLARE_ISSUE (cmdlib, CompletionQueueIssue, "Problem with command completion queue: "<< error,((std::string) error)) ERS_DECLARE_ISSUE(cmdlib
 
 ERS_DECLARE_ISSUE (appmodel, BadConf, what,((std::string) what)) ERS_DECLARE_ISSUE(appmodel
 
 ERS_DECLARE_ISSUE_BASE (hsilibs, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(hsilibs
 
 ERS_DECLARE_ISSUE (appfwk, NotADaqApplication, "Application "<< app<< " is neither a DaqApplication nor a SmartDaqApplication ",((std::string) app)) ERS_DECLARE_ISSUE(appfwk
 
No such std::string what ERS_DECLARE_ISSUE (appfwk, ActionPlanValidationFailed, "Error validating action plan "<< cmd<< ", module "<< module<< ": "<< message,((std::string) cmd)((std::string) module)((std::string) message)) namespace appfwk
 
 ERS_DECLARE_ISSUE (appfwk, DAQModuleCreationFailed, "Failed to create DAQModule "<< instance_name<< " of type "<< plugin_name,((std::string) plugin_name)((std::string) instance_name)) ERS_DECLARE_ISSUE(appfwk
 A ERS Issue for DAQModule creation failure.
 
DAQModule std::string name ERS_DECLARE_ISSUE_BASE (appfwk, DAQModuleInitFailed, appfwk::GeneralDAQModuleIssue, " init failed.",((std::string) name), ERS_EMPTY) ERS_DECLARE_ISSUE_BASE(appfwk
 Initialization failed ERS Issue (used by DAQModuleManager)
 
 ERS_DECLARE_ISSUE (appfwk, ApplicationNotInitialized, "Application "<< name<< " has not been initialized yet.",((std::string) name)) ERS_DECLARE_ISSUE(appfwk
 
 ERS_DECLARE_ISSUE (appfwk, DAQModuleManagerNotInitialized, "Command "<< cmdid<< " received before initialization",((std::string) cmdid)) ERS_DECLARE_ISSUE(appfwk
 
init Command received when already ERS_EMPTY ERS_DECLARE_ISSUE (appfwk, CommandDispatchingFailed, "Command "<< cmdid<< " was not executed correctly by: "<< modules,((std::string) cmdid)((std::string) modules)) ERS_DECLARE_ISSUE(appfwk
 
 ERS_DECLARE_ISSUE (kafkaopmon, MissingParameter, "No "<< parameter<< " in "<< conf,((std::string) parameter)((std::string) conf)) ERS_DECLARE_ISSUE(kafkaopmon
 
 ERS_DECLARE_ISSUE (kafkaopmon, CannotPostToDb, "Cannot post to Influx DB : "<< error,((std::string) error)) ERS_DECLARE_ISSUE(kafkaopmon
 
Cannot create std::string fatal ERS_DECLARE_ISSUE (kafkaopmon, CannotConsumeMessage, "Cannot consume message : "<< error,((std::string) error)) ERS_DECLARE_ISSUE(kafkaopmon
 
 ERS_DECLARE_ISSUE (ipm, UnexpectedNumberOfBytes, "Expected "<< bytes1<< " bytes in message but received "<< bytes2,((int) bytes1)((int) bytes2)) ERS_DECLARE_ISSUE(ipm
 
Unable to receive within timeout period (timeout period was " << timeout << " milliseconds)"
 
 DUNE_DAQ_SERIALIZABLE (dfmessages::DataRequest, "DataRequest")
 
 DUNE_DAQ_SERIALIZABLE (dfmessages::HSIEvent, "HSIEvent")
 
 DUNE_DAQ_SERIALIZABLE (dfmessages::TimeSync, "TimeSync")
 
 DUNE_DAQ_SERIALIZABLE (dfmessages::TriggerDecision, "TriggerDecision")
 
 DUNE_DAQ_SERIALIZABLE (dfmessages::TriggerDecisionToken, "TriggerDecisionToken")
 
 DUNE_DAQ_SERIALIZABLE (dfmessages::TriggerInhibit, "TriggerInhibit")
 
 DUNE_DAQ_SERIALIZABLE (dfmessages::TRMonRequest, "TRMonRequest")
 
 ERS_DECLARE_ISSUE (tdemodules, AMCCommandIssue, "AMC with ip:"+ip+" and port: "<< port<< " | "<< "send command failed, reason: "<< text,((std::string) ip)((uint16_t) port)((std::string) text))
 
 ERS_DECLARE_ISSUE (tdemodules, AMCProtocolIssue, prefix<< "AMCProtocolResponse: "<< text,((std::string) prefix)((std::string) text))
 
 ERS_DECLARE_ISSUE (tdemodules, AMCResponseErr, prefix<< "Received Error packet:"<< "\n"<< "Error code:"<< code<< "\nMessage: "<< text,((std::string) prefix)((uint16_t) code)((std::string) text))
 
 ERS_DECLARE_ISSUE (tdemodules, AMCUnknownOpCode, prefix<< "Unknown opcode recived: "<< opcode,((std::string) prefix)((uint16_t) opcode))
 

Variables

 InvalidQueueFatalError
 
 DeviceInfoSendFailed
 
 CommandError
 
SourceID[" << sourceid << "] Command Error
 
SourceID[" << sourceid << "] Command daqdataformats::SourceID InitializationError
 
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror BufferedReaderWriterConfigurationError
 
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror GenericConfigurationError
 
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror Configuration std::string conferror TimeSyncTransmissionFailed
 
 TriggerInhibited
 
 TPHandlerMsg
 
 infomsg
 
 InvalidStreamID
 < Namespace
 
 PDSUnphysicalFrameTimestamp
 
PDS Frame with unphysical timestamp detected with ts =" << timestamp << "
 
PDS Frame with unphysical timestamp detected with ch =" << channel << "
 
 TPTooLong
 
 ConfigurationFailed
 
 NoOpmonInfrastructure
 
 ConfigurationError
 
The opmon infrastructure has not been set up in the configuration
 
The opmon infrastructure has not been set up in the DuplicatedControlService
 
The opmon infrastructure has not been set up in the The control service has been defined multiple times for the application app_name you need to define only one service called control
 
 BadApplicationInfo
 
 AlgorithmError
 
 EntryWithNoData
 
 MonitoringThreadNotSet
 
Monitoring thread not set
 
Monitoring thread not ERS_EMPTY MissingConfiguration
 
 NameMismatch
 
 FailedInfoReconstruction
 
 FailedLEDCalibrationInit
 
LED calibration failed to initialize
 
LED calibration failed to ERS_EMPTY DeviceInterfacePDTSStatus
 
LED calibration failed to ERS_EMPTY Endpoint failed to reach
 
 InvalidIPAddress
 
Invalid address
 
Invalid std::string ip FailedSocketInteraction
 
 NameNotFound
 
 InvalidSequenceDigits
 
 FileOpenFailed
 
 UnknownSerializationTypeEnum
 
Unknown serialization type
 
Unknown serialization CannotDeserializeMessage
 
Unknown serialization Cannot deserialize message
 
 TimeoutExpired
 
 ConnectionNotFound
 
 QueueTypeMismatch
 
 LoadDalFailed
 
 NotFound
 
 DeletedObject
 
 CTBBufferWarning
 
CTB Buffer Issue
 
CTB Buffer std::string descriptor CTBRepeatedTimestampWarning
 
CTB Buffer std::string descriptor CTB Repeated Word std::string descriptor CTBConfigFailure
 
CTB Buffer std::string descriptor CTB Repeated Word std::string descriptor descriptor
 
 DuplicateTPWindow
 
Cannot add TPSet with sourceid
 
Cannot add TPSet with start_time
 
Cannot add TPSet with because another TPSet with these values already exists
 
Cannot add TPSet with because another TPSet with these values already size_t TardyTPSetReceived
 
 AssignedTriggerDecisionNotFound
 
 DACValueOutOfRange
 < Namespace
 
DAC value out of range
 Message.
 
 SI534xMissingConfigSectionError
 < Namespace
 
Missing configuration section
 Message.
 
Missing configuration std::string tag SI534xRegWriteRetry
 < Namespace
 
 CorruptedFile
 < Namespace
 
FELIX Initialization std::string initerror QueueTimeoutError
 
FELIX Initialization std::string initerror FELIX queue timed out
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename UnexpectedChunk
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk size
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOperationQueuePushFailure
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOps couldn t push to queue !Failed chunk
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOps couldn t push to queue !Failed std::string chunk BlockSizeConfigurationInconsistency
 
FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOps couldn t push to queue !Failed std::string chunk Invalid FELIX block size and trailer configuration requested
 
 UnsupportedUri
 
Unsupported URI
 
Unsupported std::string uri CommandExecutionFailed
 
Unsupported std::string uri Execution of command failed
 
Unsupported std::string uri Execution of command std::string error CommandFacilityCreationFailed
 
Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility uri
 
Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility std::string uri RunLoopTerminated
 
Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility std::string uri The main run loop for command reception was interrupted
 
 BadStreamConf
 
 MissingComponent
 
No such component
 
 GeneralDAQModuleIssue
 
DAQModule __pad0__
 
DAQModule std::string name CommandIssue
 
 InvalidStateForCommand
 
 DAQModuleManagerAlreadyInitialized
 
init Command received when already initialized
 
init Command received when already ERS_EMPTY ConflictingCommandMatching
 
 FailedConfiguration
 
 CannotCreateConsumer
 
Cannot create consumer
 
Cannot create std::string fatal IncorrectParameters
 
Cannot create std::string fatal Incorrect parameters
 
 ReceiveTimeoutExpired
 

Detailed Description

Including Qt Headers.

The DUNE-DAQ namespace.

Including Qt.

This is part of the DUNE DAQ Software Suite, copyright 2020. Licensing/copyright details are in the COPYING file that you should have received with this code.

Including c++ Including Schema

This is part of the DUNE DAQ Application Framework, copyright 2020. Licensing/copyright details are in the COPYING file that you should have received with this code.

Function Documentation

◆ add_array_item()

template<class T >
static void dunedaq::add_array_item ( boost::property_tree::ptree & pt,
const T & val )
static

Definition at line 940 of file Configuration.cpp.

941{
942 boost::property_tree::ptree child;
943 child.put("", val);
944 pt.push_back(std::make_pair("", child));
945}

◆ add_data() [1/2]

template<class T >
static void dunedaq::add_data ( boost::property_tree::ptree & pt,
const ConfigObject & obj,
const dunedaq::conffwk::attribute_t & attribute,
const std::string & empty_array_item )
static

Definition at line 1037 of file Configuration.cpp.

1038{
1039 auto &o = const_cast<ConfigObject&>(obj);
1040 if (!attribute.p_is_multi_value)
1041 {
1042 T val;
1043 const_cast<ConfigObject&>(obj).get(attribute.p_name, val);
1044 pt.put(attribute.p_name, val);
1045 }
1046 else
1047 {
1048 std::vector<T> values;
1049 o.get(attribute.p_name, values);
1050
1051 boost::property_tree::ptree children;
1052
1053 if (!values.empty())
1054 for (const auto &v : values)
1055 add_array_item(children, v);
1056
1057 else if (!empty_array_item.empty())
1058 add_array_item(children, empty_array_item);
1059
1060 pt.add_child(attribute.p_name, children);
1061 }
1062}

◆ add_data() [2/2]

static void dunedaq::add_data ( boost::property_tree::ptree & pt,
const ConfigObject & obj,
const dunedaq::conffwk::relationship_t & relationship,
const std::string & empty_array_item )
static

Definition at line 1065 of file Configuration.cpp.

1066{
1068 {
1069 std::vector<ConfigObject> values;
1070 const_cast<ConfigObject&>(obj).get(relationship.p_name, values);
1071
1072 boost::property_tree::ptree children;
1073
1074 if (!values.empty())
1075 for (const auto &v : values)
1076 add_array_item(children, v.full_name());
1077
1078 else if (!empty_array_item.empty())
1079 add_array_item(children, empty_array_item);
1080
1081 pt.add_child(relationship.p_name, children);
1082 }
1083 else
1084 {
1085 ConfigObject val;
1086 const_cast<ConfigObject&>(obj).get(relationship.p_name, val);
1087 pt.put(relationship.p_name, !val.is_null() ? val.full_name() : "");
1088 }
1089}
static void add_array_item(boost::property_tree::ptree &pt, const T &val)

◆ check_prefetch_needs()

static bool dunedaq::check_prefetch_needs ( )
static

Definition at line 90 of file Configuration.cpp.

91{
92 return (getenv("TDAQ_DB_PREFETCH_ALL_DATA") != nullptr);
93}

◆ chunksize()

FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int dunedaq::chunksize ( (size_t) expected)

◆ datatype_to_string()

template<typename T >
Unknown serialization Cannot deserialize std::string dunedaq::datatype_to_string ( )
inline

Definition at line 149 of file Serialization.hpp.

150{
151 return "Unknown";
152}

◆ DUNE_DAQ_SERIALIZABLE() [1/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( dfmessages::DataRequest ,
"DataRequest"  )

◆ DUNE_DAQ_SERIALIZABLE() [2/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( dfmessages::HSIEvent ,
"HSIEvent"  )

◆ DUNE_DAQ_SERIALIZABLE() [3/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( dfmessages::TimeSync ,
"TimeSync"  )

◆ DUNE_DAQ_SERIALIZABLE() [4/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( dfmessages::TriggerDecision ,
"TriggerDecision"  )

◆ DUNE_DAQ_SERIALIZABLE() [5/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( dfmessages::TriggerDecisionToken ,
"TriggerDecisionToken"  )

◆ DUNE_DAQ_SERIALIZABLE() [6/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( dfmessages::TriggerInhibit ,
"TriggerInhibit"  )

◆ DUNE_DAQ_SERIALIZABLE() [7/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( dfmessages::TRMonRequest ,
"TRMonRequest"  )

◆ DUNE_DAQ_SERIALIZABLE() [8/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( listrev::CreateList ,
"CreateList"  )

◆ DUNE_DAQ_SERIALIZABLE() [9/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( listrev::IntList ,
"IntList"  )

◆ DUNE_DAQ_SERIALIZABLE() [10/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( listrev::RequestList ,
"RequestList"  )

◆ DUNE_DAQ_SERIALIZABLE() [11/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( listrev::ReversedList ,
"ReversedList"  )

◆ DUNE_DAQ_SERIALIZABLE() [12/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( listrev::ReversedList::Data ,
"ReversedListData"  )

◆ DUNE_DAQ_SERIALIZABLE() [13/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( nlohmann::json ,
"JSON"  )

◆ DUNE_DAQ_SERIALIZABLE() [14/14]

dunedaq::DUNE_DAQ_SERIALIZABLE ( timinglibs::timingcmd::TimingHwCmd ,
"TimingHwCmd"  )

◆ ERS_DECLARE_ISSUE() [1/83]

No such std::string what dunedaq::ERS_DECLARE_ISSUE ( appfwk ,
ActionPlanValidationFailed ,
"Error validating action plan "<< cmd<< " ,
module " << module << ":" << message,
((std::string) cmd)((std::string) module)((std::string) message)  )

Definition at line 38 of file ConfigurationManager.hpp.

40 : " << message,
41 ((std::string)cmd)((std::string)module)((std::string)message))
42
43namespace appfwk {
44
45class ConfigurationManager
46{
47public:
48 ConfigurationManager(std::string& config_spec, std::string& app_name, std::string& session_name);
49 void initialize();
50
51 const confmodel::Session* session() const { return m_session; }
52 const confmodel::Application* application()
53 {
54 initialize();
55 return m_application;
56 }
57
58 const std::vector<const confmodel::Queue*>& queues()
59 {
60 initialize();
61 return m_queues;
62 }
63 const std::vector<const confmodel::NetworkConnection*>& networkconnections()
64 {
65 initialize();
66 return m_networkconnections;
67 }
68 const std::vector<const confmodel::DaqModule*>& modules()
69 {
70 initialize();
71 return m_modules;
72 }
73 const confmodel::ConnectivityService* connectivity_service()
74 {
75 initialize();
76 return m_connsvc_config;
77 }
78
79 const std::unordered_map<std::string, const confmodel::ActionPlan*>& action_plans()
80 {
81 initialize();
82 return m_action_plans;
83 }
84 const confmodel::ActionPlan* action_plan(std::string cmd) const;
85
86 template<typename T>
87 const T* get_dal(const std::string& name)
88 {
89 return m_confdb->get<T>(name);
90 }
91
92private:
93 std::shared_ptr<conffwk::Configuration> m_confdb;
94 std::string m_app_name;
95 std::string m_session_name;
96 std::string m_oks_config_spec;
97
98 const confmodel::Session* m_session;
99 const confmodel::Application* m_application;
100 std::unordered_map<std::string, const confmodel::ActionPlan*> m_action_plans;
101 std::vector<const confmodel::DaqModule*> m_modules;
102 std::vector<const confmodel::Queue*> m_queues;
103 std::vector<const confmodel::NetworkConnection*> m_networkconnections;
104 const confmodel::ConnectivityService* m_connsvc_config;
105
106 bool m_initialized{ false };
107};
108
109} // namespace appfwk

◆ ERS_DECLARE_ISSUE() [2/83]

dunedaq::ERS_DECLARE_ISSUE ( appfwk ,
ApplicationNotInitialized ,
"Application "<< name<< " has not been initialized yet." ,
((std::string) name)  )

◆ ERS_DECLARE_ISSUE() [3/83]

init Command received when already ERS_EMPTY dunedaq::ERS_DECLARE_ISSUE ( appfwk ,
CommandDispatchingFailed ,
"Command "<< cmdid<< " was not executed correctly by: "<< modules,
((std::string) cmdid)((std::string) modules)  )

◆ ERS_DECLARE_ISSUE() [4/83]

dunedaq::ERS_DECLARE_ISSUE ( appfwk ,
DAQModuleCreationFailed ,
"Failed to create DAQModule "<< instance_name<< " of type "<< plugin_name,
((std::string) plugin_name)((std::string) instance_name)  )

A ERS Issue for DAQModule creation failure.

A generic DAQModule ERS Issue

◆ ERS_DECLARE_ISSUE() [5/83]

dunedaq::ERS_DECLARE_ISSUE ( appfwk ,
DAQModuleManagerNotInitialized ,
"Command "<< cmdid<< " received before initialization" ,
((std::string) cmdid)  )

◆ ERS_DECLARE_ISSUE() [6/83]

dunedaq::ERS_DECLARE_ISSUE ( appfwk ,
NotADaqApplication ,
"Application "<< app<< " is neither a DaqApplication nor a SmartDaqApplication " ,
((std::string) app)  )

◆ ERS_DECLARE_ISSUE() [7/83]

dunedaq::ERS_DECLARE_ISSUE ( appmodel ,
BadConf ,
what ,
((std::string) what)  )

◆ ERS_DECLARE_ISSUE() [8/83]

Unsupported std::string uri dunedaq::ERS_DECLARE_ISSUE ( cmdlib ,
CannotParseCommand ,
"Failed to parse command: "<< error,
((std::string) error)  )

◆ ERS_DECLARE_ISSUE() [9/83]

Unsupported std::string uri Execution of command std::string error dunedaq::ERS_DECLARE_ISSUE ( cmdlib ,
CommandFacilityInitialization ,
"Problem configuring the command facility: "<< error,
((std::string) error)  )

◆ ERS_DECLARE_ISSUE() [10/83]

Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility std::string uri dunedaq::ERS_DECLARE_ISSUE ( cmdlib ,
CompletionQueueIssue ,
"Problem with command completion queue: "<< error,
((std::string) error)  )

◆ ERS_DECLARE_ISSUE() [11/83]

dunedaq::ERS_DECLARE_ISSUE ( cmdlib ,
MalformedUri ,
"Malformed uri: "<< error<< " uri:"<< uri,
((std::string) error)((std::string) uri)  )

cmdlib specific issues

◆ ERS_DECLARE_ISSUE() [12/83]

dunedaq::ERS_DECLARE_ISSUE ( conffwk ,
DalPackageNameNotFound ,
"Failed to find the dal package name for class "<< class_name<< " in its schema path '"<< schema_path<< "'" ,
((std::string) class_name)((std::string) schema_path)  )

◆ ERS_DECLARE_ISSUE() [13/83]

dunedaq::ERS_DECLARE_ISSUE ( confmodel ,
InvalidOpMonFile ,
file_name<< " is an invalid name for the opmon output" ,
((std::string) file_name)  )

◆ ERS_DECLARE_ISSUE() [14/83]

dunedaq::ERS_DECLARE_ISSUE ( ctbmodules ,
CTBCommunicationError ,
" CTB Hardware Communication Error: "<< descriptor,
((std::string) descriptor)  )

◆ ERS_DECLARE_ISSUE() [15/83]

CTB Buffer std::string descriptor CTB Repeated Word std::string descriptor dunedaq::ERS_DECLARE_ISSUE ( ctbmodules ,
CTBMessage ,
" Mesage from CTB: "<< descriptor,
((std::string) descriptor)  )

◆ ERS_DECLARE_ISSUE() [16/83]

CTB Buffer std::string descriptor dunedaq::ERS_DECLARE_ISSUE ( ctbmodules ,
CTBWordMatchWarning ,
" CTB Word Matching Issue: "<< descriptor,
((std::string) descriptor)  )

◆ ERS_DECLARE_ISSUE() [17/83]

Invalid std::string ip dunedaq::ERS_DECLARE_ISSUE ( daphnemodules ,
FailedPing ,
"Failed to ping daphne board at "<< ip<< ':'<< port,
((std::string) ip)((int) port)  )

◆ ERS_DECLARE_ISSUE() [18/83]

dunedaq::ERS_DECLARE_ISSUE ( daphnemodules ,
SocketCreationError ,
"Failed to create a socket" ,
ERS_EMPTY  )

◆ ERS_DECLARE_ISSUE() [19/83]

SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror dunedaq::ERS_DECLARE_ISSUE ( datahandlinglibs ,
ConfigurationError ,
"SourceID Readout Configuration Error: "<< conferror[" << sourceid << "],
((daqdataformats::SourceID) sourceid)((std::string) conferror)  )

◆ ERS_DECLARE_ISSUE() [20/83]

SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror dunedaq::ERS_DECLARE_ISSUE ( datahandlinglibs ,
DataRecorderConfigurationError ,
"Configuration Error: "<< conferror,
((std::string) conferror)  )

◆ ERS_DECLARE_ISSUE() [21/83]

SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror Configuration std::string conferror dunedaq::ERS_DECLARE_ISSUE ( datahandlinglibs ,
FileHasExtraData ,
"Binary file contains extra data,
" << numbytes << " bytes beyond an exact integer number of super-chunks. " << "This is not a problem and those bytes will be ignored,
" << "filesize is " << filesize << " ,
" << "chunk_size is " << chunksize << " ,
" << "filename is " << filename,
((int32_t) numbytes)((size_t) filesize)((int32_t) chunksize)((std::string) filename)  )

◆ ERS_DECLARE_ISSUE() [22/83]

dunedaq::ERS_DECLARE_ISSUE ( datahandlinglibs ,
InternalError ,
"SourceID Internal Error: "<< error[" << sourceid << "],
((daqdataformats::SourceID) sourceid)((std::string) error)  )

◆ ERS_DECLARE_ISSUE() [23/83]

dunedaq::ERS_DECLARE_ISSUE ( detchannelmaps ,
ChannelMapCreationFailed ,
"Failed to create TPCChannelMap of type "<< plugin_name,
((std::string) plugin_name)  )

A ERS Issue for TPCChannelMap creation failure.

Parameters
plugin_nameLog Message from the issue

◆ ERS_DECLARE_ISSUE() [24/83]

dunedaq::ERS_DECLARE_ISSUE ( dfmodules ,
DFOThresholdsNotConsistent ,
"Busy threshold ("<< busy<< ") is smaller than free threshold ("<< free<< ')' ,
((size_t) busy)((size_t) free)  )

◆ ERS_DECLARE_ISSUE() [25/83]

dunedaq::ERS_DECLARE_ISSUE ( dfmodules ,
NoTPsInWindow ,
"No TriggerPrimitives were used from a TPSet with start_time = " << tpset_start_time << ",
end_time = " << tpset_end_time << ",
TSAccumulator begin and end times:" << window_begin_time << " ,
" << window_end_time,
((daqdataformats::timestamp_t) tpset_start_time)((daqdataformats::timestamp_t) tpset_end_time)((daqdataformats::timestamp_t) window_begin_time)((daqdataformats::timestamp_t) window_end_time)  )

◆ ERS_DECLARE_ISSUE() [26/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
BadPacketHeaderIssue ,
"BadPacketHeaderIssue: \""<< ers_messg<< "\"" ,
((std::string) ers_messg)  )

Definition at line 30 of file Utils.hpp.

32 : \"" << ers_messg << "\"",
33 ((std::string)ers_messg))
34
35namespace dpdklibs {
36namespace udp {
37
38uint16_t
39get_payload_size_udp_hdr(struct rte_udp_hdr* udp_hdr);
40uint16_t
41get_payload_size(struct ipv4_udp_packet_hdr* ipv4_udp_hdr);
42
43rte_be32_t
44ip_address_dotdecimal_to_binary(uint8_t byte1, uint8_t byte2, uint8_t byte3, uint8_t byte4);
45struct ipaddr
46ip_address_binary_to_dotdecimal(rte_le32_t binary_ipv4_address);
47
48std::string
49get_ipv4_decimal_addr_str(struct ipaddr ipv4_address);
50
51char*
52get_udp_payload(const rte_mbuf* mbuf);
53
54// void dump_udp_header(struct ipv4_udp_packet_hdr * pkt);
55std::string
56get_udp_header_str(struct rte_mbuf* mbuf);
57
58std::string
59get_udp_packet_str(struct rte_mbuf* mbuf);
60
61void
62add_file_contents_to_vector(const std::string& filename, std::vector<char>& buffervec);
63
64std::vector<std::pair<const void*, int>>
65get_ethernet_packets(const std::vector<char>& buffervec);
66
67void
68set_daqethheader_test_values(detdataformats::DAQEthHeader& daqethheader_obj) noexcept;
69
70std::string
71get_rte_mbuf_str(const rte_mbuf* mbuf) noexcept;
72
73struct StreamUID
74{
75 uint64_t det_id : 6;
76 uint64_t crate_id : 10;
77 uint64_t slot_id : 4;
78 uint64_t stream_id : 8;
79
80 StreamUID() = default;
81
82 StreamUID(const detdataformats::DAQEthHeader& daq_hdr)
83 : det_id(daq_hdr.det_id)
84 , crate_id(daq_hdr.crate_id)
85 , slot_id(daq_hdr.slot_id)
86 , stream_id(daq_hdr.stream_id){};
87
88 bool operator<(const StreamUID& rhs) const { return std::tie(det_id, crate_id, slot_id, stream_id) < std::tie(rhs.det_id, rhs.crate_id, rhs.slot_id, rhs.stream_id); }
89
90 bool operator==(const StreamUID& rhs) const { return det_id == rhs.det_id && crate_id == rhs.crate_id && slot_id == rhs.slot_id && stream_id == rhs.stream_id; }
91 operator std::string() const { return fmt::format("({}, {}, {}, {})", det_id, crate_id, slot_id, stream_id); }
92};
93
94} // namespace udp
95} // namespace dpdklibs
bool operator==(const OksSystem::File &a, const OksSystem::File &b)
Definition File.cpp:857
DAQEthHeader is a versioned and unified structure for every FE electronics.

◆ ERS_DECLARE_ISSUE() [27/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
FailedToConfigureInterface ,
"Failed to configure interface["<< ifaceid<< "],
stage "<< stage<< " :"<< error,
((int) ifaceid)((std::string) stage)((int) error)  )

◆ ERS_DECLARE_ISSUE() [28/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
FailedToResetInterface ,
"Failed to reset interfce : "<< error["<< ifaceid<< "],
((int) ifaceid)((int) error)  )

◆ ERS_DECLARE_ISSUE() [29/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
FailedToRetrieveInterfaceInfo ,
"Failed to retrieve device info for interfce : "<< error["<< ifaceid<< "],
((int) ifaceid)((int) error)  )

◆ ERS_DECLARE_ISSUE() [30/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
FailedToRetrieveLinkStatus ,
"Failed to retrieve link status for interfce : "<< error["<< ifaceid<< "],
((int) ifaceid)((int) error)  )

◆ ERS_DECLARE_ISSUE() [31/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
FailedToSendData ,
"Sink ID Number of packets that failed to send: "<< count["<< sink_id<< "],
((std::string) sink_id)((int) count)  )

◆ ERS_DECLARE_ISSUE() [32/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
FailedToSetupInterface ,
"Interface setup failed: "<< error["<< ifaceid<< "],
((int) ifaceid)((int) error)  )

◆ ERS_DECLARE_ISSUE() [33/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
InvalidEALPort ,
"Interface is not a valid port: " ["<< ifaceid<< "],
((int) ifaceid)  )

◆ ERS_DECLARE_ISSUE() [34/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
LinkOffline ,
"Link offline for interface " ["<< ifaceid<< "],
((int) ifaceid)  )

◆ ERS_DECLARE_ISSUE() [35/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
MainCoreConflict ,
"The main core conflicts with the worker cores list " ["<< main_core<< "],
((int) main_core)  )

◆ ERS_DECLARE_ISSUE() [36/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
MetricPublishFailed ,
"Field "<< field<< " was not reported" ,
((std::string) field)  )

< IfaceWrapper is not copy-constructible

< IfaceWrapper is not copy-assginable

< IfaceWrapper is not move-constructible

< IfaceWrapper is not move-assignable

Definition at line 42 of file IfaceWrapper.hpp.

48 {
49
50 class IfaceWrapper : public opmonlib::MonitorableObject
51{
52public:
53 using sid_to_source_map_t = std::map<int, std::shared_ptr<SourceConcept>>;
54
55 IfaceWrapper(uint iface_id, const appmodel::DPDKReceiver* receiver,
56 const std::vector<const appmodel::NWDetDataSender*>& senders,
57 sid_to_source_map_t& sources, std::atomic<bool>& run_marker);
58 ~IfaceWrapper();
59
60 IfaceWrapper(const IfaceWrapper&) = delete;
61 IfaceWrapper& operator=(const IfaceWrapper&) = delete;
62 IfaceWrapper(IfaceWrapper&&) = delete;
63 IfaceWrapper& operator=(IfaceWrapper&&) = delete;
64
65 //void init();
66 void start();
67 void stop();
68
69 void generate_opmon_data() override;
70
71 void allocate_mbufs();
72 void setup_interface();
73 void setup_flow_steering();
74 void setup_xstats();
75
76 void enable_flow() { m_lcore_enable_flow.store(true);}
77 void disable_flow() { m_lcore_enable_flow.store(false);}
78
79 const std::vector<uint16_t>& get_rte_cores() const { return m_rte_cores; }
80
81protected:
82 //iface_conf_t m_cfg;
83 int m_iface_id;
84 std::string m_iface_id_str;
85 bool m_configured;
86
87 bool m_with_flow;
88 bool m_prom_mode;
89 std::vector<std::string> m_ip_addr;
90 std::vector<rte_be32_t> m_ip_addr_bin;
91 std::string m_mac_addr;
92 int m_socket_id;
93 int m_mtu;
94 uint16_t m_rx_ring_size;
95 uint16_t m_tx_ring_size;
96 int m_num_mbufs;
97 int m_burst_size;
98 uint32_t m_lcore_sleep_ns;
99 int m_mbuf_cache_size;
100
101private:
102 int m_num_ip_sources;
103 int m_num_rx_cores;
104 std::set<std::string> m_ips;
105 std::set<int> m_rx_qs;
106 std::set<int> m_tx_qs;
107 std::vector<uint16_t> m_rte_cores;
108
109 // CPU core ID -> [queue -> ip]
110 std::map<int, std::map<int, std::string>> m_rx_core_map;
111 unsigned m_arp_rx_queue = 0; // RS TODO: make it configurable, and queue use conf check for exclusiveness!
112
113 // Lcore stop signal
114 std::atomic<bool> m_lcore_quit_signal{ false };
115
116 std::atomic<bool> m_lcore_enable_flow{ false };
117
118 // Mbufs and pools
119 std::map<int, std::unique_ptr<rte_mempool>> m_mbuf_pools;
120 std::map<int, struct rte_mbuf **> m_bufs; // by queue
121
122 // Stats by queues
123 std::map<int, std::atomic<std::size_t>> m_num_frames_rxq;
124 std::map<int, std::atomic<std::size_t>> m_num_bytes_rxq;
125 std::map<int, std::atomic<std::size_t>> m_num_unexid_frames;
126 std::map<int, std::atomic<std::size_t>> m_num_full_bursts;
127 std::map<int, std::atomic<uint16_t>> m_max_burst_size;
128
129 // DPDK HW stats
130 dpdklibs::IfaceXstats m_iface_xstats;
131
132 // stream -> source id map indexed by queue id
133 // queue -> [stream_id -> sid]
134 std::map<int, std::map<uint, uint>> m_stream_id_to_source_id;
135 sid_to_source_map_t& m_sources;
136
137 // Run marker
138 std::atomic<bool>& m_run_marker;
139
140 // GARP
141 std::unique_ptr<rte_mempool> m_garp_mbuf_pool;
142 std::map<int, struct rte_mbuf **> m_garp_bufs;
143 std::thread m_garp_thread;
144 void garp_func();
145 std::atomic<uint64_t> m_garps_sent{0};
146
147 // ARP
148 std::unique_ptr<rte_mempool> m_arp_mbuf_pool;
149 std::map<int, struct rte_mbuf **> m_arp_bufs;
150 std::thread m_arp_thread;
151 void arp_func();
152 std::atomic<uint64_t> m_arps_sent{0};
153
154 // Lcore processor
155 int rx_runner(void *arg __rte_unused);
156 int arp_response_runner(void *arg __rte_unused);
157
158 // What to do with every payload
159 void handle_eth_payload(int src_rx_q, char* payload, std::size_t size);
160
161};
162
163} // namespace dpdklibs
MonitorableObject & operator=(const MonitorableObject &)=delete
std::atomic< bool > run_marker
Global atomic for process lifetime.

◆ ERS_DECLARE_ISSUE() [37/83]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
PacketErrors ,
"Interface "<< error<< " packet error counts: "<< count["<< id<< "],
((std::string) id)((std::string) error)((int) count)  )

◆ ERS_DECLARE_ISSUE() [38/83]

dunedaq::ERS_DECLARE_ISSUE ( fdreadoutlibs ,
PDSPeakIgnored ,
"Ignoring PDS Peak with ts = " << timestamp << ",
ch = " << channel << ",
sc_iframe = " << superchunk_iframe << " )

◆ ERS_DECLARE_ISSUE() [39/83]

dunedaq::ERS_DECLARE_ISSUE ( fdreadoutlibs ,
TPGAlgorithmInexistent ,
"The selected algorithm does not exist: "<< algorithm_selection<< " . Check your configuration file and seelect either SimpleThreshold or AbsRS." ,
((std::string) algorithm_selection)  )

◆ ERS_DECLARE_ISSUE() [40/83]

dunedaq::ERS_DECLARE_ISSUE ( flxlibs ,
CardError ,
" FELIX Card Internal Error: "<< intererror,
((std::string) intererror)  )

◆ ERS_DECLARE_ISSUE() [41/83]

FELIX Initialization std::string initerror FELIX queue timed std::string queuename dunedaq::ERS_DECLARE_ISSUE ( flxlibs ,
ChannelAlignment ,
" Channel not aligned: "<< channel,
((int) channel)  )

◆ ERS_DECLARE_ISSUE() [42/83]

FELIX Initialization std::string initerror dunedaq::ERS_DECLARE_ISSUE ( flxlibs ,
ConfigurationError ,
" FELIX Configuration Error: "<< conferror,
((std::string) conferror)  )

◆ ERS_DECLARE_ISSUE() [43/83]

FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOps couldn t push to queue !Failed std::string chunk dunedaq::ERS_DECLARE_ISSUE ( flxlibs ,
ElinkConfigurationInconsistency ,
" Inconsistent number of ELinks requested. Num links: "<< num_links,
((int) num_links)  )

◆ ERS_DECLARE_ISSUE() [44/83]

dunedaq::ERS_DECLARE_ISSUE ( hdf5libs ,
DeprecatedUsage ,
func_name<< " is deprecated. "<< message,
((std::string) func_name)((std::string) message)  )

◆ ERS_DECLARE_ISSUE() [45/83]

dunedaq::ERS_DECLARE_ISSUE ( hdf5libs ,
InvalidRecordName ,
"Record name "<< name<< " is unknown." ,
((std::string) name)  )

◆ ERS_DECLARE_ISSUE() [46/83]

dunedaq::ERS_DECLARE_ISSUE ( hermesmodules ,
InputBufferDoesNotExist ,
"Hermes Input Buffer "<< bid<< " does not exist" ,
((int) bid)  )

◆ ERS_DECLARE_ISSUE() [47/83]

dunedaq::ERS_DECLARE_ISSUE ( hermesmodules ,
LinkDoesNotExist ,
"Hermes Link "<< lid<< " does not exist" ,
((int) lid)  )

◆ ERS_DECLARE_ISSUE() [48/83]

dunedaq::ERS_DECLARE_ISSUE ( hermesmodules ,
LinkInError ,
"Hermes Link "<< link<< " is in error (err:"<< err<< ", eth_rdy:"<< eth_rdy<< ", src_rdy:"<< src_rdy<< ", udp_rdy:"<< udp_rdy<<" )" ,
((uint16_t) link)((bool) err)((bool) eth_rdy)((bool) src_rdy)((bool) udp_rdy)  )

◆ ERS_DECLARE_ISSUE() [49/83]

dunedaq::ERS_DECLARE_ISSUE ( hermesmodules ,
MagicNumberError ,
"Hermes Magic number failed "<< found<< " ("<< expected<< ")" ,
((uint32_t) found)((uint32_t) expected)  )

◆ ERS_DECLARE_ISSUE() [50/83]

dunedaq::ERS_DECLARE_ISSUE ( iomanager ,
ConnectionInstanceNotFound ,
"Connection Instance not found for name "<< name,
((std::string) name)  )

◆ ERS_DECLARE_ISSUE() [51/83]

dunedaq::ERS_DECLARE_ISSUE ( iomanager ,
NetworkMessageNotSerializable ,
"Object of type "<< type<< " is not serializable but configured for network transfer!" ,
((std::string) type)  )

◆ ERS_DECLARE_ISSUE() [52/83]

dunedaq::ERS_DECLARE_ISSUE ( iomanager ,
QueueTypeUnknown ,
"Queue type \""<< queue_type<< "\" is unknown " ,
((std::string) queue_type)  )

QueueTypeUnknown ERS Issue.

QueueTypeMismatch ERS Issue

◆ ERS_DECLARE_ISSUE() [53/83]

dunedaq::ERS_DECLARE_ISSUE ( ipm ,
UnexpectedNumberOfBytes ,
"Expected "<< bytes1<< " bytes in message but received "<< bytes2,
((int) bytes1)((int) bytes2)  )

◆ ERS_DECLARE_ISSUE() [54/83]

Cannot create std::string fatal dunedaq::ERS_DECLARE_ISSUE ( kafkaopmon ,
CannotConsumeMessage ,
"Cannot consume message : "<< error,
((std::string) error)  )

◆ ERS_DECLARE_ISSUE() [55/83]

dunedaq::ERS_DECLARE_ISSUE ( kafkaopmon ,
CannotPostToDb ,
"Cannot post to Influx DB : "<< error,
((std::string) error)  )

◆ ERS_DECLARE_ISSUE() [56/83]

dunedaq::ERS_DECLARE_ISSUE ( kafkaopmon ,
MissingParameter ,
"No "<< parameter<< " in "<< conf,
((std::string) parameter)((std::string) conf)  )

◆ ERS_DECLARE_ISSUE() [57/83]

dunedaq::ERS_DECLARE_ISSUE ( oks ,
DeprecatedFormat ,
"the file "<< file<< " contains OKS time data stored in deprecated format \'"<< data<< "\'. Please refresh it using an oks application. Support for such format will be removed in a future release." ,
((const char *) file)((const char *) data)  )

Definition at line 29 of file data.cpp.

37 {
38 // ugly reinterpret staff to convert date and time to integers
39
40void OksData::SetFast(boost::gregorian::date d)
41{
42 data.DATE = d.day_number();
43}
44
45void OksData::SetFast(boost::posix_time::ptime t)
46{
47 data.TIME = *reinterpret_cast<uint64_t*>(&t);
48}
49
50boost::gregorian::date OksData::date() const noexcept
51{
52 return boost::gregorian::date(boost::gregorian::gregorian_calendar::from_day_number(data.DATE));
53}
54
55boost::posix_time::ptime OksData::time() const noexcept
56{
57 return *reinterpret_cast<boost::posix_time::ptime*>(const_cast<uint64_t*>(&data.TIME));
58}
59
60
61inline void free_list(OksData::List& dlist)
62{
63 for(OksData::List::const_iterator i = dlist.begin(); i != dlist.end(); ++i) {
64 delete *i;
65 }
66 dlist.clear();
67}
68
69
70static bool
71operator==(const OksData::List & l1, const OksData::List & l2)
72{
73 if(&l1 == &l2) return true;
74
75 size_t l1Lenght = l1.size();
76 size_t l2Lenght = l2.size();
77
78 if(!l1Lenght && !l2Lenght) return true;
79 if(l1Lenght != l2Lenght) return false;
80
81 size_t pos = 0;
82
83 auto i1 = l1.begin();
84 auto i2 = l2.begin();
85
86 for(;i1 != l1.end(); ++i1, ++i2) {
87 OksData * d1 = *i1;
88 OksData * d2 = *i2;
89
90 if( !d1 && !d2 ) return true;
91 if( !d1 || !d2 ) return false;
92
93 if(
94 (
95 (d1->type == d2->type) &&
96 (d1->type == OksData::object_type) &&
97 (
98 (!d1->data.OBJECT && !d2->data.OBJECT) ||
99 (
100 (d1->data.OBJECT && d2->data.OBJECT) &&
101 (d1->data.OBJECT->GetClass()->get_name() == d2->data.OBJECT->GetClass()->get_name()) &&
102 (d1->data.OBJECT->GetId() == d2->data.OBJECT->GetId())
103 )
104 )
105 ) ||
106 (
107 (*d1 == *d2)
108 )
109 ) {
110 pos++;
111 continue;
112 }
113
114 return false;
115 }
116
117 return true;
118}
119
120
121bool
122OksData::operator==(const OksData& d) const {
123 return (
124 (d.type == type) &&
125 (
126 ( (type == string_type) && (*d.data.STRING == *data.STRING) ) ||
127 ( (type == u32_int_type) && (d.data.U32_INT == data.U32_INT) ) ||
128 ( (type == s32_int_type) && (d.data.S32_INT == data.S32_INT) ) ||
129 ( (type == u16_int_type) && (d.data.U16_INT == data.U16_INT) ) ||
130 ( (type == s16_int_type) && (d.data.S16_INT == data.S16_INT) ) ||
131 ( (type == s8_int_type) && (d.data.S8_INT == data.S8_INT) ) ||
132 ( (type == u8_int_type) && (d.data.U8_INT == data.U8_INT) ) ||
133 ( (type == s64_int_type) && (d.data.S64_INT == data.S64_INT) ) ||
134 ( (type == u64_int_type) && (d.data.U64_INT == data.U64_INT) ) ||
135 ( (type == float_type) && (d.data.FLOAT == data.FLOAT) ) ||
136 ( (type == double_type) && (d.data.DOUBLE == data.DOUBLE) ) ||
137 ( (type == bool_type) && (d.data.BOOL == data.BOOL) ) ||
138 ( (type == date_type) && (d.data.DATE == data.DATE) ) ||
139 ( (type == time_type) && (d.data.TIME == data.TIME) ) ||
140 ( (type == object_type) && OksObject::are_equal_fast(d.data.OBJECT, data.OBJECT) ) ||
141 ( (type == list_type) && (*d.data.LIST == *data.LIST) ) ||
142 ( (type == uid_type) && (d.data.UID.class_id->get_name() == data.UID.class_id->get_name() && *d.data.UID.object_id == *data.UID.object_id) ) ||
143 ( (type == uid2_type) && (*d.data.UID2.class_id == *data.UID2.class_id && *d.data.UID2.object_id == *data.UID2.object_id) ) ||
144 ( (type == enum_type) && (*d.data.ENUMERATION == *data.ENUMERATION) ) ||
145 ( (type == class_type) && (d.data.CLASS->get_name() == data.CLASS->get_name()) )
146 )
147 );
148}
149
150bool
151OksData::operator!=(const OksData& d) const {
152 return ( (d == *this) ? false : true );
153}
154
155
156static bool
157test_comparable(OksData::Type type1, OksData::Type type2)
158{
159 const char * fname = "OksData::operator[<|<=|>|>=](const OksData&) const";
160 const char * h3 = "Can't compare ";
161
162 if(type1 != type2 && !(OksData::is_object(type1) && OksData::is_object(type2))) {
163 Oks::error_msg(fname) << h3 << "OKS data of different types\n";
164 return false;
165 }
166 else if(type1 == OksData::list_type) {
167 Oks::error_msg(fname) << h3 << "lists\n";
168 return false;
169 }
170
171 return true;
172}
173
174const std::string&
175OksData::__oid() const
176{
177 if(type == object_type)
178 return data.OBJECT->uid.object_id;
179 else if(type == uid_type)
180 return *data.UID.object_id;
181 else
182 return *data.UID2.object_id;
183}
184
185const std::string&
186OksData::__cn() const
187{
188 if(type == object_type)
189 return data.OBJECT->uid.class_id->get_name();
190 else if(type == uid_type)
191 return data.UID.class_id->get_name();
192 else
193 return *data.UID2.class_id;
194}
195
196#define CMP_OBJ( OP, c1, c2, id1, id2 ) (c1 OP c2) || (!(c2 OP c1) && id1 OP id2)
197
198#define CMP_DATA( OP ) \
199 switch(type) { \
200 case string_type: return (*data.STRING OP *d.data.STRING); \
201 case u32_int_type: return (data.U32_INT OP d.data.U32_INT); \
202 case s32_int_type: return (data.S32_INT OP d.data.S32_INT); \
203 case u16_int_type: return (data.U16_INT OP d.data.U16_INT); \
204 case s16_int_type: return (data.S16_INT OP d.data.S16_INT); \
205 case s8_int_type: return (data.S8_INT OP d.data.S8_INT); \
206 case u8_int_type: return (data.U8_INT OP d.data.U8_INT); \
207 case s64_int_type: return (data.S64_INT OP d.data.S64_INT); \
208 case u64_int_type: return (data.U64_INT OP d.data.U64_INT); \
209 case float_type: return (data.FLOAT OP d.data.FLOAT); \
210 case double_type: return (data.DOUBLE OP d.data.DOUBLE); \
211 case bool_type: return (data.BOOL OP d.data.BOOL); \
212 case date_type: return (data.DATE OP d.data.DATE); \
213 case time_type: return (data.TIME OP d.data.TIME); \
214 case enum_type: return (*data.ENUMERATION OP *d.data.ENUMERATION); \
215 case class_type: return (data.CLASS->get_name() OP d.data.CLASS->get_name()); \
216 case object_type: \
217 case uid_type: \
218 case uid2_type: \
219 return CMP_OBJ ( OP, __cn(), d.__cn(), __oid(), d.__oid() ); \
220 default: return false; \
221 }
222
223
224bool OksData::is_le(const OksData &d) const noexcept
225{
226 CMP_DATA( <= )
227}
228
229bool OksData::is_ge(const OksData &d) const noexcept
230{
231 CMP_DATA( >= )
232}
233
234bool OksData::is_l(const OksData &d) const noexcept
235{
236 CMP_DATA( < )
237}
238
239bool OksData::is_g(const OksData &d) const noexcept
240{
241 CMP_DATA( > )
242}
243
244
245bool
246OksData::operator<=(const OksData& d) const {
247 if(test_comparable(type, d.type) == false) return false;
248 return is_le(d);
249}
250
251
252bool
253OksData::operator>=(const OksData& d) const {
254 if(test_comparable(type, d.type) == false) return false;
255 return is_ge(d);
256}
257
258
259bool
260OksData::operator>(const OksData& d) const {
261 if(test_comparable(type, d.type) == false) return false;
262 return is_g(d);
263}
264
265
266bool
267OksData::operator<(const OksData& d) const {
268 if(test_comparable(type, d.type) == false) return false;
269 return is_l(d);
270}
271
272
273void
274OksData::copy(const OksData & d)
275{
276 type = d.type;
277
278 if(type == list_type) {
279 data.LIST = new List();
280
281 for(List::iterator i = d.data.LIST->begin(); i != d.data.LIST->end(); ++i) {
282 OksData *d2 = new OksData();
283 *d2 = *(*i);
284 data.LIST->push_back(d2);
285 }
286 }
287 else if(type == string_type) data.STRING = new OksString(*d.data.STRING);
288 else if(type == object_type) data.OBJECT = d.data.OBJECT; // Don't allow deep copy for objects
289 else if(type == u32_int_type) data.U32_INT = d.data.U32_INT;
290 else if(type == s32_int_type) data.S32_INT = d.data.S32_INT;
291 else if(type == u16_int_type) data.U16_INT = d.data.U16_INT;
292 else if(type == s16_int_type) data.S16_INT = d.data.S16_INT;
293 else if(type == double_type) data.DOUBLE = d.data.DOUBLE;
294 else if(type == float_type) data.FLOAT = d.data.FLOAT;
295 else if(type == s8_int_type) data.S8_INT = d.data.S8_INT;
296 else if(type == u8_int_type) data.U8_INT = d.data.U8_INT;
297 else if(type == s64_int_type) data.S64_INT = d.data.S64_INT;
298 else if(type == u64_int_type) data.U64_INT = d.data.U64_INT;
299 else if(type == class_type) data.CLASS = d.data.CLASS;
300 else if(type == uid2_type) {
301 data.UID2.class_id = new OksString(*d.data.UID2.class_id);
302 data.UID2.object_id = new OksString(*d.data.UID2.object_id);
303 }
304 else if(type == uid_type) {
305 data.UID.class_id = d.data.UID.class_id;
306 data.UID.object_id = new OksString(*d.data.UID.object_id);
307 }
308 else if(type == bool_type) data.BOOL = d.data.BOOL;
309 else if(type == date_type) data.DATE = d.data.DATE;
310 else if(type == time_type) data.TIME = d.data.TIME;
311 else if(type == enum_type) data.ENUMERATION = d.data.ENUMERATION;
312}
313
314
315std::ostream&
316operator<<(std::ostream& s, const OksData & d)
317{
318 switch (d.type) {
319 case OksData::list_type: {
320 s << '(';
321 for(OksData::List::iterator i = d.data.LIST->begin(); i != d.data.LIST->end(); ++i) {
322 s << *(*i);
323 if((*i) != d.data.LIST->back()) s << ", ";
324 }
325 s << ')';
326 break; }
327
328 case OksData::string_type:
329 s << '\"' << *(d.data.STRING) << '\"';
330 break;
331
332 case OksData::object_type:
333 if(d.data.OBJECT)
334 s << '[' << d.data.OBJECT->GetId() << '@' << d.data.OBJECT->GetClass()->get_name() << ']';
335 else
336 s << "[NIL]";
337
338 break;
339
340 case OksData::uid2_type:
341 s << '#' << '[' << *d.data.UID2.object_id << '@' << *d.data.UID2.class_id << ']';
342 break;
343
344 case OksData::uid_type:
345 s << '#' << '[' << *d.data.UID.object_id << '@' << d.data.UID.class_id->get_name() << ']';
346 break;
347
348 case OksData::s32_int_type:
349 s << d.data.S32_INT;
350 break;
351
352 case OksData::u32_int_type:
353 s << d.data.U32_INT;
354 break;
355
356 case OksData::s16_int_type:
357 s << d.data.S16_INT;
358 break;
359
360 case OksData::u16_int_type:
361 s << d.data.U16_INT;
362 break;
363
364 case OksData::float_type: {
365 std::streamsize p = s.precision();
366 s.precision(std::numeric_limits< float >::digits10);
367 s << d.data.FLOAT;
368 s.precision(p);
369 break; }
370
371 case OksData::double_type: {
372 std::streamsize p = s.precision();
373 s.precision(std::numeric_limits< double >::digits10);
374 s << d.data.DOUBLE;
375 s.precision(p);
376 break; }
377
378 case OksData::s8_int_type:
379 s << static_cast<int16_t>(d.data.S8_INT);
380 break;
381
382 case OksData::u8_int_type:
383 s << static_cast<uint16_t>(d.data.U8_INT);
384 break;
385
386 case OksData::s64_int_type:
387 s << d.data.S64_INT;
388 break;
389
390 case OksData::u64_int_type:
391 s << d.data.U64_INT;
392 break;
393
394 case OksData::bool_type:
395 s << ( (d.data.BOOL == true) ? "true" : "false" );
396 break;
397
398 case OksData::date_type:
399 s << boost::gregorian::to_simple_string(d.date());
400 break;
401
402 case OksData::time_type:
403 s << boost::posix_time::to_simple_string(d.time());
404 break;
405
406 case OksData::enum_type:
407 s << '\"' << *(d.data.ENUMERATION) << '\"';
408 break;
409
410 case OksData::class_type:
411 s << '[' << d.data.CLASS->get_name() << ']';
412 break;
413
414 case OksData::unknown_type:
415 Oks::error_msg("operator<<(ostream&, const OksData&)")
416 << "Can't put to stream \'OksData::unknown_type\'";
417 break;
418 }
419
420 return s;
421}
422
423
424void
425OksData::Clear()
426{
427 if(type >= string_type) {
428 switch(type) {
429 case list_type:
430 if(List * dlist = data.LIST) {
431 if(!dlist->empty()) {
432 free_list(*dlist);
433 }
434 delete dlist;
435 }
436 break;
437
438 case string_type:
439 if(data.STRING) { delete data.STRING; }
440 break;
441
442 case uid2_type:
443 if(data.UID2.object_id) { delete data.UID2.object_id; }
444 if(data.UID2.class_id) { delete data.UID2.class_id; }
445 break;
446
447 case uid_type:
448 if(data.UID.object_id) { delete data.UID.object_id; }
449 break;
450
451 default:
452 /* Make compiler happy */
453 break;
454 }
455 }
456
457 type = unknown_type;
458}
459
460 std::string
461 AttributeRangeError::fill(const OksData * d, const std::string& range)
462 {
463 std::ostringstream s;
464 s << "value ";
465 if (d->type == OksData::string_type || d->type == OksData::enum_type)
466 s << *d;
467 else
468 s << '\'' << *d << '\'';
469 s << " is out of range \'" << range << '\'';
470 return s.str();
471 }
472
473 std::string
474 AttributeReadError::fill(const char * value, const char * type, const std::string& reason)
475 {
476 std::ostringstream s;
477
478 if(value) { s << "string \'" << value << '\''; }
479 else { s << "empty string"; }
480
481 s << " is not a valid value for \'" << type << "\' type";
482
483 if(!reason.empty()) s << ":\n" << reason;
484
485 return s.str();
486 }
487
488 std::string
489 AttributeReadError::fill(const char * type, const std::string& reason)
490 {
491 std::ostringstream s;
492
493 s << "the string is not a valid value for \'" << type << "\' type";
494
495 if(!reason.empty()) s << ":\n" << reason;
496
497 return s.str();
498 }
499
500
501void
502OksData::check_range(const OksAttribute * a) const
503{
504 if (a->p_range_obj == nullptr)
505 return;
506
507 if (type == list_type)
508 {
509 if (data.LIST)
510 {
511 for (const auto& i : *data.LIST)
512 {
513 i->check_range(a);
514 }
515 }
516 }
517 else
518 {
519 if (a->p_range_obj->validate(*this) == false)
520 {
521 throw AttributeRangeError(this, a->get_range());
522 }
523 }
524}
525
526void
527OksData::SetNullValue(const OksAttribute * a)
528{
529 switch(type) {
530 case s8_int_type: data.S8_INT = 0; return;
531 case u8_int_type: data.U8_INT = 0; return;
532 case bool_type: data.BOOL = false; return;
533 case u32_int_type: data.U32_INT = 0L; return;
534 case s32_int_type: data.S32_INT = 0L; return;
535 case s16_int_type: data.S16_INT = 0; return;
536 case u16_int_type: data.U16_INT = 0; return;
537 case s64_int_type: data.S64_INT = (int64_t)(0); return;
538 case u64_int_type: data.U64_INT = (uint64_t)(0); return;
539 case float_type: data.FLOAT = (float)(.0); return;
540 case double_type: data.DOUBLE = (double)(.0); return;
541 case string_type: data.STRING = new OksString(); return;
542 case enum_type: data.ENUMERATION = &((*(a->p_enumerators))[0]); return; // first value
543 case class_type: data.CLASS = a->p_class; return; // some class
544 case date_type: SetFast(boost::gregorian::day_clock::universal_day()); return;
545 case time_type: SetFast(boost::posix_time::second_clock::universal_time()); return;
546 default: Clear2(); throw AttributeReadError("", "non-attribute-type", "internal OKS error");
547 }
548}
549
550
551void
552OksData::SetValue(const char * s, const OksAttribute * a)
553{
554 if(*s == '\0') {
555 SetNullValue(a);
556 }
557 else {
558 switch(type) {
559 case s8_int_type: data.S8_INT = static_cast<int8_t>(strtol(s, 0, 0)); return;
560 case u8_int_type: data.U8_INT = static_cast<uint8_t>(strtoul(s, 0, 0)); return;
561 case bool_type: switch(strlen(s)) {
562 case 4: data.BOOL = (cmp_str4n(s, "true") || cmp_str4n(s, "TRUE") || cmp_str4n(s, "True")); return;
563 case 1: data.BOOL = (*s == 't' || *s == 'T' || *s == '1'); return;
564 default: data.BOOL = false; return;
565 }
566 case u32_int_type: data.U32_INT = static_cast<uint32_t>(strtoul(s, 0, 0)); return;
567 case s32_int_type: data.S32_INT = static_cast<int32_t>(strtol(s, 0, 0)); return;
568 case s16_int_type: data.S16_INT = static_cast<int16_t>(strtol(s, 0, 0)); return;
569 case u16_int_type: data.U16_INT = static_cast<uint16_t>(strtoul(s, 0, 0)); return;
570 case s64_int_type: data.S64_INT = static_cast<int64_t>(strtoll(s, 0, 0)); return;
571 case u64_int_type: data.U64_INT = static_cast<uint64_t>(strtoull(s, 0, 0)); return;
572 case float_type: data.FLOAT = strtof(s, 0); return;
573 case double_type: data.DOUBLE = strtod(s, 0); return;
574
575 case string_type: data.STRING = new OksString(s); return;
576 case enum_type: try {
577 data.ENUMERATION = a->get_enum_value(s, strlen(s)); return;
578 }
579 catch(std::exception& ex) {
580 throw AttributeReadError(s, "enum", ex.what());
581 }
582 case date_type: try {
583 if(strchr(s, '-') || strchr(s, '/')) {
584 SetFast(boost::gregorian::from_simple_string(s)); return;
585 }
586 else {
587 SetFast(boost::gregorian::from_undelimited_string(s)); return;
588 }
589 }
590 catch(std::exception& ex) {
591 throw AttributeReadError(s, "date", ex.what());
592 }
593 case time_type: try {
594 if(strlen(s) == 15 && s[8] == 'T') {
595 SetFast(boost::posix_time::from_iso_string(s)); return;
596 }
597 else {
598 SetFast(boost::posix_time::time_from_string(s)); return;
599 }
600 }
601 catch(std::exception& ex) {
602 throw AttributeReadError(s, "time", ex.what());
603 }
604 case class_type: if(OksClass * c = a->p_class->get_kernel()->find_class(s)) {
605 data.CLASS = c; return;
606 }
607 else {
608 Clear2(); throw AttributeReadError(s, "class", "the value is not a name of valid OKS class");
609 }
610 default: Clear2(); throw AttributeReadError(s, "non-attribute-type", "internal OKS error");
611 }
612 }
613
614}
615
616
617std::list<std::string>
618OksAttribute::get_init_values() const
619{
620 std::list<std::string> val;
621
622 // check, if the attribute is multi-value
623 if(get_is_multi_values() == true) {
624 OksData d;
625 d.SetValues(get_init_value().c_str(), this);
626
627 for(OksData::List::const_iterator i = d.data.LIST->begin(); i != d.data.LIST->end(); ++i) {
628 val.push_back((*i)->str());
629 }
630 }
631
632 return val;
633}
634
635
636void
637OksData::SetValues(const char *s, const OksAttribute *a)
638{
639 if( !a->get_is_multi_values() ) {
640 ReadFrom(s, a->get_data_type(), a);
641 return;
642 }
643
644 if(type != list_type) {
645 Set(new List());
646 }
647 else if(!data.LIST->empty()) {
648 free_list(*data.LIST);
649 }
650
651 if( !s ) return;
652 while( *s == ' ' ) s++;
653 if( *s == '\0' ) return;
654
655 std::string str(s);
656
657 while( str.length() ) {
658 while( str.length() && str[0] == ' ') str.erase(0, 1);
659 if( !str.length() ) return;
660 char delimeter = (
661 str[0] == '\"' ? '\"' :
662 str[0] == '\'' ? '\'' :
663 str[0] == '`' ? '`' :
664 ','
665 );
666
667 if(delimeter != ',') str.erase(0, 1);
668 std::string::size_type p = str.find(delimeter);
669
670 OksData *d = new OksData();
671 d->type = a->get_data_type();
672
673 if(d->type == OksData::string_type) {
674 d->data.STRING = new OksString(str, p);
675 }
676 else if(d->type == OksData::enum_type) {
677 std::string token(str, 0, p);
678 d->data.ENUMERATION = a->get_enum_value(token); // FIXME, create more efficient using compare(idx, len ,str)
679 }
680 else {
681 std::string token(str, 0, p);
682 d->SetValue(token.c_str(), a);
683 }
684
685 data.LIST->push_back(d);
686
687 str.erase(0, p);
688 if(str.length()) {
689 if(delimeter != ',') {
690 p = str.find(',');
691 if( p == std::string::npos )
692 p = str.length();
693 else
694 p++;
695 str.erase(0, p);
696 }
697 else
698 str.erase(0, 1);
699 }
700 }
701}
702
703
704void
705OksData::ReadFrom(const OksRelationship *r) noexcept
706{
707 if(r->get_high_cardinality_constraint() != OksRelationship::Many) {
708 Set((OksObject *)0);
709 }
710 else {
711 Set(new List());
712 }
713}
714
715
716void
717OksXmlInputStream::get_num_token(char __last)
718{
719 size_t pos(1);
720
721 try {
722 char c = get_first_non_empty();
723
724 if(c == __last) {
725 m_cvt_char->m_buf[0] = 0;
726 throw std::runtime_error("empty numeric value");
727 }
728
729 m_cvt_char->m_buf[0] = c;
730
731 while(true) {
732 c = get();
733
734 if(c == __last) {
735 m_cvt_char->m_buf[pos] = '\0';
736 f->unget();
737 return;
738 }
739 else if(c == ' ' || c == '\n' || c == '\r' || c == '\t') {
740 m_cvt_char->m_buf[pos] = '\0';
741 return;
742 }
743
744 m_cvt_char->realloc(pos);
745 m_cvt_char->m_buf[pos++] = c;
746 }
747 }
748 catch(std::exception& ex) {
749 m_cvt_char->m_buf[pos] = '\0';
750 throw BadFileData(std::string("failed to read numeric value: ") + ex.what(), line_no, line_pos);
751 }
752}
753
754void
755OksData::read(const ReadFileParams& read_params, const OksAttribute * a, /*atype,*/ int32_t num)
756{
757 if(type != list_type) {
758 Set(new List());
759 }
760 else if(!data.LIST->empty()) {
761 free_list(*data.LIST);
762 }
763
764 while(num-- > 0) {
765 data.LIST->push_back(new OksData(read_params, a));
766 }
767}
768
769
770void
771OksData::read(const ReadFileParams& read_params, const OksAttribute *a)
772{
773 const char * read_value=""; // is used for report in case of exception
774 char * __sanity;
775 OksXmlInputStream& fxs(read_params.s);
776
777 try {
778 switch(a->get_data_type()) {
779 case string_type:
780 read_value = "quoted string";
781 {
782 size_t len = fxs.get_quoted();
783 if(type == string_type && data.STRING) {
784 data.STRING->assign(fxs.get_xml_token().m_buf, len);
785 }
786 else {
787 Clear();
788 type = string_type;
789 data.STRING = new OksString(fxs.get_xml_token().m_buf, len);
790 }
791 }
792 break;
793
794 case s32_int_type:
795 read_value = "signed 32 bits integer";
796 fxs.get_num_token('<');
797 Set(static_cast<int32_t>(strtol(fxs.m_cvt_char->m_buf, &__sanity, 0)));
798 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtol", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
799 break;
800
801 case u32_int_type:
802 read_value = "unsigned 32 bits integer";
803 fxs.get_num_token('<');
804 Set(static_cast<uint32_t>(strtoul(fxs.m_cvt_char->m_buf, &__sanity, 0)));
805 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoul", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
806 break;
807
808 case s16_int_type:
809 read_value = "signed 16 bits integer";
810 fxs.get_num_token('<');
811 Set(static_cast<int16_t>(strtol(fxs.m_cvt_char->m_buf, &__sanity, 0)));
812 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtol", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
813 break;
814
815 case u16_int_type:
816 read_value = "unsigned 16 bits integer";
817 fxs.get_num_token('<');
818 Set(static_cast<uint16_t>(strtoul(fxs.m_cvt_char->m_buf, &__sanity, 0)));
819 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoul", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
820 break;
821
822 case s8_int_type:
823 read_value = "signed 8 bits integer";
824 fxs.get_num_token('<');
825 Set(static_cast<int8_t>(strtol(fxs.m_cvt_char->m_buf, &__sanity, 0)));
826 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtol", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
827 break;
828
829 case u8_int_type:
830 read_value = "unsigned 8 bits integer";
831 fxs.get_num_token('<');
832 Set(static_cast<uint8_t>(strtoul(fxs.m_cvt_char->m_buf, &__sanity, 0)));
833 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoul", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
834 break;
835
836 case s64_int_type:
837 read_value = "signed 64 bits integer";
838 fxs.get_num_token('<');
839 Set(static_cast<int64_t>(strtoll(fxs.m_cvt_char->m_buf, &__sanity, 0)));
840 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoll", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
841 break;
842
843 case u64_int_type:
844 read_value = "unsigned 64 bits integer";
845 fxs.get_num_token('<');
846 Set(static_cast<uint64_t>(strtoull(fxs.m_cvt_char->m_buf, &__sanity, 0)));
847 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoull", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
848 break;
849
850 case float_type:
851 read_value = "float";
852 fxs.get_num_token('<');
853 Set(strtof(fxs.m_cvt_char->m_buf, &__sanity));
854 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtof", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
855 break;
856
857 case double_type:
858 read_value = "double";
859 fxs.get_num_token('<');
860 Set(strtod(fxs.m_cvt_char->m_buf, &__sanity));
861 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtod", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
862 break;
863
864 case bool_type:
865 read_value = "boolean";
866 fxs.get_num_token('<');
867 Set(static_cast<bool>(strtol(fxs.m_cvt_char->m_buf, &__sanity, 0)));
868 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtol", __sanity, fxs.m_cvt_char->m_buf, fxs.line_no, fxs.line_pos);
869 break;
870
871 case date_type:
872 read_value = "quoted date string";
873 {
874 size_t len = fxs.get_quoted();
875 Set(str2date(fxs.get_xml_token().m_buf, len));
876 }
877 break;
878
879 case time_type:
880 read_value = "quoted time string";
881 {
882 size_t len = fxs.get_quoted();
883 Set(str2time(fxs.get_xml_token().m_buf, len));
884 }
885 break;
886
887 case enum_type:
888 read_value = "quoted enum string";
889 {
890 size_t len = fxs.get_quoted();
891 SetE(fxs.get_xml_token().m_buf, len, a);
892 }
893 break;
894
895 case uid2_type:
896 read_value = "two quoted class-name / object-id strings";
897 Set(new OksString(), new OksString());
898 {
899 size_t len = fxs.get_quoted();
900 data.UID2.class_id->assign(fxs.get_xml_token().m_buf, len);
901 len = fxs.get_quoted();
902 data.UID2.object_id->assign(fxs.get_xml_token().m_buf, len);
903 }
904 break;
905
906 case class_type:
907 read_value = "quoted class-type string";
908 type = class_type;
909 fxs.get_quoted();
910 SetValue(fxs.get_xml_token().m_buf, a);
911 break;
912
913 default:
914 type = unknown_type;
915 {
916 std::ostringstream s;
917 s << "Unknown attribute type \"" << (int)a->get_data_type() << "\" (line " << fxs.get_line_no() << ", char " << fxs.get_line_pos() << ')';
918 throw std::runtime_error( s.str().c_str() );
919 }
920 }
921 }
922 catch (exception & e) {
923 throw FailedRead(read_value, e);
924 }
925 catch (std::exception & e) {
926 throw FailedRead(read_value, e.what());
927 }
928}
929
930
931void
932OksData::read(const OksAttribute *a, const OksXmlValue& value)
933{
934 const char * read_value=""; // is used for report in case of exception
935 char * __sanity;
936
937 try {
938 switch(a->get_data_type()) {
939 case string_type:
940 {
941 if(type == string_type && data.STRING) {
942 data.STRING->assign(value.buf(), value.len());
943 }
944 else {
945 Clear();
946 type = string_type;
947 data.STRING = new OksString(value.buf(), value.len());
948 }
949 }
950 break;
951
952 case s32_int_type:
953 read_value = "signed 32 bits integer";
954 Set(static_cast<int32_t>(strtol(value.buf(), &__sanity, 0)));
955 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtol", __sanity, value.buf(), value.line_no(), value.line_pos());
956 break;
957
958 case u32_int_type:
959 read_value = "unsigned 32 bits integer";
960 Set(static_cast<uint32_t>(strtoul(value.buf(), &__sanity, 0)));
961 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoul", __sanity, value.buf(), value.line_no(), value.line_pos());
962 break;
963
964 case s16_int_type:
965 read_value = "signed 16 bits integer";
966 Set(static_cast<int16_t>(strtol(value.buf(), &__sanity, 0)));
967 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtol", __sanity, value.buf(), value.line_no(), value.line_pos());
968 break;
969
970 case u16_int_type:
971 read_value = "unsigned 16 bits integer";
972 Set(static_cast<uint16_t>(strtoul(value.buf(), &__sanity, 0)));
973 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoul", __sanity, value.buf(), value.line_no(), value.line_pos());
974 break;
975
976 case s8_int_type:
977 read_value = "signed 8 bits integer";
978 Set(static_cast<int8_t>(strtol(value.buf(), &__sanity, 0)));
979 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtol", __sanity, value.buf(), value.line_no(), value.line_pos());
980 break;
981
982 case u8_int_type:
983 read_value = "unsigned 8 bits integer";
984 Set(static_cast<uint8_t>(strtoul(value.buf(), &__sanity, 0)));
985 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoul", __sanity, value.buf(), value.line_no(), value.line_pos());
986 break;
987
988 case s64_int_type:
989 read_value = "signed 64 bits integer";
990 Set(static_cast<int64_t>(strtoll(value.buf(), &__sanity, 0)));
991 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoll", __sanity, value.buf(), value.line_no(), value.line_pos());
992 break;
993
994 case u64_int_type:
995 read_value = "unsigned 64 bits integer";
996 Set(static_cast<uint64_t>(strtoull(value.buf(), &__sanity, 0)));
997 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtoull", __sanity, value.buf(), value.line_no(), value.line_pos());
998 break;
999
1000 case float_type:
1001 read_value = "float";
1002 Set(strtof(value.buf(), &__sanity));
1003 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtof", __sanity, value.buf(), value.line_no(), value.line_pos());
1004 break;
1005
1006 case double_type:
1007 read_value = "double";
1008 Set(strtod(value.buf(), &__sanity));
1009 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtod", __sanity, value.buf(), value.line_no(), value.line_pos());
1010 break;
1011
1012 case bool_type:
1013 read_value = "boolean";
1014 Set(static_cast<bool>(strtol(value.buf(), &__sanity, 0)));
1015 if( __builtin_expect((*__sanity != 0 || errno == ERANGE), 0) ) OksXmlInputStream::__throw_strto("strtol", __sanity, value.buf(), value.line_no(), value.line_pos());
1016 break;
1017
1018 case date_type:
1019 read_value = "quoted date string";
1020 Set(str2date(value.buf(), value.len()));
1021 break;
1022
1023 case time_type:
1024 read_value = "quoted time string";
1025 Set(str2time(value.buf(), value.len()));
1026 break;
1027
1028 case enum_type:
1029 read_value = "quoted enum string";
1030 SetE(value.buf(), value.len(), a);
1031 break;
1032
1033 case uid2_type:
1034 read_value = "two quoted class-name / object-id strings";
1035 {
1036 std::ostringstream s;
1037 s << "Unexpected uid2 type at (line " << value.line_no() << ", char " << value.line_pos() << ')';
1038 throw std::runtime_error( s.str().c_str() );
1039 }
1040 break;
1041
1042 case class_type:
1043 read_value = "quoted class-type string";
1044 type = class_type;
1045 SetValue(value.buf(), a);
1046 break;
1047
1048 default:
1049 type = unknown_type;
1050 {
1051 std::ostringstream s;
1052 s << "Unknown attribute type \"" << (int)a->get_data_type() << "\" (line " << value.line_no() << ", char " << value.line_pos() << ')';
1053 throw std::runtime_error( s.str().c_str() );
1054 }
1055 }
1056 }
1057 catch (exception & e) {
1058 throw FailedRead(read_value, e);
1059 }
1060 catch (std::exception & e) {
1061 throw FailedRead(read_value, e.what());
1062 }
1063}
1064
1065void
1066OksData::read(const OksAttribute *a, const ReadFileParams& read_params)
1067{
1068 if (type != list_type)
1069 Set(new List());
1070 else if (!data.LIST->empty())
1071 free_list(*data.LIST);
1072
1073 while (true)
1074 try
1075 {
1076 const char * tag_start = read_params.s.get_tag_start();
1077
1078 // check for closing tag
1079 if (*tag_start == '/' && cmp_str5n(tag_start+1, OksObject::attribute_xml_tag))
1080 break;
1081
1082 if (cmp_str4(tag_start, OksObject::data_xml_tag))
1083 {
1084 {
1085 OksXmlAttribute attr(read_params.s);
1086
1087 if (cmp_str3(attr.name(), OksObject::value_xml_attribute))
1088 {
1089 OksXmlValue value(read_params.s.get_value(attr.p_value_len));
1090 data.LIST->push_back(new OksData(a, value));
1091 }
1092 else
1093 {
1094 std::ostringstream s;
1095 s << "Unexpected attribute \"" << attr.name() << "\" instead of \"" << OksObject::value_xml_attribute << "\" (line " << read_params.s.get_line_no() << ", char " << read_params.s.get_line_pos() << ')';
1096 throw std::runtime_error(s.str().c_str());
1097 }
1098 }
1099 {
1100 OksXmlAttribute attr(read_params.s);
1101
1102 if (cmp_str1(attr.name(), "/") == false)
1103 {
1104 std::ostringstream s;
1105 s << "Unexpected tag \"" << attr.name() << "\" instead of close tag (line " << read_params.s.get_line_no() << ", char " << read_params.s.get_line_pos() << ')';
1106 throw std::runtime_error(s.str().c_str());
1107 }
1108 }
1109 }
1110 else
1111 {
1112 std::ostringstream s;
1113 s << "Unexpected tag \"" << tag_start << "\" (line " << read_params.s.get_line_no() << ", char " << read_params.s.get_line_pos() << ')';
1114 throw std::runtime_error(s.str().c_str());
1115 }
1116 }
1117 catch (exception & e)
1118 {
1119 throw FailedRead("multi-value", e);
1120 }
1121 catch (std::exception & e)
1122 {
1123 throw FailedRead("multi-value", e.what());
1124 }
1125}
1126
1127void
1128OksData::read(const ReadFileParams& read_params, const OksRelationship * r, int32_t num)
1129{
1130 if( __builtin_expect((type != list_type), 0) ) {
1131 Set(new List());
1132 }
1133 else if( __builtin_expect((!data.LIST->empty()), 0) ) {
1134 free_list(*data.LIST);
1135 }
1136
1137 while(num-- > 0) {
1138 OksData * d = new OksData(read_params, r);
1139
1140 // ignore dangling objects saved previously
1141 if( __builtin_expect((d->type == OksData::uid2_type && d->data.UID2.class_id->empty()), 0) ) continue;
1142
1143 // add real object
1144 data.LIST->push_back(d);
1145 }
1146}
1147
1148void
1149OksData::read(const ReadFileParams& read_params, const OksRelationship * r)
1150{
1151 const OksClass * rel_class(r->p_class_type); // class of relationship
1152 OksString * class_id(0); // class-name of read object
1153 const OksClass * c(0); // class of read object
1154 OksXmlInputStream& fxs(read_params.s);
1155
1156 try {
1157
1158 // read class name from stream and store it either on 'c' (pointer-to-class) or new OksString
1159
1160 size_t len = fxs.get_quoted();
1161
1162 if( __builtin_expect((len > 0), 1) ) {
1163 if( __builtin_expect((!read_params.alias_table), 1) ) {
1164 if( __builtin_expect((rel_class != 0), 1) ) {
1165 c = rel_class->get_kernel()->find_class(fxs.get_xml_token().m_buf);
1166 }
1167
1168 if( __builtin_expect((c == 0), 0) ) {
1169 class_id = new OksString(fxs.get_xml_token().m_buf, len);
1170 }
1171 }
1172 else {
1173 const char * class_name_str(fxs.get_xml_token().m_buf);
1174
1175 if(class_name_str[0] == '@') {
1176 class_name_str++;
1177 len--;
1178
1179 c = ( rel_class ? rel_class->get_kernel()->find_class(class_name_str) : 0 );
1180
1181 if(c) {
1182 read_params.alias_table->add_value(0, c);
1183 }
1184 else {
1185 read_params.alias_table->add_value(new OksString(class_name_str, len), 0);
1186 }
1187 }
1188 else {
1189 if(rel_class) {
1190 if(const OksAliasTable::Value * value = read_params.alias_table->get(class_name_str)) {
1191 c = (
1192 value->class_ptr
1193 ? value->class_ptr
1194 : rel_class->get_kernel()->find_class(*value->class_name)
1195 );
1196 }
1197 else {
1198 Oks::warning_msg("OksData::read(const ReadFileParams&, const OksRelationship*")
1199 << " Can't find alias for class \'" << class_name_str << "\'\n"
1200 " Possibly data file has been saved in old format\n";
1201
1202 c = rel_class->get_kernel()->find_class(class_name_str);
1203 }
1204 }
1205 }
1206
1207 if(!c) {
1208 class_id = new OksString(class_name_str, len);
1209 }
1210 }
1211 }
1212
1213
1214 // read object id from stream and try to find OksObject
1215
1216 len = fxs.get_quoted();
1217
1218 if( __builtin_expect((c == 0), 0) ) {
1219 if(class_id) {
1220 Set(class_id, new OksString(fxs.get_xml_token().m_buf, len));
1221 class_id = 0;
1222 }
1223 else {
1224 Set((OksObject *)0);
1225 }
1226
1227 goto final;
1228 }
1229
1230
1231 std::string& obj_id((const_cast<ReadFileParams&>(read_params)).tmp); // use temporal string for fast assignment
1232 obj_id.assign(fxs.get_xml_token().m_buf, len);
1233 OksObject * obj = c->get_object(obj_id);
1234
1235 if(!obj) {
1236 Set(c, new OksString(obj_id));
1237 goto final;
1238 }
1239
1240
1241 // final checks
1242
1243 read_params.owner->OksObject::check_class_type(r, c);
1244 Set(obj);
1245 obj->add_RCR(read_params.owner, r);
1246 }
1247 catch(exception& ex) {
1248 if(class_id) delete class_id;
1249 throw FailedRead("relationship value", ex);
1250 }
1251 catch (std::exception & ex) {
1252 if(class_id) delete class_id;
1253 throw FailedRead("relationship value", ex.what());
1254 }
1255
1256final:
1257
1258 IsConsistent(r, read_params.owner, "WARNING");
1259
1260}
1261
1262
1263void
1264OksData::read(const OksRelationship * r, const OksXmlRelValue& value)
1265{
1266 try
1267 {
1268 if (__builtin_expect((value.m_class == nullptr), 0))
1269 {
1270 if (value.m_class_id)
1271 {
1272 Set(value.m_class_id, new OksString(value.m_value.buf(), value.m_value.len()));
1273 value.m_class_id = nullptr;
1274 }
1275 else
1276 {
1277 Set((OksObject *) nullptr);
1278 }
1279
1280 goto final;
1281 }
1282
1283 OksObject * obj = value.m_class->get_object(value.m_value.buf());
1284
1285 if (!obj)
1286 {
1287 Set(value.m_class, new OksString(value.m_value.buf(), value.m_value.len()));
1288 goto final;
1289 }
1290
1291 // final checks
1292
1293 value.m_file_params.owner->OksObject::check_class_type(r, value.m_class);
1294 Set(obj);
1295 obj->add_RCR(value.m_file_params.owner, r);
1296 }
1297 catch (exception& ex)
1298 {
1299 if (value.m_class_id)
1300 delete value.m_class_id;
1301 throw FailedRead("relationship value", ex);
1302 }
1303 catch (std::exception & ex)
1304 {
1305 if (value.m_class_id)
1306 delete value.m_class_id;
1307 throw FailedRead("relationship value", ex.what());
1308 }
1309
1310 final:
1311
1312 IsConsistent(r, value.m_file_params.owner, "WARNING");
1313}
1314
1315void
1316OksData::read(const OksRelationship *r, const ReadFileParams& read_params)
1317{
1318 if (type != list_type)
1319 Set(new List());
1320 else if (!data.LIST->empty())
1321 free_list(*data.LIST);
1322
1323 while (true)
1324 try
1325 {
1326 const char * tag_start = read_params.s.get_tag_start();
1327
1328 // check for closing tag
1329 if (*tag_start == '/' && cmp_str4n(tag_start+1, OksObject::relationship_xml_tag))
1330 break;
1331
1332 if (cmp_str3(tag_start, OksObject::ref_xml_tag))
1333 {
1334 OksXmlRelValue value(read_params);
1335
1336 try {
1337 while(true) {
1338 OksXmlAttribute attr(read_params.s);
1339
1340 // check for close of tag
1341
1342 if(cmp_str1(attr.name(), ">") || cmp_str1(attr.name(), "/")) { break; }
1343
1344 // check for known oks-relationship' attributes
1345
1346 else if(cmp_str5(attr.name(), OksObject::class_xml_attribute)) {
1347 value.m_class = read_params.owner->uid.class_id->get_kernel()->find_class(attr.value());
1348 if( __builtin_expect((value.m_class == nullptr && attr.value_len() > 0), 0) ) {
1349 value.m_class_id = new OksString(attr.value(), attr.value_len());
1350 }
1351 }
1352 else if(cmp_str2(attr.name(), OksObject::id_xml_attribute)) {
1353 value.m_value = read_params.s.get_value(attr.p_value_len);
1354 }
1355 else
1356 read_params.s.throw_unexpected_attribute(attr.name());
1357 }
1358
1359 if(value.is_empty() == false)
1360 {
1361 OksData * d = new OksData(r, value);
1362
1363 // ignore dangling objects saved previously
1364 if( __builtin_expect((d->type == OksData::uid2_type && d->data.UID2.class_id->empty()), 0) ) continue;
1365
1366 // add real object
1367 data.LIST->push_back(d);
1368 }
1369 }
1370 catch(exception & e) {
1371 throw FailedRead("multi-value relationship", e);
1372 }
1373 catch (std::exception & e) {
1374 throw FailedRead("multi-value relationship", e.what());
1375 }
1376 }
1377 else
1378 {
1379 std::ostringstream s;
1380 s << "Unexpected tag \"" << tag_start << "\" (line " << read_params.s.get_line_no() << ", char " << read_params.s.get_line_pos() << ')';
1381 throw std::runtime_error(s.str().c_str());
1382 }
1383 }
1384 catch (exception & e)
1385 {
1386 throw FailedRead("multi-value", e);
1387 }
1388 catch (std::exception & e)
1389 {
1390 throw FailedRead("multi-value", e.what());
1391 }
1392}
1393
1394
1395 //
1396 // Writes to stream any OKS data except relationship types
1397 // (i.e. object, uid, uid2)
1398 //
1399
1400void
1401OksData::WriteTo(OksXmlOutputStream& xmls, bool put_number) const
1402{
1403 switch (type) {
1404 case list_type: {
1405 if(!data.LIST->empty()) {
1406 if(put_number) xmls.put_value((unsigned long)data.LIST->size());
1407 for(List::iterator i = data.LIST->begin(); i != data.LIST->end(); ++i) {
1408 if(!put_number) {
1409 xmls.put_raw('\n');
1410 xmls.put_raw(' ');
1411 }
1412
1413 xmls.put_raw(' ');
1414
1415 (*i)->WriteTo(xmls, put_number);
1416 }
1417
1418 if(!put_number)
1419 {
1420 xmls.put_raw('\n');
1421 xmls.put_raw(' ');
1422 }
1423 }
1424 else {
1425 if(put_number) xmls.put_raw('0');
1426 }
1427
1428 break; }
1429
1430 case string_type:
1431 xmls.put_quoted(data.STRING->c_str());
1432 break;
1433
1434 case s32_int_type:
1435 xmls.put_value(data.S32_INT);
1436 break;
1437
1438 case u32_int_type:
1439 xmls.put_value(data.U32_INT);
1440 break;
1441
1442 case s16_int_type:
1443 xmls.put_value(data.S16_INT);
1444 break;
1445
1446 case u16_int_type:
1447 xmls.put_value(data.U16_INT);
1448 break;
1449
1450 case float_type: {
1451 std::ostream& s = xmls.get_stream();
1452 std::streamsize p = s.precision();
1453 s.precision(std::numeric_limits< float >::digits10);
1454 xmls.put_value(data.FLOAT);
1455 s.precision(p);
1456 break; }
1457
1458 case double_type: {
1459 std::ostream& s = xmls.get_stream();
1460 std::streamsize p = s.precision();
1461 s.precision(std::numeric_limits< double >::digits10);
1462 xmls.put_value(data.DOUBLE);
1463 s.precision(p);
1464 break; }
1465
1466 case s8_int_type:
1467 xmls.put_value(static_cast<int16_t>(data.S8_INT));
1468 break;
1469
1470 case u8_int_type:
1471 xmls.put_value(static_cast<uint16_t>(data.U8_INT));
1472 break;
1473
1474 case s64_int_type:
1475 xmls.put_value(data.S64_INT);
1476 break;
1477
1478 case u64_int_type:
1479 xmls.put_value(data.U64_INT);
1480 break;
1481
1482 case bool_type:
1483 xmls.put_value((short)(data.BOOL));
1484 break;
1485
1486 case date_type:
1487 xmls.put_quoted(boost::gregorian::to_iso_string(date()).c_str());
1488 break;
1489
1490 case time_type:
1491 xmls.put_quoted(boost::posix_time::to_iso_string(time()).c_str());
1492 break;
1493
1494 case enum_type:
1495 xmls.put_quoted(data.ENUMERATION->c_str());
1496 break;
1497
1498 case class_type:
1499 xmls.put_quoted(data.CLASS->get_name().c_str());
1500 break;
1501
1502 case uid2_type:
1503 case uid_type:
1504 case object_type:
1505 case unknown_type:
1506 Oks::error_msg("OksData::WriteTo(OksXmlOutputStream&, bool)")
1507 << "Can't write \'" << (type == unknown_type ? "unknown" : "relationship") << "_type\'\n";
1508 break;
1509 }
1510}
1511
1512
1513void
1514OksData::WriteTo(OksXmlOutputStream& xmls) const
1515{
1516 switch (type) {
1517 case string_type:
1518 xmls.put(data.STRING->c_str());
1519 break;
1520
1521 case s32_int_type:
1522 xmls.put_value(data.S32_INT);
1523 break;
1524
1525 case u32_int_type:
1526 xmls.put_value(data.U32_INT);
1527 break;
1528
1529 case s16_int_type:
1530 xmls.put_value(data.S16_INT);
1531 break;
1532
1533 case u16_int_type:
1534 xmls.put_value(data.U16_INT);
1535 break;
1536
1537 case float_type: {
1538 std::ostream& s = xmls.get_stream();
1539 std::streamsize p = s.precision();
1540 s.precision(std::numeric_limits< float >::digits10);
1541 xmls.put_value(data.FLOAT);
1542 s.precision(p);
1543 break; }
1544
1545 case double_type: {
1546 std::ostream& s = xmls.get_stream();
1547 std::streamsize p = s.precision();
1548 s.precision(std::numeric_limits< double >::digits10);
1549 xmls.put_value(data.DOUBLE);
1550 s.precision(p);
1551 break; }
1552
1553 case s8_int_type:
1554 xmls.put_value(static_cast<int16_t>(data.S8_INT));
1555 break;
1556
1557 case u8_int_type:
1558 xmls.put_value(static_cast<uint16_t>(data.U8_INT));
1559 break;
1560
1561 case s64_int_type:
1562 xmls.put_value(data.S64_INT);
1563 break;
1564
1565 case u64_int_type:
1566 xmls.put_value(data.U64_INT);
1567 break;
1568
1569 case bool_type:
1570 xmls.put_value((short)(data.BOOL));
1571 break;
1572
1573 case date_type:
1574 xmls.put(boost::gregorian::to_iso_string(date()).c_str());
1575 break;
1576
1577 case time_type:
1578 xmls.put(boost::posix_time::to_iso_string(time()).c_str());
1579 break;
1580
1581 case enum_type:
1582 xmls.put(data.ENUMERATION->c_str());
1583 break;
1584
1585 case class_type:
1586 xmls.put(data.CLASS->get_name().c_str());
1587 break;
1588
1589 case list_type:
1590 throw std::runtime_error("internal error: call OksData::WriteTo() on list");
1591
1592 case uid2_type:
1593 case uid_type:
1594 case object_type:
1595 case unknown_type:
1596 Oks::error_msg("OksData::WriteTo(OksXmlOutputStream&, bool)")
1597 << "Can't write \'" << (type == unknown_type ? "unknown" : "relationship") << "_type\'\n";
1598 break;
1599 }
1600}
1601
1602
1603
1604 //
1605 // Writes to XML stream OKS data relationship types
1606 //
1607
1608void
1609OksData::WriteTo(OksXmlOutputStream& xmls, OksKernel *k, OksAliasTable *alias_table, bool /*test_existance*/, bool put_number) const
1610{
1611 const char * fname = "WriteTo(OksXmlOutputStream&, ...)";
1612
1613 static std::string emptyName(""); // to save NIL name
1614
1615 const std::string * class_name = 0;
1616 const std::string * object_id = 0;
1617
1618 switch (type) {
1619 case object_type:
1620 if(data.OBJECT) {
1621 class_name = &data.OBJECT->GetClass()->get_name();
1622 object_id = &data.OBJECT->GetId();
1623 }
1624 else
1625 class_name = object_id = &emptyName;
1626
1627 break;
1628
1629 case list_type: {
1630 if(!data.LIST->empty()) {
1631 if(put_number) xmls.put_value((unsigned long)data.LIST->size());
1632
1633 for(List::iterator i = data.LIST->begin(); i != data.LIST->end(); ++i) {
1634 if(!put_number) {
1635 xmls.put_raw('\n');
1636 xmls.put_raw(' ');
1637 }
1638
1639 xmls.put_raw(' ');
1640
1641 (*i)->WriteTo(xmls, k, alias_table, false, put_number);
1642 }
1643
1644 if(!put_number) {
1645 xmls.put_raw('\n');
1646 xmls.put_raw(' ');
1647 }
1648 }
1649 else {
1650 if(put_number) xmls.put_raw('0');
1651 }
1652
1653 return; }
1654
1655 case uid2_type:
1656 class_name = data.UID2.class_id;
1657 object_id = data.UID2.object_id;
1658 break;
1659
1660 case uid_type:
1661 class_name = &data.UID.class_id->get_name();
1662 object_id = data.UID.object_id;
1663 break;
1664
1665 default:
1666 Oks::error_msg(fname)
1667 << "Can't write \'" << (type == unknown_type ? "unknown" : "attribute") << "_type\'\n";
1668 return;
1669 }
1670
1671
1672 if(!class_name->empty()) {
1673
1674 // if alias table is not defined, store object in extended format
1675
1676 if(!alias_table) {
1677 xmls.put_quoted(class_name->c_str());
1678 }
1679
1680
1681 // otherwise store object in compact format
1682
1683 else {
1684 const OksAliasTable::Value *value = alias_table->get(static_cast<const OksString *>(class_name));
1685
1686 // class' alias was already defined
1687 if(value)
1688 xmls.put_quoted(value->class_name->c_str());
1689
1690 //makes new class' alias
1691 else {
1692 alias_table->add_key(static_cast<OksString *>(const_cast<std::string *>(class_name)));
1693
1694 std::string s(*class_name);
1695 s.insert(0, "@"); // add '@' to distinguish alias from class name when load
1696 xmls.put_quoted(s.c_str());
1697 }
1698 }
1699
1700 }
1701 else {
1702 xmls.put_quoted("");
1703 }
1704
1705 xmls.put_raw(' ');
1706 xmls.put_quoted(object_id->c_str());
1707}
1708
1709void
1710OksData::ConvertTo(OksData *to, const OksRelationship *r) const
1711{
1712 if(r->get_high_cardinality_constraint() == OksRelationship::Many) {
1713 to->Set(new List());
1714
1715 if(type != list_type) {
1716 OksData *item = new OksData();
1717
1718 if(type == OksData::object_type) item->Set(data.OBJECT);
1719 else if(type == OksData::uid_type) item->Set(data.UID.class_id, *data.UID.object_id);
1720 else if(type == OksData::uid2_type) item->Set(*data.UID2.class_id, *data.UID2.object_id);
1721
1722 to->data.LIST->push_back(item);
1723
1724 return;
1725 }
1726 else if(data.LIST && !data.LIST->empty()){
1727 for(List::iterator i = data.LIST->begin(); i != data.LIST->end(); ++i) {
1728 OksData *item = new OksData();
1729 OksData *dd = *i;
1730
1731 if(dd->type == OksData::object_type) item->Set(dd->data.OBJECT);
1732 else if(dd->type == OksData::uid_type) item->Set(dd->data.UID.class_id, *dd->data.UID.object_id);
1733 else if(dd->type == OksData::uid2_type) item->Set(*dd->data.UID2.class_id, *dd->data.UID2.object_id);
1734
1735 to->data.LIST->push_back(item);
1736 }
1737
1738 return;
1739 }
1740
1741 }
1742 else {
1743 const OksData * from = ((type == list_type) ? data.LIST->front() : this);
1744
1745 if(from->type == OksData::object_type) to->Set(from->data.OBJECT);
1746 else if(from->type == OksData::uid_type) to->Set(from->data.UID.class_id, *from->data.UID.object_id);
1747 else if(from->type == OksData::uid2_type) to->Set(*from->data.UID2.class_id, *from->data.UID2.object_id);
1748 }
1749}
1750
1751
1752void
1753OksData::cvt(OksData *to, const OksAttribute *a) const
1754{
1755 if(a->get_is_multi_values()) {
1756 to->Set(new List());
1757
1758 if(type != list_type) {
1759 OksData *item = new OksData();
1760
1761 std::string cvts = str();
1762 item->ReadFrom(cvts.c_str(), a->get_data_type(), a);
1763
1764 to->data.LIST->push_back(item);
1765
1766 return;
1767 }
1768 else if(data.LIST && !data.LIST->empty()) {
1769 for(List::iterator i = data.LIST->begin(); i != data.LIST->end(); ++i) {
1770 OksData *item = new OksData();
1771 OksData *dd = *i;
1772
1773 std::string cvts = dd->str();
1774 item->ReadFrom(cvts.c_str(), a->get_data_type(), a);
1775
1776 to->data.LIST->push_back(item);
1777 }
1778
1779 return;
1780 }
1781 }
1782 else {
1783 const OksData * from = ((type == list_type) ? (data.LIST->empty() ? 0 : data.LIST->front() ) : this);
1784 std::string cvts;
1785 if(from) cvts = from->str();
1786 to->ReadFrom(cvts.c_str(), a->get_data_type(), a);
1787 }
1788}
1789
1790
1791static std::string
1792list2str(const OksData::List * l, const OksKernel * k, int base)
1793{
1794 std::ostringstream s;
1795
1796 s << '(';
1797
1798 if(l) {
1799 bool is_first = true;
1800
1801 for(OksData::List::const_iterator i = l->begin(); i != l->end(); ++i) {
1802 std::string s2 = (k ? (*i)->str(k) : (*i)->str(base));
1803
1804 if(!s2.empty()) {
1805 if(is_first == false) { s << ", "; }
1806 else { is_first = false; }
1807 s << s2;
1808 }
1809 }
1810 }
1811
1812 s << ')';
1813
1814 return s.str();
1815}
1816
1817
1818
1819 // only is used for OksData pointing to objects
1820
1821std::string
1822OksData::str(const OksKernel * kernel) const
1823{
1824 if(type == list_type) {
1825 return list2str(data.LIST, kernel, 0);
1826 }
1827
1828 std::ostringstream s;
1829
1830 switch (type) {
1831 case uid2_type:
1832 s << "#[" << *data.UID2.object_id << '@' << *data.UID2.class_id << ']';
1833 break;
1834
1835 case uid_type:
1836 s << "#[" << *data.UID.object_id << '@' << data.UID.class_id->get_name() << ']';
1837 break;
1838
1839 case object_type:
1840 if(data.OBJECT && !kernel->is_dangling(data.OBJECT) && data.OBJECT->GetClass()->get_name().length()) {
1841 s << '[' << data.OBJECT->GetId() << '@' << data.OBJECT->GetClass()->get_name() << ']';
1842 }
1843 break;
1844
1845 default:
1846 std::cerr << "ERROR [OksData::str(const OksKernel *)]: wrong use for such data: " << *this << std::endl;
1847 return "";
1848 }
1849
1850 return s.str();
1851}
1852
1853
1854 // is only used for primitive data types
1855
1856std::string
1857OksData::str(int base) const
1858{
1859 if(type == string_type) { return *data.STRING; }
1860 else if(type == enum_type) { return *data.ENUMERATION; }
1861 else if(type == bool_type) { return (data.BOOL ? "true" : "false"); }
1862 else if(type == list_type) { return list2str(data.LIST, 0, base); }
1863 else if(type == date_type) { return boost::gregorian::to_simple_string(date()); }
1864 else if(type == time_type) { return boost::posix_time::to_simple_string(time()); }
1865 else if(type == class_type) { return data.CLASS->get_name(); }
1866
1867
1868 std::ostringstream s;
1869
1870 if(base) {
1871 s.setf((base == 10 ? std::ios::dec : base == 16 ? std::ios::hex : std::ios::oct), std::ios::basefield );
1872 s.setf(std::ios::showbase);
1873 }
1874
1875 switch (type) {
1876 case s8_int_type:
1877 s << static_cast<int16_t>(data.S8_INT);
1878 break;
1879
1880 case u8_int_type:
1881 s << static_cast<uint16_t>(data.U8_INT);
1882 break;
1883
1884 case s16_int_type:
1885 s << data.S16_INT;
1886 break;
1887
1888 case u16_int_type:
1889 s << data.U16_INT;
1890 break;
1891
1892 case s32_int_type:
1893 s << data.S32_INT;
1894 break;
1895
1896 case u32_int_type:
1897 s << data.U32_INT;
1898 break;
1899
1900 case s64_int_type:
1901 s << data.S64_INT;
1902 break;
1903
1904 case u64_int_type:
1905 s << data.U64_INT;
1906 break;
1907
1908 case float_type:
1909 s.precision(std::numeric_limits< float >::digits10);
1910 s << data.FLOAT;
1911 break;
1912
1913 case double_type:
1914 s.precision(std::numeric_limits< double >::digits10);
1915 s << data.DOUBLE;
1916 break;
1917
1918 default:
1919 std::cerr << "ERROR [OksData::str(int)]: wrong use for such data: " << *this << std::endl;
1920 return "";
1921 }
1922
1923 return s.str();
1924}
1925
1926
1927bool
1928OksData::IsConsistent(const OksRelationship *r, const OksObject *o, const char *msg)
1929{
1930 if(r->get_low_cardinality_constraint() != OksRelationship::Zero) {
1931 if(
1932 ( type == OksData::object_type && data.OBJECT == 0 ) ||
1933 ( type == OksData::uid_type && (!data.UID.object_id || data.UID.object_id->empty() || !data.UID.class_id) ) ||
1934 ( type == OksData::uid2_type && (!data.UID2.object_id || !data.UID2.class_id || data.UID2.object_id->empty() || data.UID2.class_id->empty()) )
1935 ) {
1936 if(o->GetClass()->get_kernel()->get_silence_mode() != true) {
1937 std::cerr << msg << ": value of \"" << r->get_name() << "\" relationship in object " << o << " must be non-null\n";
1938 }
1939 return false;
1940 }
1941 else if(type == OksData::list_type && data.LIST->empty()) {
1942 if(o->GetClass()->get_kernel()->get_silence_mode() != true) {
1943 std::cerr << msg << ": \"" << r->get_name() << "\" relationship in object " << o << " must contain at least one object\n";
1944 }
1945 return false;
1946 }
1947 }
1948
1949 return true;
1950}
1951
1952
1953
1954void
1955OksData::sort(bool ascending)
1956{
1957 if (type != list_type || data.LIST->size() < 2)
1958 return;
1959
1960 if (ascending)
1961 data.LIST->sort( []( const OksData* a, const OksData* b ) { return *a < *b; } );
1962 else
1963 data.LIST->sort( []( const OksData* a, const OksData* b ) { return *a > *b; } );
1964}
1965
1966 boost::posix_time::ptime str2time(const char * value, size_t len, const char * file_name)
1967 {
1968 if(len == 15 && value[8] == 'T') {
1969 try {
1970 return boost::posix_time::from_iso_string(value);
1971 }
1972 catch (std::exception& ex) {
1973 //throw TimeCvtFailed(value, ex.what());
1974 throw AttributeReadError(value, "time", ex.what());
1975 }
1976 }
1977 else {
1978 try {
1979 Time t(value);
1980 std::ostringstream text;
1981 text << std::setfill('0')
1982 << std::setw(4) << t.year()
1983 << std::setw(2) << (t.month() + 1)
1984 << std::setw(2) << t.day()
1985 << 'T'
1986 << std::setw(2) << t.hour()
1987 << std::setw(2) << t.min()
1988 << std::setw(2) << t.sec();
1989 TLOG_DEBUG( 1 ) << "parse OKS time: " << t << " => " << text.str() ;
1990
1991 if(file_name)
1992 ers::warning(DeprecatedFormat(ERS_HERE, file_name, value));
1993 else
1994 Oks::warning_msg("oks str2time") << "The file is using deprecated OKS time format \"" << value << "\"\nPlease refresh it using an oks application\nSupport for such format will be removed in a future release.\n";
1995
1996 return boost::posix_time::from_iso_string(text.str());
1997 }
1998 catch (exception& ex) {
1999 //throw TimeCvtFailed(value, ex);
2000 throw AttributeReadError(value, "time", ex);
2001 }
2002 catch (std::exception& ex) {
2003 //throw TimeCvtFailed(value, ex.what());
2004 throw AttributeReadError(value, "time", ex.what());
2005 }
2006 }
2007 }
2008
2009 boost::gregorian::date str2date(const char * value, size_t len)
2010 {
2011 if(len == 8 && value[2] != '/' && value[3] != '/') {
2012 try {
2013 return boost::gregorian::from_undelimited_string(value);
2014 }
2015 catch (std::exception& ex) {
2016 throw AttributeReadError(value, "date", ex.what());
2017 }
2018 }
2019 else {
2020 try {
2021 Date t(value);
2022 std::ostringstream text;
2023 text << std::setfill('0')
2024 << std::setw(4) << t.year()
2025 << std::setw(2) << (t.month() + 1)
2026 << std::setw(2) << t.day();
2027 TLOG_DEBUG( 1 ) << "parse OKS date: " << t << " => " << text.str() ;
2028
2029 Oks::warning_msg("oks str2date") << "The file is using deprecated OKS date format \"" << value << "\"\nPlease refresh it using an oks application.\nSupport for such format will be removed in a future release.\n";
2030
2031 return boost::gregorian::from_undelimited_string(text.str());
2032 }
2033 catch (exception& ex) {
2034 throw AttributeReadError(value, "date", ex);
2035 }
2036 catch (std::exception& ex) {
2037 throw AttributeReadError(value, "date", ex.what());
2038 }
2039 }
2040 }
2041
2042} // namespace oks
std::ostream & operator<<(std::ostream &stream, const OksSystem::File &file)
Definition File.cpp:852
#define ERS_HERE
caught dunedaq::conffwk::Exception exception
#define CMP_DATA(OP)
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112
std::string const reason(ers::Issue const &)
T to(QStringList const &DataList)
bool cmp_str1(const char *s1, const char s2[2])
Definition cstring.hpp:9
bool cmp_str4(const char *s1, const char s2[5])
Definition cstring.hpp:29
bool cmp_str5n(const char *s1, const char s2[5])
Definition cstring.hpp:41
boost::posix_time::ptime str2time(const char *value, size_t len, const char *file_name=nullptr)
boost::gregorian::date str2date(const char *value, size_t len)
bool cmp_str2(const char *s1, const char s2[3])
Definition cstring.hpp:13
bool cmp_str5(const char *s1, const char s2[6])
Definition cstring.hpp:37
bool cmp_str3(const char *s1, const char s2[4])
Definition cstring.hpp:21
bool cmp_str4n(const char *s1, const char s2[4])
Definition cstring.hpp:33
DAC value out of range
Message.
Definition DACNode.hpp:32
void warning(const Issue &issue)
Definition ers.hpp:115

◆ ERS_DECLARE_ISSUE() [58/83]

dunedaq::ERS_DECLARE_ISSUE ( opmonlib ,
FailedInfoReconstruction ,
"Failure to create an object of type "<< type,
((std::string) type)  )

◆ ERS_DECLARE_ISSUE() [59/83]

Monitoring thread not ERS_EMPTY dunedaq::ERS_DECLARE_ISSUE ( opmonlib ,
FailedMonitoringThread ,
"Monitoring thread failed to start" ,
ERS_EMPTY  )

◆ ERS_DECLARE_ISSUE() [60/83]

dunedaq::ERS_DECLARE_ISSUE ( opmonlib ,
NonUniqueNodeName ,
name<< " already present in the node list of "<< opmon_id,
((std::string) name)((std::string) opmon_id)  )

◆ ERS_DECLARE_ISSUE() [61/83]

dunedaq::ERS_DECLARE_ISSUE ( opmonlib ,
OpMonFacilityCreationFailed ,
"Facility "<< type<< ": creation failed" ,
((std::string) type)  )

◆ ERS_DECLARE_ISSUE() [62/83]

dunedaq::ERS_DECLARE_ISSUE ( opmonlib ,
OpmonServiceCreationFailed ,
"OpmonServiceCreationFailed: "<< error,
((std::string) error)  )

◆ ERS_DECLARE_ISSUE() [63/83]

dunedaq::ERS_DECLARE_ISSUE ( opmonlib ,
ThreadNameTooLong ,
"The name "<< name<< " is too long for a thread name" ,
((std::string) name)  )

◆ ERS_DECLARE_ISSUE() [64/83]

Unknown serialization dunedaq::ERS_DECLARE_ISSUE ( serialization ,
UnknownSerializationTypeByte ,
"Unknown serialization type "<< t,
((char) t)  )

◆ ERS_DECLARE_ISSUE() [65/83]

dunedaq::ERS_DECLARE_ISSUE ( serialization ,
UnknownSerializationTypeString ,
"Unknown serialization type "<< t,
((std::string) t)  )

◆ ERS_DECLARE_ISSUE() [66/83]

dunedaq::ERS_DECLARE_ISSUE ( sspmodules ,
ConfigurationError ,
"SSP Configuration Error: "<< conferror,
((std::string) conferror)  )

◆ ERS_DECLARE_ISSUE() [67/83]

LED calibration failed to ERS_EMPTY dunedaq::ERS_DECLARE_ISSUE ( sspmodules ,
FailedLEDCalibrationConf ,
"LED calibration failed to configure" ,
ERS_EMPTY  )

◆ ERS_DECLARE_ISSUE() [68/83]

dunedaq::ERS_DECLARE_ISSUE ( tdemodules ,
AMCCommandIssue ,
"AMC with ip:"+ip+" and port: "<< port<< " | "<< "send command failed,
reason:"<< text,
((std::string) ip)((uint16_t) port)((std::string) text)  )

◆ ERS_DECLARE_ISSUE() [69/83]

dunedaq::ERS_DECLARE_ISSUE ( tdemodules ,
AMCProtocolIssue ,
prefix<< "AMCProtocolResponse: "<< text,
((std::string) prefix)((std::string) text)  )

◆ ERS_DECLARE_ISSUE() [70/83]

dunedaq::ERS_DECLARE_ISSUE ( tdemodules ,
AMCResponseErr ,
prefix<< "Received Error packet:"<< "\n"<< "Error code:"<< code<< "\nMessage: "<< text,
((std::string) prefix)((uint16_t) code)((std::string) text)  )

◆ ERS_DECLARE_ISSUE() [71/83]

dunedaq::ERS_DECLARE_ISSUE ( tdemodules ,
AMCUnknownOpCode ,
prefix<< "Unknown opcode recived: "<< opcode,
((std::string) prefix)((uint16_t) opcode)  )

◆ ERS_DECLARE_ISSUE() [72/83]

dunedaq::ERS_DECLARE_ISSUE ( timing ,
DACChannelOutOfRange ,
" DAC channel out of range: "<< channel,
((std::string) channel)  )
Parameters
channelMessage

◆ ERS_DECLARE_ISSUE() [73/83]

dunedaq::ERS_DECLARE_ISSUE ( timing ,
FileNotFound ,
file_path<< " does not exist!" ,
((std::string) file_path)  )

◆ ERS_DECLARE_ISSUE() [74/83]

dunedaq::ERS_DECLARE_ISSUE ( timing ,
SI534xConfigError ,
" SI534xConfigError: "<< message,
((std::string) message)  )
Parameters
messageMessage

◆ ERS_DECLARE_ISSUE() [75/83]

Missing configuration std::string tag dunedaq::ERS_DECLARE_ISSUE ( timing ,
SI534xRegWriteFailed ,
" Failed to write Si53xx reg: "<< reg<< "with data: "<< data,
((std::string) reg)((std::string) data)  )

< Message parameters

Parameters
dataMessage

◆ ERS_DECLARE_ISSUE() [76/83]

dunedaq::ERS_DECLARE_ISSUE ( timing ,
TimestampNotReady ,
" Timestamp not ready in time; loaded: "<< loaded<< " ,
error:" << error,
((uint32_t) loaded)((uint32_t) error)  )

Class for timestamp generator node.

Print the status of the timing node.

Read the current timestamp words.

Returns
{ description_of_the_return_value }

Read the current timestamp words.

Returns
{ description_of_the_return_value }

Read the starting timestamp words.

Returns
{ description_of_the_return_value }

Read the software init timestamp words.

Returns
{ description_of_the_return_value }

Initialise timestamp.

Parameters
errorMessage

Definition at line 29 of file TimestampGeneratorNode.hpp.

31 : " << loaded << ", error: " << error, ///< Message
32 ((uint32_t)loaded)((uint32_t)error) ///< Message parameters // NOLINT
33)
34namespace timing {
35
39class TimestampGeneratorNode : public TimingNode
40{
41 UHAL_DERIVEDNODE(TimestampGeneratorNode)
42public:
43 explicit TimestampGeneratorNode(const uhal::Node& node);
44 virtual ~TimestampGeneratorNode();
45
49 std::string get_status(bool print_out = false) const override;
50
56 uhal::ValVector<uint32_t> read_raw_timestamp(bool dispatch = true) const; // NOLINT(build/unsigned)
57
63 uint64_t read_timestamp() const; // NOLINT(build/unsigned)
64
70 uint64_t read_start_timestamp() const; // NOLINT(build/unsigned)
71
77 uint64_t read_sw_init_timestamp() const; // NOLINT(build/unsigned)
78
82 void set_timestamp(TimestampSource source) const; // NOLINT(build/unsigned)
83};
84
85} // namespace timing
Factory couldn t std::string alg_name Invalid configuration error
Definition Issues.hpp:34

◆ ERS_DECLARE_ISSUE() [77/83]

dunedaq::ERS_DECLARE_ISSUE ( timinglibs ,
GatherThreadingIssue ,
"Gather Threading Issue detected: "<< err,
((std::string) err)  )

An ERS Issue raised when a threading state error occurs.

◆ ERS_DECLARE_ISSUE() [78/83]

dunedaq::ERS_DECLARE_ISSUE ( timinglibs ,
TimingEndpointNotReady ,
endpoint<< " timing endpoint did not become ready in time. State 0x"<< std::hex<< state,
((std::string) endpoint)((uint) state)  )

TimingController is a DAQModule implementation that provides a base class for timing controller modules.

TimingController Constructor

Parameters
nameInstance name for this TimingController instance

< TimingController is not copy-constructible

< TimingController is not copy-assignable

< TimingController is not move-constructible

< TimingController is not move-assignable

Parameters
stateMessage

Definition at line 36 of file TimingController.hpp.

41 {
42
43template<typename T>
44struct MobileAtomic
45{
46 std::atomic<T> atomic;
47
48 MobileAtomic()
49 : atomic(T())
50 {}
51
52 explicit MobileAtomic(T const& v)
53 : atomic(v)
54 {}
55 explicit MobileAtomic(std::atomic<T> const& a)
56 : atomic(a.load())
57 {}
58
59 virtual ~MobileAtomic() = default;
60
61 MobileAtomic(MobileAtomic const& other)
62 : atomic(other.atomic.load())
63 {}
64
65 MobileAtomic& operator=(MobileAtomic const& other)
66 {
67 atomic.store(other.atomic.load());
68 return *this;
69 }
70
71 MobileAtomic(MobileAtomic&&) = default;
72 MobileAtomic& operator=(MobileAtomic&&) = default;
73};
74
75typedef MobileAtomic<uint64_t> AtomicUInt64; // NOLINT(build/unsigned)
76
81class TimingController : public dunedaq::appfwk::DAQModule
82{
83public:
88 explicit TimingController(const std::string& name, uint number_hw_commands);
89
90 TimingController(const TimingController&) = delete;
91 TimingController& operator=(const TimingController&) = delete;
92 TimingController(TimingController&&) = delete;
93 TimingController& operator=(TimingController&&) = delete;
94
95 void init(std::shared_ptr<appfwk::ConfigurationManager> mcfg) override;
96
97protected:
98 // DAQModule commands
99 virtual void do_configure(const nlohmann::json&);
100 virtual void do_start(const nlohmann::json&) {}
101 virtual void do_stop(const nlohmann::json&) {}
102 virtual void do_scrap(const nlohmann::json&);
103
104 template<class T, class... Vs>
105 void configure_hardware_or_recover_state(const nlohmann::json& data, std::string timing_entity_description, const Vs& ... args);
106
107 // Configuration
108 std::string m_hw_command_out_connection;
109 std::chrono::milliseconds m_hw_cmd_out_timeout;
111 std::shared_ptr<sink_t> m_hw_command_sender;
112 std::string m_timing_device;
113 std::string m_timing_session_name;
115 std::shared_ptr<source_t> m_device_info_receiver;
116
117 virtual void send_hw_cmd(timingcmd::TimingHwCmd&& hw_cmd);
118 virtual void send_configure_hardware_commands(const nlohmann::json& data) = 0;
119
120 // opmon
121 uint m_number_hw_commands;
122 std::vector<AtomicUInt64> m_sent_hw_command_counters;
123
124 // Interpert device opmon info
125 virtual void process_device_info(nlohmann::json /*message*/) = 0;
126 std::chrono::milliseconds m_device_ready_timeout;
127 std::atomic<bool> m_device_ready;
128 std::atomic<uint> m_device_infos_received_count;
129 std::atomic<bool> m_hardware_state_recovery_enabled;
130
131 //common commands
132 timingcmd::TimingHwCmd construct_hw_cmd( const std::string& cmd_id);
133 timingcmd::TimingHwCmd construct_hw_cmd( const std::string& cmd_id, const nlohmann::json& payload);
134 virtual void do_io_reset(const nlohmann::json& data);
135 virtual void do_print_status(const nlohmann::json& data);
136 const dal::TimingControllerConf* m_params;
137
138};
139} // namespace timinglibs
void init(unordered_map< std::string, std::string > params)

◆ ERS_DECLARE_ISSUE() [79/83]

dunedaq::ERS_DECLARE_ISSUE ( timinglibs ,
TimingMasterNotReady ,
master<< " timing master did not become ready in time." ,
((std::string) master)  )

TimingMasterControllerBase is a DAQModule implementation that provides a control interface for timing master hardware.

TimingMasterControllerBase Constructor

Parameters
nameInstance name for this TimingMasterControllerBase instance

< TimingMasterControllerBase is not copy-constructible

< TimingMasterControllerBase is not copy-assignable

< TimingMasterControllerBase is not move-constructible

< TimingMasterControllerBase is not move-assignable

Definition at line 31 of file TimingMasterControllerBase.hpp.

35 {
36
41class TimingMasterControllerBase : public dunedaq::timinglibs::TimingController
42{
43public:
48 explicit TimingMasterControllerBase(const std::string& name);
49
50 TimingMasterControllerBase(const TimingMasterControllerBase&) = delete;
51 TimingMasterControllerBase& operator=(const TimingMasterControllerBase&) =
52 delete;
53 TimingMasterControllerBase(TimingMasterControllerBase&&) = delete;
54 TimingMasterControllerBase& operator=(TimingMasterControllerBase&&) =
55 delete;
56 virtual ~TimingMasterControllerBase()
57 {
58 if (endpoint_scan_thread.thread_running())
59 endpoint_scan_thread.stop_working_thread();
60 }
61
62protected:
63 // Commands
64 void do_configure(const nlohmann::json&) override;
65 void do_start(const nlohmann::json& data) override;
66 void do_stop(const nlohmann::json& data) override;
67 void send_configure_hardware_commands(const nlohmann::json& data) override;
68
69 // timing master commands
70 void do_master_set_timestamp(const nlohmann::json&);
71 void do_master_set_endpoint_delay(const nlohmann::json& data);
72 void do_master_send_fl_command(const nlohmann::json& data);
73 void do_master_measure_endpoint_rtt(const nlohmann::json& data);
74 void do_master_endpoint_scan(const nlohmann::json& data);
75
76 // pass op mon info
77 // void get_info(opmonlib::InfoCollector& ci, int level) override;
78
79 timingcmd::TimingEndpointLocations m_monitored_endpoint_locations;
80 uint m_endpoint_scan_period; // NOLINT(build/unsigned)
81 dunedaq::utilities::WorkerThread endpoint_scan_thread;
82 virtual void endpoint_scan(std::atomic<bool>&);
83};
84} // namespace timinglibs

◆ ERS_DECLARE_ISSUE() [80/83]

dunedaq::ERS_DECLARE_ISSUE ( trigger ,
DroppedTPSet ,
"Failed to send TPs from "<< s_ts<< " to "<< e_ts,
((uint64_t) s_ts)((uint64_t) e_ts)  )

◆ ERS_DECLARE_ISSUE() [81/83]

dunedaq::ERS_DECLARE_ISSUE ( trigger ,
InvalidConfiguration ,
"Invalid configuration error:"<< conferror,
((std::string) conferror)  )

◆ ERS_DECLARE_ISSUE() [82/83]

dunedaq::ERS_DECLARE_ISSUE ( utilities ,
ServiceNotFound ,
"The service "<< service<< " was not found in DNS" ,
((std::string) service)  )

◆ ERS_DECLARE_ISSUE() [83/83]

dunedaq::ERS_DECLARE_ISSUE ( utilities ,
ThreadingIssue ,
"Threading Issue detected: "<< err,
((std::string) err)  )

An ERS Issue raised when a threading state error occurs.

WorkerThread contains a thread which runs the do_work() function

WorkerThread runs a given function in a std::thread and allows that work function to be started and stopped via the start_working_thread() and stop_working_thread() methods, respectively. The work function takes a std::atomic<bool>& which indicates whether the thread should continue running, so a typical implementation of a work function is:

void do_work(std::atomic<bool>& running_flag){
while(running_flag.load()){
// do something ...
}
}

If your do_work function is a class member, you will need to wrap it with std::bind or a lambda to bind the implicit 'this' argument, eg

class MyClass {
public:
MyClass()
: helper_(std::bind(MyClass::do_work, this, std::placeholders::_1))
{}
void do_work(std::atomic<bool>& running_flag) { ... }
WorkerThread helper_;
};

WorkerThread Constructor

Parameters
do_workFunction to be executed in the thread

This constructor sets the defaults for the thread control variables

Start the working thread (which executes the do_work() function)

Exceptions
ThreadingIssueif the thread is already running

Stop the working thread

Exceptions
ThreadingIssueIf the thread has not yet been started
ThreadingIssueIf the thread is not in the joinable state
ThreadingIssueIf an exception occurs during thread join

Determine if the thread is currently running

Returns
Whether the thread is currently running

< WorkerThread is not copy-constructible

< WorkerThread is not copy-assginable

< WorkerThread is not move-constructible

< WorkerThread is not move-assignable

Definition at line 34 of file WorkerThread.hpp.

36 : " << err, // Message
37 ((std::string)err)) // Message parameters
38// Re-enable coverage collection LCOV_EXCL_STOP
39
40namespace utilities {
75class WorkerThread
76{
77public:
84 explicit WorkerThread(std::function<void(std::atomic<bool>&)> do_work);
85
90 void start_working_thread(const std::string& name = "noname");
97 void stop_working_thread();
98
103 bool thread_running() const { return m_thread_running.load(); }
104
105 WorkerThread(const WorkerThread&) = delete; ///< WorkerThread is not copy-constructible
106 WorkerThread& operator=(const WorkerThread&) = delete; ///< WorkerThread is not copy-assginable
107 WorkerThread(WorkerThread&&) = delete; ///< WorkerThread is not move-constructible
108 WorkerThread& operator=(WorkerThread&&) = delete; ///< WorkerThread is not move-assignable
109
110private:
111 std::atomic<bool> m_thread_running;
112 std::unique_ptr<std::thread> m_working_thread;
113 std::function<void(std::atomic<bool>&)> m_do_work;
114};
115} // namespace utilities

◆ ERS_DECLARE_ISSUE_BASE() [1/8]

DAQModule std::string name dunedaq::ERS_DECLARE_ISSUE_BASE ( appfwk ,
DAQModuleInitFailed ,
appfwk::GeneralDAQModuleIssue ,
" init failed." ,
((std::string) name) ,
ERS_EMPTY  )

Initialization failed ERS Issue (used by DAQModuleManager)

Generic command ERS Issue

◆ ERS_DECLARE_ISSUE_BASE() [2/8]

dunedaq::ERS_DECLARE_ISSUE_BASE ( confmodel ,
BadVariableUsage ,
AlgorithmError ,
message ,
((std::string) message)  )

◆ ERS_DECLARE_ISSUE_BASE() [3/8]

The opmon infrastructure has not been set up in the dunedaq::ERS_DECLARE_ISSUE_BASE ( confmodel ,
NoControlServiceDefined ,
ConfigurationError ,
"The control service has not been set up for the application "+app_name+" you need to define a service called which has a name finishing with \'_control\'" ,
((std::string) app_name)  )

◆ ERS_DECLARE_ISSUE_BASE() [4/8]

dunedaq::ERS_DECLARE_ISSUE_BASE ( dfmodules ,
ProgressUpdate ,
appfwk::GeneralDAQModuleIssue ,
message ,
((std::string) name) ,
((std::string) message)  )

◆ ERS_DECLARE_ISSUE_BASE() [5/8]

dunedaq::ERS_DECLARE_ISSUE_BASE ( hsilibs ,
ProgressUpdate ,
appfwk::GeneralDAQModuleIssue ,
message ,
((std::string) name) ,
((std::string) message)  )

◆ ERS_DECLARE_ISSUE_BASE() [6/8]

dunedaq::ERS_DECLARE_ISSUE_BASE ( listrev ,
ProgressUpdate ,
appfwk::GeneralDAQModuleIssue ,
message ,
((std::string) name) ,
((std::string) message)  )

◆ ERS_DECLARE_ISSUE_BASE() [7/8]

dunedaq::ERS_DECLARE_ISSUE_BASE ( timinglibs ,
ProgressUpdate ,
appfwk::GeneralDAQModuleIssue ,
message ,
((std::string) name) ,
((std::string) message)  )

◆ ERS_DECLARE_ISSUE_BASE() [8/8]

dunedaq::ERS_DECLARE_ISSUE_BASE ( wibmod ,
UnreachableError ,
appfwk::GeneralDAQModuleIssue ,
"An unreachable part of the code has been reached." ,
((std::string) name) ,
ERS_EMPTY  )

◆ ERS_DEFINE_ISSUE_BASE_CXX()

dunedaq::ERS_DEFINE_ISSUE_BASE_CXX ( conffwk ,
Generic ,
conffwk::Exception ,
what ,
((const char *) what)  )

◆ get_iom_receiver() [1/2]

template<typename Datatype >
static std::shared_ptr< iomanager::ReceiverConcept< Datatype > > dunedaq::get_iom_receiver ( iomanager::ConnectionId const & id)
static

Definition at line 179 of file IOManager.hxx.

180{
181 return iomanager::IOManager::get()->get_receiver<Datatype>(id);
182}

◆ get_iom_receiver() [2/2]

template<typename Datatype >
static std::shared_ptr< iomanager::ReceiverConcept< Datatype > > dunedaq::get_iom_receiver ( std::string const & uid)
static

Definition at line 193 of file IOManager.hxx.

194{
195 return iomanager::IOManager::get()->get_receiver<Datatype>(uid);
196}

◆ get_iom_sender() [1/2]

template<typename Datatype >
static std::shared_ptr< iomanager::SenderConcept< Datatype > > dunedaq::get_iom_sender ( iomanager::ConnectionId const & id)
static

Definition at line 172 of file IOManager.hxx.

173{
174 return iomanager::IOManager::get()->get_sender<Datatype>(id);
175}

◆ get_iom_sender() [2/2]

template<typename Datatype >
static std::shared_ptr< iomanager::SenderConcept< Datatype > > dunedaq::get_iom_sender ( std::string const & uid)
static

Definition at line 186 of file IOManager.hxx.

187{
188 return iomanager::IOManager::get()->get_sender<Datatype>(uid);
189}

◆ get_iomanager()

static std::shared_ptr< iomanager::IOManager > dunedaq::get_iomanager ( )
static

Definition at line 165 of file IOManager.hxx.

166{
167 return iomanager::IOManager::get();
168}

◆ get_new()

static type<< " \""<< data<< "\" is not found",,((const char *) type)((const char *) data)) ERS_DEFINE_ISSUE_BASE_CXX( conffwk, DeletedObject, conffwk::Exception, "object \'"<< object_id<< '@'<< class_name<< "\' was deleted",,((const char *) class_name)((const char *) object_id)) namespace conffwk {template< typename T > T * dunedaq::get_new ( ConfigObject & co,
const std::string & attrname )
static

Definition at line 58 of file Configuration.cpp.

59 {
60 T* retval = new T;
61 co.get(attrname, *retval);
62 return retval;
63}

◆ init_regex()

static void dunedaq::init_regex ( std::unique_ptr< std::regex > & ptr,
const std::string & str,
const char * what )
static

Definition at line 922 of file Configuration.cpp.

923{
924 if (!str.empty())
925 try
926 {
927 ptr = std::make_unique<std::regex>(str);
928 }
929 catch (const std::regex_error &ex)
930 {
931 std::ostringstream text;
932 text << "failed to create " << what << " regex \"" << str << "\": " << ex.what();
933 throw dunedaq::conffwk::Generic( ERS_HERE, text.str().c_str());
934 }
935}
Generic configuration exception.

◆ operator<<() [1/3]

std::ostream & dunedaq::operator<< ( std::ostream & s,
const Configuration & c )

Definition at line 1906 of file Configuration.cpp.

1908{
1909 c.print(s);
1910 return s;
1911}

◆ operator<<() [2/3]

std::ostream & dunedaq::operator<< ( std::ostream & s,
const ConfigurationChange & c )

Definition at line 1813 of file Configuration.cpp.

1815{
1816 s << " changes for class \'" << c.get_class_name() << "\' include:\n";
1817
1818 print_svect(s, c.get_modified_objs(), " modified object(s)");
1819 print_svect(s, c.get_created_objs(), " created object(s)");
1820 print_svect(s, c.get_removed_objs(), " removed object(s)");
1821
1822 return s;
1823}
static void print_svect(std::ostream &s, const std::vector< std::string > &v, const char *name)

◆ operator<<() [3/3]

std::ostream & dunedaq::operator<< ( std::ostream & s,
const std::vector< ConfigurationChange * > & v )

Definition at line 1826 of file Configuration.cpp.

1828{
1829 s << "There are configuration changes in " << v.size() << " classes:\n";
1830
1831 for (const auto &i : v)
1832 s << *i;
1833
1834 return s;
1835}

◆ period()

Unable to receive within timeout dunedaq::period ( timeout period was " << timeout << " milliseconds)

◆ print_svect()

static void dunedaq::print_svect ( std::ostream & s,
const std::vector< std::string > & v,
const char * name )
static

Definition at line 1799 of file Configuration.cpp.

1800{
1801 s << " * " << v.size() << name;
1802
1803 for (auto i = v.begin(); i != v.end(); ++i)
1804 {
1805 s << ((i == v.begin()) ? ": " : ", ");
1806 s << '\"' << *i << '\"';
1807 }
1808
1809 s << std::endl;
1810}

◆ sourceid()

SourceID[" << sourceid << "] Command daqdataformats::SourceID dunedaq::sourceid ( (std::string) commanderror)

◆ tpset_source_id()

Cannot add TPSet with because another TPSet with these values already size_t dunedaq::tpset_source_id ( (daqdataformats::timestamp_t) tpset_start_time)

Variable Documentation

◆ __pad0__

DAQModule dunedaq::__pad0__

Definition at line 72 of file DAQModule.hpp.

◆ address

Invalid dunedaq::address

Definition at line 39 of file DaphneV2Interface.hpp.

◆ AlgorithmError

dunedaq::AlgorithmError

Definition at line 143 of file util.hpp.

◆ AssignedTriggerDecisionNotFound

dunedaq::AssignedTriggerDecisionNotFound

Definition at line 41 of file TriggerRecordBuilderData.hpp.

◆ BadApplicationInfo

dunedaq::BadApplicationInfo

Definition at line 143 of file util.hpp.

◆ BadStreamConf

dunedaq::BadStreamConf

Definition at line 10 of file appmodelIssues.hpp.

◆ BlockSizeConfigurationInconsistency

FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOps couldn t push to queue !Failed std::string chunk dunedaq::BlockSizeConfigurationInconsistency

Definition at line 42 of file FelixIssues.hpp.

◆ BufferedReaderWriterConfigurationError

SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror dunedaq::BufferedReaderWriterConfigurationError

Definition at line 41 of file DataHandlingIssues.hpp.

◆ CannotCreateConsumer

dunedaq::CannotCreateConsumer

Definition at line 29 of file kafka_opmon_consumer.cxx.

◆ CannotDeserializeMessage

Unknown serialization dunedaq::CannotDeserializeMessage

Definition at line 141 of file Serialization.hpp.

◆ ch

PDS Frame with unphysical timestamp detected with dunedaq::ch =" << channel << "

Definition at line 45 of file DAPHNEFrameProcessor.hpp.

◆ chunk

FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOps couldn t push to queue !Failed dunedaq::chunk

Definition at line 33 of file FelixIssues.hpp.

◆ CommandError

dunedaq::CommandError

Definition at line 26 of file DataHandlingIssues.hpp.

◆ CommandExecutionFailed

Unsupported std::string uri dunedaq::CommandExecutionFailed

Definition at line 68 of file Issues.hpp.

◆ CommandFacilityCreationFailed

Unsupported std::string uri Execution of command std::string error dunedaq::CommandFacilityCreationFailed

Definition at line 76 of file Issues.hpp.

◆ CommandIssue

DAQModule std::string name dunedaq::CommandIssue

Definition at line 88 of file DAQModule.hpp.

◆ component

No such dunedaq::component

Definition at line 36 of file ConfigurationManager.hpp.

◆ configuration

The opmon infrastructure has not been set up in the dunedaq::configuration

Definition at line 28 of file util.hpp.

◆ ConfigurationError

The opmon infrastructure has not been set up in the dunedaq::ConfigurationError

Definition at line 27 of file util.hpp.

◆ ConfigurationFailed

dunedaq::ConfigurationFailed

Definition at line 36 of file Issues.hpp.

◆ ConflictingCommandMatching

init Command received when already ERS_EMPTY dunedaq::ConflictingCommandMatching

Definition at line 47 of file DAQModuleManager.hpp.

◆ ConnectionNotFound

dunedaq::ConnectionNotFound

Definition at line 27 of file NetworkIssues.hpp.

◆ consumer

Cannot create dunedaq::consumer

Definition at line 29 of file kafka_opmon_consumer.cxx.

◆ control

The opmon infrastructure has not been set up in the The control service has been defined multiple times for the application app_name you need to define only one service called dunedaq::control

Definition at line 40 of file util.hpp.

◆ CorruptedFile

dunedaq::CorruptedFile

< Namespace

Issue class name

Definition at line 28 of file TimingIssues.hpp.

◆ CTBBufferWarning

dunedaq::CTBBufferWarning

Definition at line 28 of file CTBModuleIssues.hpp.

◆ CTBConfigFailure

CTB Buffer std::string descriptor CTB Repeated Word std::string descriptor dunedaq::CTBConfigFailure

Definition at line 48 of file CTBModuleIssues.hpp.

◆ CTBRepeatedTimestampWarning

CTB Buffer std::string descriptor dunedaq::CTBRepeatedTimestampWarning

Definition at line 38 of file CTBModuleIssues.hpp.

◆ DACValueOutOfRange

dunedaq::DACValueOutOfRange

< Namespace

Issue class name

Definition at line 31 of file DACNode.hpp.

◆ DAQModuleManagerAlreadyInitialized

dunedaq::DAQModuleManagerAlreadyInitialized

Definition at line 37 of file DAQModuleManager.hpp.

◆ DeletedObject

dunedaq::DeletedObject

Definition at line 86 of file Errors.hpp.

◆ descriptor

CTB Buffer std::string descriptor CTB Repeated Word std::string descriptor dunedaq::descriptor

Definition at line 49 of file CTBModuleIssues.hpp.

◆ DeviceInfoSendFailed

dunedaq::DeviceInfoSendFailed

Definition at line 44 of file InfoGatherer.hpp.

◆ DeviceInterfacePDTSStatus

LED calibration failed to ERS_EMPTY dunedaq::DeviceInterfacePDTSStatus

Definition at line 31 of file SSPIssues.hpp.

◆ DuplicatedControlService

The opmon infrastructure has not been set up in the dunedaq::DuplicatedControlService

Definition at line 38 of file util.hpp.

◆ DuplicateTPWindow

dunedaq::DuplicateTPWindow

Definition at line 39 of file TPBundleHandler.hpp.

◆ EntryWithNoData

dunedaq::EntryWithNoData

Definition at line 37 of file MonitorableObject.hpp.

◆ Error

FELIX Initialization dunedaq::Error

Definition at line 27 of file DataHandlingIssues.hpp.

◆ exists

Cannot add TPSet with because another TPSet with these values already dunedaq::exists

Definition at line 42 of file TPBundleHandler.hpp.

◆ failed

Unsupported std::string uri Execution of command dunedaq::failed

Definition at line 69 of file Issues.hpp.

◆ FailedConfiguration

dunedaq::FailedConfiguration

Definition at line 34 of file OpMonPublisher.hpp.

◆ FailedInfoReconstruction

dunedaq::FailedInfoReconstruction

Definition at line 35 of file Utils.hpp.

◆ FailedLEDCalibrationInit

dunedaq::FailedLEDCalibrationInit

Definition at line 21 of file SSPIssues.hpp.

◆ FailedSocketInteraction

Invalid std::string ip dunedaq::FailedSocketInteraction

Definition at line 50 of file DaphneV2Interface.hpp.

◆ FileOpenFailed

dunedaq::FileOpenFailed

Definition at line 52 of file HDF5RawDataFile.hpp.

◆ GeneralDAQModuleIssue

dunedaq::GeneralDAQModuleIssue

Definition at line 72 of file DAQModule.hpp.

◆ GenericConfigurationError

SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror dunedaq::GenericConfigurationError

Definition at line 51 of file DataHandlingIssues.hpp.

◆ IncorrectParameters

Cannot create std::string fatal dunedaq::IncorrectParameters

Definition at line 33 of file kafka_opmon_consumer.cxx.

◆ infomsg

dunedaq::infomsg

Definition at line 43 of file TPRequestHandler.hpp.

◆ InitializationError

dunedaq::InitializationError

Definition at line 31 of file DataHandlingIssues.hpp.

◆ initialize

LED calibration failed to dunedaq::initialize

Definition at line 22 of file SSPIssues.hpp.

◆ initialized

init Command received when already dunedaq::initialized

Definition at line 38 of file DAQModuleManager.hpp.

◆ interrupted

Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility std::string uri The main run loop for command reception was dunedaq::interrupted

Definition at line 85 of file Issues.hpp.

◆ InvalidIPAddress

dunedaq::InvalidIPAddress

Definition at line 38 of file DaphneV2Interface.hpp.

◆ InvalidQueueFatalError

dunedaq::InvalidQueueFatalError

Definition at line 34 of file TimingIssues.hpp.

◆ InvalidSequenceDigits

dunedaq::InvalidSequenceDigits

Definition at line 41 of file HDF5FileLayout.hpp.

◆ InvalidStateForCommand

dunedaq::InvalidStateForCommand

Definition at line 45 of file Application.hpp.

◆ InvalidStreamID

dunedaq::InvalidStreamID

< Namespace

Type of the Issue

Definition at line 44 of file TPCChannelMap.hpp.

◆ Issue

CTB Buffer std::string descriptor CTB Repeated Word dunedaq::Issue

Definition at line 29 of file CTBModuleIssues.hpp.

◆ LoadDalFailed

dunedaq::LoadDalFailed

Definition at line 21 of file DalFactory.hpp.

◆ message

Unknown serialization Cannot deserialize dunedaq::message

Definition at line 142 of file Serialization.hpp.

◆ MissingComponent

dunedaq::MissingComponent

Definition at line 36 of file ConfigurationManager.hpp.

◆ MissingConfiguration

Monitoring thread not ERS_EMPTY dunedaq::MissingConfiguration

Definition at line 40 of file OpMonManager.hpp.

◆ MonitoringThreadNotSet

dunedaq::MonitoringThreadNotSet

Definition at line 30 of file OpMonManager.hpp.

◆ NameMismatch

dunedaq::NameMismatch

Definition at line 34 of file Utils.hpp.

◆ NameNotFound

dunedaq::NameNotFound

Definition at line 29 of file Issues.hpp.

◆ NoOpmonInfrastructure

dunedaq::NoOpmonInfrastructure

Definition at line 27 of file util.hpp.

◆ NotFound

dunedaq::NotFound

Definition at line 67 of file Errors.hpp.

◆ out

FELIX Initialization std::string initerror FELIX queue timed dunedaq::out

Definition at line 24 of file FelixIssues.hpp.

◆ parameters

Cannot create std::string fatal Incorrect dunedaq::parameters

Definition at line 33 of file kafka_opmon_consumer.cxx.

◆ ParserOperationQueuePushFailure

FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int dunedaq::ParserOperationQueuePushFailure

Definition at line 32 of file FelixIssues.hpp.

◆ PDSUnphysicalFrameTimestamp

dunedaq::PDSUnphysicalFrameTimestamp

Definition at line 44 of file DAPHNEFrameProcessor.hpp.

◆ QueueTimeoutError

FELIX Initialization std::string initerror dunedaq::QueueTimeoutError

Definition at line 24 of file FelixIssues.hpp.

◆ QueueTypeMismatch

dunedaq::QueueTypeMismatch

Definition at line 34 of file QueueIssues.hpp.

◆ range

DAC value out of dunedaq::range

Message.

Definition at line 32 of file DACNode.hpp.

◆ reach

LED calibration failed to ERS_EMPTY Endpoint failed to dunedaq::reach

Definition at line 32 of file SSPIssues.hpp.

◆ ReceiveTimeoutExpired

dunedaq::ReceiveTimeoutExpired

Definition at line 46 of file Receiver.hpp.

◆ requested

FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk int ParserOps couldn t push to queue !Failed std::string chunk Invalid FELIX block size and trailer configuration dunedaq::requested

Definition at line 43 of file FelixIssues.hpp.

◆ RunLoopTerminated

Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility std::string uri dunedaq::RunLoopTerminated

Definition at line 84 of file Issues.hpp.

◆ section

Missing configuration dunedaq::section

Message.

Definition at line 38 of file SI534xNode.hpp.

◆ set

Monitoring thread not ERS_EMPTY Confiration is not dunedaq::set

Definition at line 31 of file OpMonManager.hpp.

◆ SI534xMissingConfigSectionError

dunedaq::SI534xMissingConfigSectionError

< Namespace

Issue class name

Definition at line 37 of file SI534xNode.hpp.

◆ SI534xRegWriteRetry

Missing configuration std::string tag dunedaq::SI534xRegWriteRetry

< Namespace

Issue class name

Definition at line 47 of file SI534xNode.hpp.

◆ size

FELIX Initialization std::string initerror FELIX queue timed std::string queuename Unexpected chunk dunedaq::size

Definition at line 28 of file FelixIssues.hpp.

◆ sourceid

Cannot add TPSet with dunedaq::sourceid
Initial value:
="
<< tpset_source_id << "

Definition at line 40 of file TPBundleHandler.hpp.

◆ start_time

Cannot add TPSet with dunedaq::start_time
Initial value:
=" << tpset_start_time
<< " to bundle

Definition at line 41 of file TPBundleHandler.hpp.

◆ TardyTPSetReceived

Cannot add TPSet with because another TPSet with these values already size_t dunedaq::TardyTPSetReceived

Definition at line 45 of file TPBundleHandler.hpp.

◆ TimeoutExpired

dunedaq::TimeoutExpired

Definition at line 26 of file CommonIssues.hpp.

◆ TimeSyncTransmissionFailed

SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror Configuration std::string conferror dunedaq::TimeSyncTransmissionFailed

Definition at line 67 of file DataHandlingIssues.hpp.

◆ TPHandlerMsg

dunedaq::TPHandlerMsg

Definition at line 42 of file TPRequestHandler.hpp.

◆ TPTooLong

dunedaq::TPTooLong

Definition at line 34 of file FDReadoutIssues.hpp.

◆ TriggerInhibited

dunedaq::TriggerInhibited

Definition at line 35 of file Issues.hpp.

◆ ts

PDS Frame with unphysical timestamp detected with dunedaq::ts =" << timestamp << "

Definition at line 45 of file DAPHNEFrameProcessor.hpp.

◆ type

Unknown serialization dunedaq::type

Definition at line 133 of file Serialization.hpp.

◆ UnexpectedChunk

FELIX Initialization std::string initerror FELIX queue timed std::string queuename dunedaq::UnexpectedChunk

Definition at line 28 of file FelixIssues.hpp.

◆ UnknownSerializationTypeEnum

dunedaq::UnknownSerializationTypeEnum

Definition at line 132 of file Serialization.hpp.

◆ UnsupportedUri

dunedaq::UnsupportedUri

Definition at line 29 of file Issues.hpp.

◆ URI

Unsupported dunedaq::URI

Definition at line 30 of file Issues.hpp.

◆ uri

Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility dunedaq::uri

Definition at line 77 of file Issues.hpp.