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

Including Qt Headers. More...

Namespaces

namespace  appfwk
namespace  appmodel
namespace  asiolibs
namespace  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 (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 (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 (utilities, ServiceNotFound, "The service "<< service<< " was not found in DNS",((std::string) service)) ERS_DECLARE_ISSUE(utilities
 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.
 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 (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, SocketCreationError, "Failed to create a socket", ERS_EMPTY) ERS_DECLARE_ISSUE(daphnemodules
 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 (iomanager, ConnectionInstanceNotFound, "Connection Instance not found for name "<< name,((std::string) name)) ERS_DECLARE_ISSUE(iomanager
static std::shared_ptr< iomanager::IOManagerget_iomanager ()
template<typename Datatype>
static std::shared_ptr< iomanager::SenderConcept< Datatype > > get_iom_sender (iomanager::ConnectionId const &id)
template<typename Datatype>
static std::shared_ptr< iomanager::ReceiverConcept< Datatype > > get_iom_receiver (iomanager::ConnectionId const &id)
template<typename Datatype>
static std::shared_ptr< iomanager::SenderConcept< Datatype > > get_iom_sender (std::string const &uid)
template<typename Datatype>
static std::shared_ptr< iomanager::ReceiverConcept< Datatype > > get_iom_receiver (std::string const &uid)
 ERS_DECLARE_ISSUE (iomanager, NetworkMessageNotSerializable, "Object of type "<< type<< " is not serializable but configured for network transfer!",((std::string) type)) ERS_DECLARE_ISSUE(iomanager
 ERS_DECLARE_ISSUE (iomanager, QueueTypeUnknown, "Queue type \""<< queue_type<< "\" is unknown ",((std::string) queue_type)) ERS_DECLARE_ISSUE(iomanager
 QueueTypeUnknown ERS Issue.
 ERS_DECLARE_ISSUE (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 (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 (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 (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 (opmonlib, OpmonServiceCreationFailed, "OpmonServiceCreationFailed: "<< error,((std::string) error))
 ERS_DECLARE_ISSUE (opmonlib, OpMonFacilityCreationFailed, "Facility "<< type<< ": creation failed",((std::string) type))
 ERS_DECLARE_ISSUE (opmonlib, NonUniqueNodeName, name<< " already present in the node list of "<< opmon_id,((std::string) name)((std::string) opmon_id)) ERS_DECLARE_ISSUE(opmonlib
 ERS_DECLARE_ISSUE (opmonlib, ThreadNameTooLong, "The name "<< name<< " is too long for a thread name",((std::string) name)) ERS_DECLARE_ISSUE(opmonlib
Monitoring thread not ERS_EMPTY ERS_DECLARE_ISSUE (opmonlib, FailedMonitoringThread, "Monitoring thread failed to start", ERS_EMPTY) ERS_DECLARE_ISSUE(opmonlib
 ERS_DECLARE_ISSUE (opmonlib, FailedInfoReconstruction, "Failure to create an object of type "<< type,((std::string) type)) ERS_DECLARE_ISSUE_BASE(opmonlib
 ERS_DECLARE_ISSUE (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 (confmodel, InvalidOpMonFile, file_name<< " is an invalid name for the opmon output",((std::string) file_name)) ERS_DECLARE_ISSUE(confmodel
 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 (sspmodules, ConfigurationError, "SSP Configuration Error: "<< conferror,((std::string) conferror)) ERS_DECLARE_ISSUE(sspmodules
LED calibration failed to ERS_EMPTY ERS_DECLARE_ISSUE (sspmodules, FailedLEDCalibrationConf, "LED calibration failed to configure", ERS_EMPTY) ERS_DECLARE_ISSUE(sspmodules
 ERS_DECLARE_ISSUE (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 (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 (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_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_BASE (hsilibs, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(hsilibs
 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_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 (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 (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
 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 (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_BASE (dfmodules, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(dfmodules
 ERS_DECLARE_ISSUE (dfmodules, NoTPsInWindow, "No TriggerPrimitives were used from a TPSet with start_time="<< tpset_start_time<< ", end_time="<< tpset_end_time<< ", TSAccumulator begin and end times:"<< window_begin_time<< ", "<< window_end_time,((daqdataformats::timestamp_t) tpset_start_time)((daqdataformats::timestamp_t) tpset_end_time)((daqdataformats::timestamp_t) window_begin_time)((daqdataformats::timestamp_t) window_end_time)) ERS_DECLARE_ISSUE(dfmodules
Cannot add TPSet with because another TPSet with these values already size_t tpset_source_id ((daqdataformats::timestamp_t) tpset_start_time)) ERS_DECLARE_ISSUE(dfmodules
 ERS_DECLARE_ISSUE (dfmodules, DFOThresholdsNotConsistent, "Busy threshold ("<< busy<< ") is smaller than free threshold ("<< free<< ')',((size_t) busy)((size_t) free)) ERS_DECLARE_ISSUE(dfmodules
 ERS_DECLARE_ISSUE (appmodel, BadConf, what,((std::string) what)) ERS_DECLARE_ISSUE(appmodel
 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

Variables

 NotificationWrongDestinationError
NotificationWrongDestinationError __pad0__
 UnexpectedStreamID
 NameNotFound
 PDSInvalidStream
 < Namespace
 InvalidStreamID
 < Namespace
 ReceiveTimeoutExpired
 SendTimeoutExpired
 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
 FailedPing
 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 Error
SourceID[" << sourceid << "] Command daqdataformats::SourceID InitializationError
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror BufferedReaderWriterConfigurationError
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror GenericConfigurationError
SourceID[" << sourceid << "] Command daqdataformats::SourceID Readout Initialization std::string initerror Configuration std::string conferror Configuration std::string conferror TimeSyncTransmissionFailed
 TimeoutExpired
 ConnectionNotFound
 QueueTypeMismatch
 LoadDalFailed
 NotFound
 DeletedObject
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
 EntryWithNoData
 MonitoringThreadNotSet
Monitoring thread not set
Monitoring thread not ERS_EMPTY MissingConfiguration
 NameMismatch
 FailedInfoReconstruction
 FrameAndTPCountersDisabled
Both frame_count_limit and tp_count_limit were set FailedToSendTPVector
 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
 FailedLEDCalibrationInit
LED calibration failed to initialize
LED calibration failed to ERS_EMPTY DeviceInterfacePDTSStatus
LED calibration failed to ERS_EMPTY Endpoint failed to reach
 MissingComponent
No such component
 GeneralDAQModuleIssue
DAQModule std::string name CommandIssue
 InvalidStateForCommand
 DAQModuleManagerAlreadyInitialized
init Command received when already initialized
init Command received when already ERS_EMPTY ConflictingCommandMatching
 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]
 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
 InvalidQueueFatalError
 InvalidSequenceDigits
 FileOpenFailed
 ConfigurationFailed
 CTBBufferWarning
CTB Buffer std::string descriptor CTBRepeatedTimestampWarning
CTB Buffer std::string descriptor CTB Repeated Word std::string descriptor CTBConfigFailure
 DeviceInfoSendFailed
 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
 BadStreamConf
 FailedConfiguration
 CannotCreateConsumer
Cannot create consumer
Cannot create std::string fatal IncorrectParameters
Cannot create std::string fatal Incorrect parameters

Detailed Description

Including Qt Headers.

The DUNE-DAQ namespace.

Including Qt.

Including c++ Including Schema

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.

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

948{
949 boost::property_tree::ptree child;
950 child.put("", val);
951 pt.push_back(std::make_pair("", child));
952}

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

1045{
1046 auto &o = const_cast<ConfigObject&>(obj);
1047 if (!attribute.p_is_multi_value)
1048 {
1049 T val;
1050 const_cast<ConfigObject&>(obj).get(attribute.p_name, val);
1051 pt.put(attribute.p_name, val);
1052 }
1053 else
1054 {
1055 std::vector<T> values;
1056 o.get(attribute.p_name, values);
1057
1058 boost::property_tree::ptree children;
1059
1060 if (!values.empty())
1061 for (const auto &v : values)
1062 add_array_item(children, v);
1063
1064 else if (!empty_array_item.empty())
1065 add_array_item(children, empty_array_item);
1066
1067 pt.add_child(attribute.p_name, children);
1068 }
1069}
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 1072 of file Configuration.cpp.

1073{
1075 {
1076 std::vector<ConfigObject> values;
1077 const_cast<ConfigObject&>(obj).get(relationship.p_name, values);
1078
1079 boost::property_tree::ptree children;
1080
1081 if (!values.empty())
1082 for (const auto &v : values)
1083 add_array_item(children, v.full_name());
1084
1085 else if (!empty_array_item.empty())
1086 add_array_item(children, empty_array_item);
1087
1088 pt.add_child(relationship.p_name, children);
1089 }
1090 else
1091 {
1092 ConfigObject val;
1093 const_cast<ConfigObject&>(obj).get(relationship.p_name, val);
1094 pt.put(relationship.p_name, !val.is_null() ? val.full_name() : "");
1095 }
1096}

◆ as< T >()

return obj dunedaq::as< T > ( )

◆ catch() [1/2]

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

Definition at line 259 of file Serialization.hpp.

259 {
260 throw CannotDeserializeMessage(ERS_HERE, e);
261 } catch (msgpack::unpack_error& e) {
#define ERS_HERE

◆ catch() [2/2]

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

Definition at line 261 of file Serialization.hpp.

261 {
262 throw CannotDeserializeMessage(ERS_HERE, e);
263 }

◆ check_prefetch_needs()

bool dunedaq::check_prefetch_needs ( )
static

Definition at line 97 of file Configuration.cpp.

98{
99 return (getenv("TDAQ_DB_PREFETCH_ALL_DATA") != nullptr);
100}

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

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
LED calibration failed to initialize
Definition SSPIssues.hpp:22

◆ ERS_DECLARE_ISSUE() [2/92]

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

◆ ERS_DECLARE_ISSUE() [3/92]

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

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

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

◆ ERS_DECLARE_ISSUE() [6/92]

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

◆ ERS_DECLARE_ISSUE() [7/92]

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

◆ ERS_DECLARE_ISSUE() [8/92]

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

◆ ERS_DECLARE_ISSUE() [9/92]

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

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

◆ ERS_DECLARE_ISSUE() [11/92]

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

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

◆ ERS_DECLARE_ISSUE() [13/92]

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

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

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

cmdlib specific issues

◆ ERS_DECLARE_ISSUE() [16/92]

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

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

◆ ERS_DECLARE_ISSUE() [18/92]

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

◆ ERS_DECLARE_ISSUE() [19/92]

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

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

◆ ERS_DECLARE_ISSUE() [21/92]

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

◆ ERS_DECLARE_ISSUE() [22/92]

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() [23/92]

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

◆ ERS_DECLARE_ISSUE() [24/92]

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

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

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

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

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

◆ ERS_DECLARE_ISSUE() [29/92]

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

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

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

◆ ERS_DECLARE_ISSUE() [32/92]

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() [33/92]

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

Definition at line 30 of file Utils.hpp.

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

◆ ERS_DECLARE_ISSUE() [34/92]

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

◆ ERS_DECLARE_ISSUE() [35/92]

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

◆ ERS_DECLARE_ISSUE() [36/92]

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

◆ ERS_DECLARE_ISSUE() [37/92]

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

◆ ERS_DECLARE_ISSUE() [38/92]

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() [39/92]

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

◆ ERS_DECLARE_ISSUE() [40/92]

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

◆ ERS_DECLARE_ISSUE() [41/92]

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

◆ ERS_DECLARE_ISSUE() [42/92]

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

◆ ERS_DECLARE_ISSUE() [43/92]

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

◆ ERS_DECLARE_ISSUE() [44/92]

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() [45/92]

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

◆ ERS_DECLARE_ISSUE() [46/92]

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() [47/92]

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

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

◆ ERS_DECLARE_ISSUE() [49/92]

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() [50/92]

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

◆ ERS_DECLARE_ISSUE() [51/92]

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() [52/92]

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

◆ ERS_DECLARE_ISSUE() [53/92]

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

◆ ERS_DECLARE_ISSUE() [54/92]

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

◆ ERS_DECLARE_ISSUE() [55/92]

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

◆ ERS_DECLARE_ISSUE() [56/92]

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() [57/92]

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

◆ ERS_DECLARE_ISSUE() [58/92]

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

◆ ERS_DECLARE_ISSUE() [59/92]

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

◆ ERS_DECLARE_ISSUE() [60/92]

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

◆ ERS_DECLARE_ISSUE() [61/92]

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() [62/92]

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

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() [64/92]

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

◆ ERS_DECLARE_ISSUE() [65/92]

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

◆ ERS_DECLARE_ISSUE() [66/92]

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

◆ ERS_DECLARE_ISSUE() [67/92]

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

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

◆ ERS_DECLARE_ISSUE() [68/92]

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

◆ ERS_DECLARE_ISSUE() [69/92]

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

◆ ERS_DECLARE_ISSUE() [70/92]

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

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

◆ ERS_DECLARE_ISSUE() [72/92]

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

◆ ERS_DECLARE_ISSUE() [73/92]

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

◆ ERS_DECLARE_ISSUE() [74/92]

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() [75/92]

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

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

◆ ERS_DECLARE_ISSUE() [77/92]

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

◆ ERS_DECLARE_ISSUE() [78/92]

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() [79/92]

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

◆ ERS_DECLARE_ISSUE() [80/92]

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() [81/92]

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

◆ ERS_DECLARE_ISSUE() [82/92]

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() [83/92]

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() [84/92]

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

◆ ERS_DECLARE_ISSUE() [85/92]

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() [86/92]

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() [87/92]

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

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.

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

◆ ERS_DECLARE_ISSUE() [89/92]

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

◆ ERS_DECLARE_ISSUE() [90/92]

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() [91/92]

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

◆ ERS_DECLARE_ISSUE() [92/92]

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

◆ ERS_DECLARE_ISSUE_BASE() [1/6]

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

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

◆ ERS_DECLARE_ISSUE_BASE() [3/6]

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

◆ ERS_DECLARE_ISSUE_BASE() [4/6]

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

◆ ERS_DECLARE_ISSUE_BASE() [5/6]

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

◆ ERS_DECLARE_ISSUE_BASE() [6/6]

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

66 {
67 T* retval = new T;
68 co.get(attrname, *retval);
69 return retval;
70}

◆ init_regex()

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

Definition at line 929 of file Configuration.cpp.

930{
931 if (!str.empty())
932 try
933 {
934 ptr = std::make_unique<std::regex>(str);
935 }
936 catch (const std::regex_error &ex)
937 {
938 std::ostringstream text;
939 text << "failed to create " << what << " regex \"" << str << "\": " << ex.what();
940 throw dunedaq::conffwk::Generic( ERS_HERE, text.str().c_str());
941 }
942}

◆ operator<<() [1/3]

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

Definition at line 1913 of file Configuration.cpp.

1915{
1916 c.print(s);
1917 return s;
1918}

◆ operator<<() [2/3]

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

Definition at line 1820 of file Configuration.cpp.

1822{
1823 s << " changes for class \'" << c.get_class_name() << "\' include:\n";
1824
1825 print_svect(s, c.get_modified_objs(), " modified object(s)");
1826 print_svect(s, c.get_created_objs(), " created object(s)");
1827 print_svect(s, c.get_removed_objs(), " removed object(s)");
1828
1829 return s;
1830}
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 1833 of file Configuration.cpp.

1835{
1836 s << "There are configuration changes in " << v.size() << " classes:\n";
1837
1838 for (const auto &i : v)
1839 s << *i;
1840
1841 return s;
1842}

◆ print_svect()

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

Definition at line 1806 of file Configuration.cpp.

1807{
1808 s << " * " << v.size() << name;
1809
1810 for (auto i = v.begin(); i != v.end(); ++i)
1811 {
1812 s << ((i == v.begin()) ? ": " : ", ");
1813 s << '\"' << *i << '\"';
1814 }
1815
1816 s << std::endl;
1817}

◆ 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 24 of file errors_declaration.hpp.

◆ address

Invalid dunedaq::address

Definition at line 29 of file CommonIssues.hpp.

◆ AssignedTriggerDecisionNotFound

dunedaq::AssignedTriggerDecisionNotFound

Definition at line 41 of file TriggerRecordBuilderData.hpp.

◆ BadStreamConf

dunedaq::BadStreamConf

Definition at line 10 of file appmodelIssues.hpp.

◆ BlockSizeConfigurationInconsistency

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

Definition at line 42 of file FelixIssues.hpp.

◆ 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 256 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.

◆ chunk

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

Definition at line 33 of file FelixIssues.hpp.

◆ CIB

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

Definition at line 36 of file CIBModuleIssues.hpp.

◆ CIBBufferWarning

dunedaq::CIBBufferWarning

Definition at line 25 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 56 of file CIBModuleIssues.hpp.

◆ CIBMessage

CIB Buffer std::string descriptor dunedaq::CIBMessage

Definition at line 35 of file CIBModuleIssues.hpp.

◆ CIBProcError

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

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

◆ CommandFacilityCreationFailed

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

Definition at line 76 of file Issues.hpp.

◆ CommandIssue

DAQModule std::string name dunedaq::CommandIssue

Definition at line 88 of file DAQModule.hpp.

◆ component

No such dunedaq::component

Definition at line 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 28 of file CTBModuleIssues.hpp.

◆ CTBConfigFailure

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

Definition at line 48 of file CTBModuleIssues.hpp.

◆ CTBRepeatedTimestampWarning

CTB Buffer std::string descriptor dunedaq::CTBRepeatedTimestampWarning

Definition at line 38 of file CTBModuleIssues.hpp.

◆ DACValueOutOfRange

dunedaq::DACValueOutOfRange

< Namespace

Issue class name

Definition at line 31 of file DACNode.hpp.

◆ DAQModuleManagerAlreadyInitialized

dunedaq::DAQModuleManagerAlreadyInitialized

Definition at line 39 of file DAQModuleManager.hpp.

◆ DeletedObject

dunedaq::DeletedObject

Definition at line 86 of file Errors.hpp.

◆ descriptor

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

Definition at line 57 of file CIBModuleIssues.hpp.

◆ DeviceInfoSendFailed

dunedaq::DeviceInfoSendFailed

Definition at line 44 of file InfoGatherer.hpp.

◆ DeviceInterfacePDTSStatus

LED calibration failed to ERS_EMPTY dunedaq::DeviceInterfacePDTSStatus

Definition at line 31 of file SSPIssues.hpp.

◆ DuplicateTPWindow

dunedaq::DuplicateTPWindow

Definition at line 39 of file TPBundleHandler.hpp.

◆ EntryWithNoData

dunedaq::EntryWithNoData

Definition at line 37 of file MonitorableObject.hpp.

◆ Error

FELIX Initialization dunedaq::Error

Definition at line 27 of file DataHandlingIssues.hpp.

◆ error

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

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

◆ FailedConfiguration

dunedaq::FailedConfiguration

Definition at line 34 of file OpMonPublisher.hpp.

◆ FailedInfoReconstruction

dunedaq::FailedInfoReconstruction

Definition at line 35 of file Utils.hpp.

◆ FailedLEDCalibrationInit

dunedaq::FailedLEDCalibrationInit

Definition at line 21 of file SSPIssues.hpp.

◆ FailedPing

dunedaq::FailedPing

Definition at line 40 of file DaphneV2Interface.hpp.

◆ FailedToSendTPVector

Both frame_count_limit and tp_count_limit were set dunedaq::FailedToSendTPVector

Definition at line 46 of file FDReadoutIssues.hpp.

◆ FileOpenFailed

dunedaq::FileOpenFailed

Definition at line 52 of file HDF5RawDataFile.hpp.

◆ FrameAndTPCountersDisabled

dunedaq::FrameAndTPCountersDisabled

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

◆ InitializationError

dunedaq::InitializationError

Definition at line 31 of file DataHandlingIssues.hpp.

◆ initialize

LED calibration failed to dunedaq::initialize

Definition at line 22 of file SSPIssues.hpp.

◆ initialized

init Command received when already dunedaq::initialized

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

◆ InvalidIPAddress

dunedaq::InvalidIPAddress

Definition at line 28 of file CommonIssues.hpp.

◆ InvalidQueueFatalError

dunedaq::InvalidQueueFatalError

Definition at line 32 of file CommonIssues.hpp.

◆ InvalidSequenceDigits

dunedaq::InvalidSequenceDigits

Definition at line 41 of file HDF5FileLayout.hpp.

◆ InvalidStateForCommand

dunedaq::InvalidStateForCommand

Definition at line 45 of file Application.hpp.

◆ InvalidStreamID

dunedaq::InvalidStreamID

< Namespace

Type of the Issue

Definition at line 44 of file TPCChannelMap.hpp.

◆ Issue

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

Definition at line 26 of file CIBModuleIssues.hpp.

◆ LoadDalFailed

dunedaq::LoadDalFailed

Definition at line 21 of file DalFactory.hpp.

◆ MissingComponent

dunedaq::MissingComponent

Definition at line 39 of file ConfigurationManager.hpp.

◆ MissingConfiguration

Monitoring thread not ERS_EMPTY dunedaq::MissingConfiguration

Definition at line 40 of file OpMonManager.hpp.

◆ MonitoringFailed

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

Definition at line 55 of file CommonIssues.hpp.

◆ MonitoringThreadNotSet

dunedaq::MonitoringThreadNotSet

Definition at line 30 of file OpMonManager.hpp.

◆ NameMismatch

dunedaq::NameMismatch

Definition at line 34 of file Utils.hpp.

◆ NameNotFound

dunedaq::NameNotFound

Definition at line 24 of file Issues.hpp.

◆ NotFound

dunedaq::NotFound

Definition at line 67 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 257 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 32 of file FelixIssues.hpp.

◆ PDSInvalidStream

dunedaq::PDSInvalidStream

< Namespace

Type of the Issue

Definition at line 43 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.

◆ reach

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

Definition at line 32 of file SSPIssues.hpp.

◆ ReceiveTimeoutExpired

dunedaq::ReceiveTimeoutExpired

Definition at line 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 42 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 84 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.

◆ set

Monitoring thread not ERS_EMPTY Confiration is not dunedaq::set

Definition at line 31 of file OpMonManager.hpp.

◆ SI534xMissingConfigSectionError

dunedaq::SI534xMissingConfigSectionError

< Namespace

Issue class name

Definition at line 37 of file SI534xNode.hpp.

◆ SI534xRegWriteRetry

Missing configuration std::string tag dunedaq::SI534xRegWriteRetry

< Namespace

Issue class name

Definition at line 47 of file SI534xNode.hpp.

◆ size

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

Definition at line 28 of file FelixIssues.hpp.

◆ sourceid

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

Definition at line 40 of file TPBundleHandler.hpp.

◆ start_time

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

Definition at line 41 of file TPBundleHandler.hpp.

◆ TardyTPSetReceived

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

Definition at line 45 of file TPBundleHandler.hpp.

◆ TimeoutExpired

dunedaq::TimeoutExpired

Definition at line 26 of file CommonIssues.hpp.

◆ TimeSyncTransmissionFailed

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

Definition at line 67 of file DataHandlingIssues.hpp.

◆ TooManyChannels

Invalid std::string ip dunedaq::TooManyChannels

Definition at line 41 of file CommonIssues.hpp.

◆ TPHandlerMsg

dunedaq::TPHandlerMsg

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

◆ UnexpectedStreamID

dunedaq::UnexpectedStreamID

Definition at line 49 of file IfaceWrapper.hpp.

◆ UnknownSerializationTypeByte

dunedaq::UnknownSerializationTypeByte

Definition at line 154 of file Serialization.hpp.

◆ UnsupportedUri

dunedaq::UnsupportedUri

Definition at line 29 of file Issues.hpp.

◆ URI

Unsupported dunedaq::URI

Definition at line 30 of file Issues.hpp.

◆ uri

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

Definition at line 77 of file Issues.hpp.

◆ v

default char dunedaq::v[0]

Definition at line 266 of file Serialization.hpp.