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

The DUNE-DAQ namespace. More...

Namespaces

namespace  appfwk
namespace  appmodel
namespace  asiolibs
namespace  cibmodules
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  snbmodules
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 (cibmodules, CIBCommunicationError, " CIB Hardware Communication Error: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(cibmodules
CIB Buffer std::string descriptor ERS_DECLARE_ISSUE (cibmodules, CIBWordMatchError, " CIB Word Matching Error: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(cibmodules
CIB Buffer std::string descriptor Message from std::string descriptor ERS_DECLARE_ISSUE (cibmodules, CIBWrongState, " CIB in the wrong state: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(cibmodules
CIB Buffer std::string descriptor Message from std::string descriptor CIB process std::string descriptor ERS_DECLARE_ISSUE (cibmodules, CIBModuleError, " CIB Module error: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(cibmodules
 ERS_DECLARE_ISSUE (daphnemodules, ConfigurationFailed, name<< " failed to retrieve its conf object",((std::string) name)) ERS_DECLARE_ISSUE(daphnemodules
Invalid std::string ip ERS_DECLARE_ISSUE (daphnemodules, InvalidChannelConfiguration, "Channel "<< id<< " has invalid configuration, trim: "<< trim<< ", offset: "<< offset<< ", gain:"<< gain,((uint32_t) id)((uint32_t) trim)((uint32_t) offset)((uint32_t) gain)) ERS_DECLARE_ISSUE(daphnemodules
Invalid std::string ip Too many full stream channels Total size_t tot ERS_DECLARE_ISSUE (daphnemodules, UnsuccessfulConfiguration, name<< ": board reports configuration failure. Message: "<< message,((std::string) name)((std::string) message)) ERS_DECLARE_ISSUE(daphnemodules
 ERS_DECLARE_ISSUE (daphnemodules, FailedPing, "Failed to ping daphne board at "<< ip<< ':'<< port,((std::string) ip)((int) port)) ERS_DECLARE_ISSUE(daphnemodules
 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 (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 (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 (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, "Action plan validation failed: "<< 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 (utilities, ServiceNotFound, "The service "<< service<< " was not found in DNS",((std::string) service)) ERS_DECLARE_ISSUE(utilities
 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, MgtDoesNotExist, "Hermes MGT "<< mgtid<< " does not exist",((int) mgtid))
 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 (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 (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, FailedInfoReconstruction, "Failure to create an object of type "<< type,((std::string) type)) ERS_DECLARE_ISSUE_BASE(opmonlib
 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
Both frame_count_limit and tp_count_limit were set to (disabled) in the TPCRawDataProcessor " "config. TPs will not send."
Both frame_count_limit and tp_count_limit were set ERS_DECLARE_ISSUE (fdreadoutlibs, TPTooLong, "TP with SOT "<< width<< " for channel "<< channel,((uint64_t) width)((uint64_t) channel)) ERS_DECLARE_ISSUE(fdreadoutlibs
 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(confmodel
 ERS_DECLARE_ISSUE_BASE (dfmodules, FileDataStoreImplBadConfiguration, appfwk::GeneralDAQModuleIssue, "Construction of the FileDataStoreImpl base class failed due to faulty configuration",((std::string) name),) ERS_DECLARE_ISSUE_BASE(dfmodules
 Various ERS Issues for exceptional data store situations.
 ERS_DECLARE_ISSUE_BASE (dfmodules, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(dfmodules
 ERS_DECLARE_ISSUE (dfmodules, CantOpenFile, "Unable to open "<< file_name,((std::string) file_name)) ERS_DECLARE_ISSUE(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 (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 (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 (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))
 ERS_DECLARE_ISSUE (appmodel, BadConf, what,((std::string) what)) ERS_DECLARE_ISSUE(appmodel
 ERS_DECLARE_ISSUE (ipm, UnexpectedNumberOfBytes, connection_name<< ": Expected "<< bytes1<< " bytes in message but received "<< bytes2,((std::string) connection_name)((int) bytes1)((int) bytes2)) ERS_DECLARE_ISSUE(ipm
 ERS_DECLARE_ISSUE (ipm, NullPointerPassedToSend, connection_name<< ": An null pointer to memory was passed to Sender::send",((std::string) connection_name)) ERS_DECLARE_ISSUE(ipm
 ERS_DECLARE_ISSUE_BASE (hsilibs, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(hsilibs
 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 (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, MissingSourceIDOutputs, "The following of source ids are available as SourceModels for interface "<< ifaceid<< ": "<< srcs_str,((int) ifaceid)((std::string) srcs_str))
 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)) ERS_DECLARE_ISSUE(dpdklibs
 ERS_DECLARE_ISSUE (iomanager, ConnectionInstanceNotFound, "Connection Instance not found for name "<< name,((std::string) name)) ERS_DECLARE_ISSUE(iomanager
static std::shared_ptr< iomanager::IOManager > get_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 (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 (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 (snbmodules, InvalidGroupTransferIDError, "InvalidGroupTransferIDError: Transfer ID "<< transfer_id<< " not found in "<< location,((std::string) transfer_id)((std::string) location)) ERS_DECLARE_ISSUE(snbmodules
 DUNE_DAQ_SERIALIZABLE (snbmodules::NotificationData, "notification_t")
 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 (serialization, UnknownSerializationTypeString, "Unknown serialization type "<< t,((std::string) t)) ERS_DECLARE_ISSUE(serialization
 Issue for when the serialization type cannot be determined from an input string.
return obj as< T > ()
 catch (msgpack::type_error &e)
 catch (msgpack::unpack_error &e)
 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 (detchannelmaps, PDSChannelMapCreationFailed, "Failed to create PDSChannelMap of type "<< plugin_name,((std::string) plugin_name)) ERS_DECLARE_ISSUE(detchannelmaps
 A ERS Issue for PDSChannelMap creation failure.
 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.

Variables

 CIBBufferWarning
CIB Buffer Issue
CIB Buffer std::string descriptor CIBMessage
CIB Buffer std::string descriptor Message from CIB
CIB Buffer std::string descriptor Message from std::string descriptor CIBProcError
CIB Buffer std::string descriptor Message from std::string descriptor CIB process error
CIB Buffer std::string descriptor Message from std::string descriptor CIB process std::string descriptor CIBConfigFailure
CIB Buffer std::string descriptor Message from std::string descriptor CIB process std::string descriptor descriptor
 InvalidIPAddress
Invalid address
Invalid std::string ip TooManyChannels
Invalid std::string ip Too many full stream channels Total requested
Invalid std::string ip Too many full stream channels Total size_t tot MonitoringFailed
 FailedSocketInteraction
 FailedSend
 InitializationError
FELIX Initialization Error
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
 InvalidQueueFatalError
 DeviceInfoSendFailed
 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
 NameNotFound
 InvalidSequenceDigits
 FileOpenFailed
 EntryWithNoData
 NameMismatch
 FailedInfoReconstruction
 FrameAndTPCountersDisabled
Both frame_count_limit and tp_count_limit were set FailedToSendTPVector
 ConfigurationFailed
 LoadDalFailed
 InvalidOperationMode
 CantWriteToFile
 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
 TriggerInhibited
 TPHandlerMsg
 infomsg
 CommandError
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
 BadStreamConf
 ReceiveTimeoutExpired
 SendTimeoutExpired
 FailedConfiguration
 CannotCreateConsumer
Cannot create consumer
Cannot create std::string fatal IncorrectParameters
Cannot create std::string fatal Incorrect parameters
 UnexpectedStreamID
 TimeoutExpired
 ConnectionNotFound
 QueueTypeMismatch
 NotFound
 DeletedObject
 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
 NotificationWrongDestinationError
 UnknownSerializationTypeByte
Unknown serialization type<< t,((char) t)) template< typename T > inline std::string datatype_to_string() { return "Unknown";} namespace serialization { template< typename T > struct is_serializable :std::false_type {};enum SerializationType { kMsgPack };inline SerializationType from_string(const std::string s) { if(s=="msgpack") return kMsgPack;throw UnknownSerializationTypeString(ERS_HERE, s);} constexpr uint8_t serialization_type_byte(SerializationType stype) { switch(stype) { case kMsgPack:return 'M';default:throw UnknownSerializationTypeEnum(ERS_HERE);} } constexpr SerializationType DEFAULT_SERIALIZATION_TYPE=kMsgPack;template< class T > std::vector< uint8_t > serialize(const T &obj, SerializationType stype=DEFAULT_SERIALIZATION_TYPE) { switch(stype) { case kMsgPack:{ msgpack::sbuffer buf;msgpack::pack(buf, obj);std::vector< uint8_t > ret(buf.size()+1);ret[0]=serialization_type_byte(stype);std::copy(buf.data(), buf.data()+buf.size(), ret.begin()+1);return ret;} default:throw UnknownSerializationTypeEnum(ERS_HERE);} } template< class T, typename CharType=unsigned char > T deserialize(const std::vector< CharType > &v) { switch(v[0]) { case serialization_type_byte(kMsgPack):{ try { msgpack::object_handle oh=msgpack::unpack(const_cast< char * >(reinterpret_cast< const char * >(v.data()+1)), v.size() - 1,[](msgpack::type::object_type, std::size_t, void *) -> bool { return true
msgpack::object obj = oh.get()
default char v [0]
 CTBBufferWarning
CTB Buffer std::string descriptor CTBRepeatedTimestampWarning
CTB Buffer std::string descriptor CTB Repeated Word std::string descriptor CTBConfigFailure
 PDSInvalidStream
 < Namespace
 InvalidStreamID
 < Namespace

Detailed Description

The DUNE-DAQ namespace.

Including Qt.

Including Qt Headers.

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>
void dunedaq::add_array_item ( boost::property_tree::ptree & pt,
const T & val )
static

Definition at line 872 of file Configuration.cpp.

873{
874 boost::property_tree::ptree child;
875 child.put("", val);
876 pt.push_back(std::make_pair("", child));
877}

◆ add_data() [1/2]

template<class T>
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 963 of file Configuration.cpp.

967{
968 auto& o = const_cast<ConfigObject&>(obj);
969 if (!attribute.p_is_multi_value) {
970 T val;
971 const_cast<ConfigObject&>(obj).get(attribute.p_name, val);
972 pt.put(attribute.p_name, val);
973 } else {
974 std::vector<T> values;
975 o.get(attribute.p_name, values);
976
977 boost::property_tree::ptree children;
978
979 if (!values.empty())
980 for (const auto& v : values)
981 add_array_item(children, v);
982
983 else if (!empty_array_item.empty())
984 add_array_item(children, empty_array_item);
985
986 pt.add_child(attribute.p_name, children);
987 }
988}
msgpack::object obj
static void add_array_item(boost::property_tree::ptree &pt, const T &val)
default char v[0]

◆ add_data() [2/2]

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 991 of file Configuration.cpp.

995{
996 if (relationship.p_cardinality == dunedaq::conffwk::zero_or_many ||
998 std::vector<ConfigObject> values;
999 const_cast<ConfigObject&>(obj).get(relationship.p_name, values);
1000
1001 boost::property_tree::ptree children;
1002
1003 if (!values.empty())
1004 for (const auto& v : values)
1005 add_array_item(children, v.full_name());
1006
1007 else if (!empty_array_item.empty())
1008 add_array_item(children, empty_array_item);
1009
1010 pt.add_child(relationship.p_name, children);
1011 } else {
1012 ConfigObject val;
1013 const_cast<ConfigObject&>(obj).get(relationship.p_name, val);
1014 pt.put(relationship.p_name, !val.is_null() ? val.full_name() : "");
1015 }
1016}

◆ as< T >()

return obj dunedaq::as< T > ( )

◆ catch() [1/2]

dunedaq::catch ( msgpack::type_error & e)

Definition at line 254 of file Serialization.hpp.

254 {
255 throw CannotDeserializeMessage(ERS_HERE, e);
256 } catch (msgpack::unpack_error& e) {
#define ERS_HERE

◆ catch() [2/2]

dunedaq::catch ( msgpack::unpack_error & e)

Definition at line 256 of file Serialization.hpp.

256 {
257 throw CannotDeserializeMessage(ERS_HERE, e);
258 }

◆ check_prefetch_needs()

bool dunedaq::check_prefetch_needs ( )
static

Definition at line 85 of file Configuration.cpp.

86{
87 return (getenv("TDAQ_DB_PREFETCH_ALL_DATA") != nullptr);
88}

◆ chunksize()

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

◆ DUNE_DAQ_SERIALIZABLE() [1/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [2/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [3/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [4/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [5/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [6/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [7/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [8/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [9/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [10/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [11/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [12/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [13/15]

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

◆ DUNE_DAQ_SERIALIZABLE() [14/15]

dunedaq::DUNE_DAQ_SERIALIZABLE ( snbmodules::NotificationData ,
"notification_t"  )

◆ DUNE_DAQ_SERIALIZABLE() [15/15]

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

◆ ERS_DECLARE_ISSUE() [1/89]

No such std::string what dunedaq::ERS_DECLARE_ISSUE ( appfwk ,
ActionPlanValidationFailed ,
"Action plan validation failed: "<< cmd<< " ,
module " << module << ":" << message,
((std::string) cmd)((std::string) module)((std::string) message)  )

Definition at line 41 of file ConfigurationManager.hpp.

43 : " << cmd << ", module " << module << ": " << message,
44 ((std::string)cmd)((std::string)module)((std::string)message))
45// Re-enable coverage collection LCOV_EXCL_STOP
46
47namespace appfwk {
48
49class ConfigurationManager
50{
51public:
52 ConfigurationManager(std::string const& config_spec, std::string const& app_name, std::string const& session_name);
53 std::vector<ValidationReport> initialize(bool throw_on_fatal = true);
54
55 const confmodel::Session* get_session() const { return m_session; }
56 const confmodel::Application* get_application()
57 {
58 initialize();
59 return m_application;
60 }
61
62 const std::vector<const confmodel::Queue*>& get_queues()
63 {
64 initialize();
65 return m_queues;
66 }
67 const std::vector<const confmodel::NetworkConnection*>& get_networkconnections()
68 {
69 initialize();
70 return m_networkconnections;
71 }
72 const std::vector<const confmodel::DaqModule*>& get_modules()
73 {
74 initialize();
75 return m_modules;
76 }
77 const confmodel::ConnectivityService* get_connectivity_service()
78 {
79 initialize();
80 return m_connsvc_config;
81 }
82
83 const std::unordered_map<std::string, const confmodel::ActionPlan*>& get_action_plans()
84 {
85 initialize();
86 return m_action_plans;
87 }
88 const confmodel::ActionPlan* get_action_plan(std::string cmd) const;
89
90 template<typename T>
91 const T* get_dal(const std::string& name)
92 {
93 return m_confdb->get<T>(name);
94 }
95
96 std::string get_app_name() const { return m_app_name; }
97
98private:
99 std::shared_ptr<conffwk::Configuration> m_confdb;
100 std::shared_ptr<appmodel::ConfigurationHelper> m_helper;
101 std::string m_app_name;
102 std::string m_session_name;
103
104 const confmodel::Session* m_session;
105 const confmodel::DaqApplication* m_application;
106 std::unordered_map<std::string, const confmodel::ActionPlan*> m_action_plans;
107 std::vector<const confmodel::DaqModule*> m_modules;
108 std::vector<const confmodel::Queue*> m_queues;
109 std::vector<const confmodel::NetworkConnection*> m_networkconnections;
110 const confmodel::ConnectivityService* m_connsvc_config;
111
112 bool m_initialized{ false };
113};
114
115} // namespace appfwk
get_app_name(proc_cmdline)

◆ ERS_DECLARE_ISSUE() [2/89]

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

◆ ERS_DECLARE_ISSUE() [3/89]

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/89]

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/89]

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

◆ ERS_DECLARE_ISSUE() [6/89]

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

◆ ERS_DECLARE_ISSUE() [7/89]

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

◆ ERS_DECLARE_ISSUE() [8/89]

dunedaq::ERS_DECLARE_ISSUE ( cibmodules ,
CIBCommunicationError ,
" CIB Hardware Communication Error: "<< descriptor,
((std::string) descriptor)  )

◆ ERS_DECLARE_ISSUE() [9/89]

CIB Buffer std::string descriptor Message from std::string descriptor CIB process std::string descriptor dunedaq::ERS_DECLARE_ISSUE ( cibmodules ,
CIBModuleError ,
" CIB Module error: "<< descriptor,
((std::string) descriptor)  )

◆ ERS_DECLARE_ISSUE() [10/89]

CIB Buffer std::string descriptor dunedaq::ERS_DECLARE_ISSUE ( cibmodules ,
CIBWordMatchError ,
" CIB Word Matching Error: "<< descriptor,
((std::string) descriptor)  )

◆ ERS_DECLARE_ISSUE() [11/89]

CIB Buffer std::string descriptor Message from std::string descriptor dunedaq::ERS_DECLARE_ISSUE ( cibmodules ,
CIBWrongState ,
" CIB in the wrong state: "<< descriptor,
((std::string) descriptor)  )

◆ ERS_DECLARE_ISSUE() [12/89]

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

◆ ERS_DECLARE_ISSUE() [13/89]

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() [14/89]

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() [15/89]

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

cmdlib specific issues

◆ ERS_DECLARE_ISSUE() [16/89]

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() [17/89]

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

◆ ERS_DECLARE_ISSUE() [18/89]

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

◆ ERS_DECLARE_ISSUE() [19/89]

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() [20/89]

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

◆ ERS_DECLARE_ISSUE() [21/89]

dunedaq::ERS_DECLARE_ISSUE ( daphnemodules ,
ConfigurationFailed ,
name<< " failed to retrieve its conf object" ,
((std::string) name)  )

◆ ERS_DECLARE_ISSUE() [22/89]

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

◆ ERS_DECLARE_ISSUE() [23/89]

Invalid std::string ip dunedaq::ERS_DECLARE_ISSUE ( daphnemodules ,
InvalidChannelConfiguration ,
"Channel "<< id<< " has invalid configuration,
trim:" << trim << " ,
offset:" << offset << " ,
gain:" << gain,
((uint32_t) id)((uint32_t) trim)((uint32_t) offset)((uint32_t) gain)  )

◆ ERS_DECLARE_ISSUE() [24/89]

Invalid std::string ip Too many full stream channels Total size_t tot dunedaq::ERS_DECLARE_ISSUE ( daphnemodules ,
UnsuccessfulConfiguration ,
name<< ": board reports configuration failure. Message: "<< message,
((std::string) name)((std::string) message)  )

◆ ERS_DECLARE_ISSUE() [25/89]

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() [26/89]

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() [27/89]

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() [28/89]

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

◆ ERS_DECLARE_ISSUE() [29/89]

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
-Namespace
-Type of the Issue
plugin_nameLog Message from the issue
-Message parameters

◆ ERS_DECLARE_ISSUE() [30/89]

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

A ERS Issue for PDSChannelMap creation failure.

Parameters
-Namespace
-Type of the Issue
plugin_nameLog Message from the issue
-Message parameters

◆ ERS_DECLARE_ISSUE() [31/89]

dunedaq::ERS_DECLARE_ISSUE ( dfmodules ,
CantOpenFile ,
"Unable to open "<< file_name,
((std::string) file_name)  )

◆ ERS_DECLARE_ISSUE() [32/89]

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

◆ ERS_DECLARE_ISSUE() [33/89]

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() [34/89]

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
89 {
90 return std::tie(det_id, crate_id, slot_id, stream_id) <
91 std::tie(rhs.det_id, rhs.crate_id, rhs.slot_id, rhs.stream_id);
92 }
93
94 bool operator==(const StreamUID& rhs) const
95 {
96 return det_id == rhs.det_id && crate_id == rhs.crate_id && slot_id == rhs.slot_id && stream_id == rhs.stream_id;
97 }
98 operator std::string() const { return fmt::format("({}, {}, {}, {})", det_id, crate_id, slot_id, stream_id); }
99};
100
101} // namespace udp
102} // namespace dpdklibs
bool operator==(const OksSystem::File &a, const OksSystem::File &b)
Definition File.cpp:956
DAQEthHeader is a versioned and unified structure for every FE electronics.

◆ ERS_DECLARE_ISSUE() [35/89]

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

◆ ERS_DECLARE_ISSUE() [36/89]

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

◆ ERS_DECLARE_ISSUE() [37/89]

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

◆ ERS_DECLARE_ISSUE() [38/89]

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

◆ ERS_DECLARE_ISSUE() [39/89]

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() [40/89]

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

◆ ERS_DECLARE_ISSUE() [41/89]

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

◆ ERS_DECLARE_ISSUE() [42/89]

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

◆ ERS_DECLARE_ISSUE() [43/89]

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

◆ ERS_DECLARE_ISSUE() [44/89]

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

◆ ERS_DECLARE_ISSUE() [45/89]

dunedaq::ERS_DECLARE_ISSUE ( dpdklibs ,
MissingSourceIDOutputs ,
"The following of source ids are available as SourceModels for interface "<< ifaceid<< ": "<< srcs_str,
((int) ifaceid)((std::string) srcs_str)  )

◆ ERS_DECLARE_ISSUE() [46/89]

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

◆ ERS_DECLARE_ISSUE() [47/89]

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() [48/89]

Both frame_count_limit and tp_count_limit were set dunedaq::ERS_DECLARE_ISSUE ( fdreadoutlibs ,
TPTooLong ,
"TP with SOT "<< width<< " for channel "<< channel,
((uint64_t) width)((uint64_t) channel)  )

◆ ERS_DECLARE_ISSUE() [49/89]

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

◆ ERS_DECLARE_ISSUE() [50/89]

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() [51/89]

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

◆ ERS_DECLARE_ISSUE() [52/89]

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() [53/89]

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

◆ ERS_DECLARE_ISSUE() [54/89]

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

◆ ERS_DECLARE_ISSUE() [55/89]

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

◆ ERS_DECLARE_ISSUE() [56/89]

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

◆ ERS_DECLARE_ISSUE() [57/89]

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() [58/89]

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

◆ ERS_DECLARE_ISSUE() [59/89]

dunedaq::ERS_DECLARE_ISSUE ( hermesmodules ,
MgtDoesNotExist ,
"Hermes MGT "<< mgtid<< " does not exist" ,
((int) mgtid)  )

◆ ERS_DECLARE_ISSUE() [60/89]

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

◆ ERS_DECLARE_ISSUE() [61/89]

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

◆ ERS_DECLARE_ISSUE() [62/89]

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() [63/89]

dunedaq::ERS_DECLARE_ISSUE ( ipm ,
NullPointerPassedToSend ,
connection_name<< ": An null pointer to memory was passed to Sender::send" ,
((std::string) connection_name)  )

◆ ERS_DECLARE_ISSUE() [64/89]

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

◆ ERS_DECLARE_ISSUE() [65/89]

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

◆ ERS_DECLARE_ISSUE() [66/89]

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

◆ ERS_DECLARE_ISSUE() [67/89]

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

◆ ERS_DECLARE_ISSUE() [68/89]

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 33 of file data.cpp.

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

◆ ERS_DECLARE_ISSUE() [69/89]

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

◆ ERS_DECLARE_ISSUE() [70/89]

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() [71/89]

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

◆ ERS_DECLARE_ISSUE() [72/89]

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

◆ ERS_DECLARE_ISSUE() [73/89]

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

Issue for when the serialization type cannot be determined from an input string.

Issue for when the serialization type byte cannot be determined from the SerializationType enum Issue for when the serialization type cannot be determined from the given type byte

◆ ERS_DECLARE_ISSUE() [74/89]

dunedaq::ERS_DECLARE_ISSUE ( snbmodules ,
InvalidGroupTransferIDError ,
"InvalidGroupTransferIDError: Transfer ID "<< transfer_id<< " not found in "<< location,
((std::string) transfer_id)((std::string) location)  )

◆ ERS_DECLARE_ISSUE() [75/89]

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() [76/89]

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

◆ ERS_DECLARE_ISSUE() [77/89]

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() [78/89]

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

◆ ERS_DECLARE_ISSUE() [79/89]

dunedaq::ERS_DECLARE_ISSUE ( timing ,
DACChannelOutOfRange ,
" DAC channel out of range: "<< channel,
((std::string) channel)  )
Parameters
-Namespace
-Issue class name
channelMessage
-Message parameters

◆ ERS_DECLARE_ISSUE() [80/89]

dunedaq::ERS_DECLARE_ISSUE ( timing ,
FileNotFound ,
file_path<< " does not exist!" ,
((std::string) file_path)  )
Parameters
-Namespace
-Issue class name
-Message
-Message parameters

◆ ERS_DECLARE_ISSUE() [81/89]

dunedaq::ERS_DECLARE_ISSUE ( timing ,
SI534xConfigError ,
" SI534xConfigError: "<< message,
((std::string) message)  )
Parameters
-Namespace
-Issue class name
messageMessage
-Message parameters

◆ ERS_DECLARE_ISSUE() [82/89]

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
-Namespace
-Issue class name
dataMessage
-Message parameters

◆ ERS_DECLARE_ISSUE() [83/89]

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
-Namespace
-Issue class name
errorMessage
-Message parameters // NOLINT

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
CIB Buffer std::string descriptor Message from std::string descriptor CIB process error

◆ ERS_DECLARE_ISSUE() [84/89]

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() [85/89]

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
-Namespace
-Issue class name
stateMessage
-Message parameters

Definition at line 36 of file TimingController.hpp.

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

◆ ERS_DECLARE_ISSUE() [86/89]

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

Parameters
-Namespace
-Issue class name
-Message
-Message parameters

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&) =
51 delete;
52 TimingMasterControllerBase& operator=(const TimingMasterControllerBase&) =
53 delete;
54 TimingMasterControllerBase(TimingMasterControllerBase&&) =
55 delete;
56 TimingMasterControllerBase& operator=(TimingMasterControllerBase&&) =
57 delete;
58 virtual ~TimingMasterControllerBase()
59 {
60 if (endpoint_scan_thread.thread_running())
61 endpoint_scan_thread.stop_working_thread();
62 }
63
64protected:
65 // Commands
66 void do_configure(const CommandData_t&) override;
67 void do_start(const CommandData_t& data) override;
68 void do_stop(const CommandData_t& data) override;
69 void send_configure_hardware_commands(const CommandData_t& data) override;
70
71 // timing master commands
72 void do_master_set_timestamp(const CommandData_t&);
73 void do_master_set_endpoint_delay(const CommandData_t& data);
74 void do_master_send_fl_command(const CommandData_t& data);
75 void do_master_measure_endpoint_rtt(const CommandData_t& data);
76 void do_master_endpoint_scan(const CommandData_t& data);
77
78 // pass op mon info
79 // void get_info(opmonlib::InfoCollector& ci, int level) override;
80
81 timingcmd::TimingEndpointLocations m_monitored_endpoint_locations;
82 uint m_endpoint_scan_period; // NOLINT(build/unsigned)
83 dunedaq::utilities::WorkerThread endpoint_scan_thread;
84 virtual void endpoint_scan(std::atomic<bool>&);
85};
86} // namespace timinglibs
WorkerThread contains a thread which runs the do_work() function.
std::vector< dunedaq::timinglibs::timingcmd::EndpointLocation > TimingEndpointLocations
Definition Structs.hpp:112

◆ ERS_DECLARE_ISSUE() [87/89]

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() [88/89]

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

◆ ERS_DECLARE_ISSUE() [89/89]

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

◆ ERS_DECLARE_ISSUE_BASE() [1/7]

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/7]

dunedaq::ERS_DECLARE_ISSUE_BASE ( dfmodules ,
FileDataStoreImplBadConfiguration ,
appfwk::GeneralDAQModuleIssue ,
"Construction of the FileDataStoreImpl base class failed due to faulty configuration" ,
((std::string) name)  )

Various ERS Issues for exceptional data store situations.

◆ ERS_DECLARE_ISSUE_BASE() [3/7]

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

◆ ERS_DECLARE_ISSUE_BASE() [4/7]

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

◆ ERS_DECLARE_ISSUE_BASE() [5/7]

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

◆ ERS_DECLARE_ISSUE_BASE() [6/7]

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

◆ ERS_DECLARE_ISSUE_BASE() [7/7]

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>
std::shared_ptr< iomanager::ReceiverConcept< Datatype > > dunedaq::get_iom_receiver ( iomanager::ConnectionId const & id)
static

Definition at line 178 of file IOManager.hxx.

179{
180 return iomanager::IOManager::get()->get_receiver<Datatype>(id);
181}
static std::shared_ptr< IOManager > get()
Definition IOManager.hpp:40

◆ get_iom_receiver() [2/2]

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

Definition at line 192 of file IOManager.hxx.

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

◆ get_iom_sender() [1/2]

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

Definition at line 171 of file IOManager.hxx.

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

◆ get_iom_sender() [2/2]

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

Definition at line 185 of file IOManager.hxx.

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

◆ get_iomanager()

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

Definition at line 164 of file IOManager.hxx.

165{
167}

◆ get_new()

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 53 of file Configuration.cpp.

54{
55 T* retval = new T;
56 co.get(attrname, *retval);
57 return retval;
58}

◆ init_regex()

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

Definition at line 858 of file Configuration.cpp.

859{
860 if (!str.empty())
861 try {
862 ptr = std::make_unique<std::regex>(str);
863 } catch (const std::regex_error& ex) {
864 std::ostringstream text;
865 text << "failed to create " << what << " regex \"" << str << "\": " << ex.what();
866 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
867 }
868}

◆ operator<<() [1/3]

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

Definition at line 1752 of file Configuration.cpp.

1754{
1755 c.print(s);
1756 return s;
1757}

◆ operator<<() [2/3]

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

Definition at line 1664 of file Configuration.cpp.

1666{
1667 s << " changes for class \'" << c.get_class_name() << "\' include:\n";
1668
1669 print_svect(s, c.get_modified_objs(), " modified object(s)");
1670 print_svect(s, c.get_created_objs(), " created object(s)");
1671 print_svect(s, c.get_removed_objs(), " removed object(s)");
1672
1673 return s;
1674}
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 1676 of file Configuration.cpp.

1678{
1679 s << "There are configuration changes in " << v.size() << " classes:\n";
1680
1681 for (const auto& i : v)
1682 s << *i;
1683
1684 return s;
1685}

◆ print_svect()

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

Definition at line 1652 of file Configuration.cpp.

1653{
1654 s << " * " << v.size() << name;
1655
1656 for (auto i = v.begin(); i != v.end(); ++i) {
1657 s << ((i == v.begin()) ? ": " : ", ");
1658 s << '\"' << *i << '\"';
1659 }
1660
1661 s << std::endl;
1662}

◆ sourceid()

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

◆ to()

Both frame_count_limit and tp_count_limit were set dunedaq::to ( disabled )

◆ 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__

default dunedaq::__pad0__

Definition at line 72 of file DAQModule.hpp.

◆ address

Invalid dunedaq::address

Definition at line 26 of file CommonIssues.hpp.

◆ AssignedTriggerDecisionNotFound

dunedaq::AssignedTriggerDecisionNotFound

Definition at line 41 of file TriggerRecordBuilderData.hpp.

◆ BadStreamConf

dunedaq::BadStreamConf

Definition at line 11 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 44 of file FelixIssues.hpp.

◆ bool

Unknown serialization type<< t, ((char)t)) template<typename T> inline std::string datatype_to_string() { return "Unknown"; } namespace serialization { template<typename T> struct is_serializable : std::false_type {}; enum SerializationType { kMsgPack }; inline SerializationType from_string(const std::string s) { if (s == "msgpack") return kMsgPack; throw UnknownSerializationTypeString(ERS_HERE, s); } constexpr uint8_t serialization_type_byte(SerializationType stype) { switch (stype) { case kMsgPack: return 'M'; default: throw UnknownSerializationTypeEnum(ERS_HERE); } } constexpr SerializationType DEFAULT_SERIALIZATION_TYPE = kMsgPack; template<class T> std::vector<uint8_t> serialize(const T& obj, SerializationType stype = DEFAULT_SERIALIZATION_TYPE) { switch (stype) { case kMsgPack: { msgpack::sbuffer buf; msgpack::pack(buf, obj); std::vector<uint8_t> ret(buf.size() + 1); ret[0] = serialization_type_byte(stype); std::copy(buf.data(), buf.data() + buf.size(), ret.begin() + 1); return ret; } default: throw UnknownSerializationTypeEnum(ERS_HERE); } } template<class T, typename CharType = unsigned char> T deserialize(const std::vector<CharType>& v) { switch (v[0]) { case serialization_type_byte(kMsgPack): { try { msgpack::object_handle oh = msgpack::unpack( const_cast<char*>(reinterpret_cast<const char*>(v.data() + 1)), v.size() - 1, [](msgpack::type::object_type , std::size_t , void* ) -> dunedaq::bool { return true

Definition at line 251 of file Serialization.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.

◆ CantWriteToFile

dunedaq::CantWriteToFile

Definition at line 26 of file SummaryTextDataWriter.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 35 of file FelixIssues.hpp.

◆ CIB

CIB Buffer std::string descriptor Message from dunedaq::CIB

Definition at line 27 of file CIBModuleIssues.hpp.

◆ CIBBufferWarning

dunedaq::CIBBufferWarning

Definition at line 23 of file CIBModuleIssues.hpp.

◆ CIBConfigFailure

CIB Buffer std::string descriptor Message from std::string descriptor CIB process std::string descriptor dunedaq::CIBConfigFailure

Definition at line 35 of file CIBModuleIssues.hpp.

◆ CIBMessage

CIB Buffer std::string descriptor dunedaq::CIBMessage

Definition at line 27 of file CIBModuleIssues.hpp.

◆ CIBProcError

CIB Buffer std::string descriptor Message from std::string descriptor dunedaq::CIBProcError

Definition at line 31 of file CIBModuleIssues.hpp.

◆ CommandError

dunedaq::CommandError

Definition at line 26 of file DataHandlingIssues.hpp.

◆ CommandExecutionFailed

Unsupported std::string uri dunedaq::CommandExecutionFailed

Definition at line 62 of file Issues.hpp.

◆ CommandFacilityCreationFailed

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

Definition at line 70 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 39 of file ConfigurationManager.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 49 of file DAQModuleManager.hpp.

◆ ConnectionNotFound

dunedaq::ConnectionNotFound

Definition at line 28 of file NetworkIssues.hpp.

◆ consumer

Cannot create dunedaq::consumer

Definition at line 29 of file kafka_opmon_consumer.cxx.

◆ CorruptedFile

dunedaq::CorruptedFile

< Namespace

Issue class name

Definition at line 28 of file TimingIssues.hpp.

◆ CTBBufferWarning

dunedaq::CTBBufferWarning

Definition at line 27 of file CTBModuleIssues.hpp.

◆ CTBConfigFailure

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

Definition at line 41 of file CTBModuleIssues.hpp.

◆ CTBRepeatedTimestampWarning

CTB Buffer std::string descriptor dunedaq::CTBRepeatedTimestampWarning

Definition at line 35 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 39 of file DAQModuleManager.hpp.

◆ DeletedObject

dunedaq::DeletedObject

Definition at line 67 of file Errors.hpp.

◆ descriptor

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

Definition at line 35 of file CIBModuleIssues.hpp.

◆ DeviceInfoSendFailed

dunedaq::DeviceInfoSendFailed

Definition at line 44 of file InfoGatherer.hpp.

◆ DuplicateTPWindow

dunedaq::DuplicateTPWindow

Definition at line 39 of file TPBundleHandler.hpp.

◆ EntryWithNoData

dunedaq::EntryWithNoData

Definition at line 35 of file MonitorableObject.hpp.

◆ Error

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

Definition at line 20 of file FelixIssues.hpp.

◆ error

CIB Buffer std::string descriptor Message from std::string descriptor CIB process dunedaq::error

Definition at line 31 of file CIBModuleIssues.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 62 of file Issues.hpp.

◆ FailedConfiguration

dunedaq::FailedConfiguration

Definition at line 32 of file OpMonPublisher.hpp.

◆ FailedInfoReconstruction

dunedaq::FailedInfoReconstruction

Definition at line 32 of file Utils.hpp.

◆ FailedSend

dunedaq::FailedSend

Definition at line 37 of file DaphneV3Interface.hpp.

◆ FailedSocketInteraction

dunedaq::FailedSocketInteraction

Definition at line 39 of file DaphneV2Interface.hpp.

◆ FailedToSendTPVector

Both frame_count_limit and tp_count_limit were set dunedaq::FailedToSendTPVector

Definition at line 45 of file FDReadoutIssues.hpp.

◆ FileOpenFailed

dunedaq::FileOpenFailed

Definition at line 52 of file HDF5RawDataFile.hpp.

◆ FrameAndTPCountersDisabled

dunedaq::FrameAndTPCountersDisabled

Definition at line 35 of file FDReadoutIssues.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 38 of file TPRequestHandler.hpp.

◆ InitializationError

SourceID[" << sourceid << "] Command daqdataformats::SourceID dunedaq::InitializationError

Definition at line 20 of file FelixIssues.hpp.

◆ initialized

init Command received when already dunedaq::initialized

Definition at line 40 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 81 of file Issues.hpp.

◆ InvalidIPAddress

dunedaq::InvalidIPAddress

Definition at line 26 of file CommonIssues.hpp.

◆ InvalidOperationMode

dunedaq::InvalidOperationMode

Definition at line 74 of file FileDataStoreImpl.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 42 of file TPCChannelMap.hpp.

◆ Issue

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

Definition at line 23 of file CIBModuleIssues.hpp.

◆ LoadDalFailed

dunedaq::LoadDalFailed

Definition at line 12 of file confmodelIssues.hpp.

◆ MissingComponent

dunedaq::MissingComponent

Definition at line 39 of file ConfigurationManager.hpp.

◆ MonitoringFailed

Invalid std::string ip Too many full stream channels Total size_t tot dunedaq::MonitoringFailed

Definition at line 45 of file CommonIssues.hpp.

◆ NameMismatch

dunedaq::NameMismatch

Definition at line 31 of file Utils.hpp.

◆ NameNotFound

dunedaq::NameNotFound

Definition at line 24 of file Issues.hpp.

◆ NotFound

dunedaq::NotFound

Definition at line 55 of file Errors.hpp.

◆ NotificationWrongDestinationError

dunedaq::NotificationWrongDestinationError

Definition at line 23 of file errors_declaration.hpp.

◆ obj

msgpack::object dunedaq::obj = oh.get()

Definition at line 252 of file Serialization.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 34 of file FelixIssues.hpp.

◆ PDSInvalidStream

dunedaq::PDSInvalidStream

< Namespace

Type of the Issue

Definition at line 41 of file PDSChannelMap.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.

◆ ReceiveTimeoutExpired

dunedaq::ReceiveTimeoutExpired

Definition at line 45 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 36 of file CommonIssues.hpp.

◆ RunLoopTerminated

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

Definition at line 80 of file Issues.hpp.

◆ section

Missing configuration dunedaq::section

Message.

Definition at line 38 of file SI534xNode.hpp.

◆ SendTimeoutExpired

dunedaq::SendTimeoutExpired

Definition at line 45 of file Sender.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 30 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 66 of file DataHandlingIssues.hpp.

◆ TooManyChannels

Invalid std::string ip dunedaq::TooManyChannels

Definition at line 35 of file CommonIssues.hpp.

◆ TPHandlerMsg

dunedaq::TPHandlerMsg

Definition at line 38 of file TPRequestHandler.hpp.

◆ TriggerInhibited

dunedaq::TriggerInhibited

Definition at line 35 of file Issues.hpp.

◆ UnexpectedChunk

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

Definition at line 29 of file FelixIssues.hpp.

◆ UnexpectedStreamID

dunedaq::UnexpectedStreamID

Definition at line 45 of file IfaceWrapper.hpp.

◆ UnknownSerializationTypeByte

dunedaq::UnknownSerializationTypeByte

Definition at line 149 of file Serialization.hpp.

◆ UnsupportedUri

dunedaq::UnsupportedUri

Definition at line 28 of file Issues.hpp.

◆ URI

Unsupported dunedaq::URI

Definition at line 28 of file Issues.hpp.

◆ uri

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

Definition at line 71 of file Issues.hpp.

◆ v

default char dunedaq::v[0]

Definition at line 261 of file Serialization.hpp.