58 void copyAlphas(std::vector<RealType>& alphas, std::vector<RealType>& weights)
const noexcept;
72 [[nodiscard]] std::string
getName()
const {
return _name; }
79 [[nodiscard]]
SimId getId() const noexcept {
return _id; }
86 [[nodiscard]]
bool getSyncOnPulse() const noexcept {
return _sync_on_pulse; }
93 [[nodiscard]] std::optional<RealType>
getPhaseOffset() const noexcept {
return _phase_offset; }
100 [[nodiscard]] std::optional<RealType>
getFreqOffset() const noexcept {
return _freq_offset; }
189 void setName(std::string name)
noexcept { _name = std::move(name); }
194 std::vector<RealType> _alphas;
195 std::vector<RealType> _weights;
196 std::optional<RealType> _freq_offset;
197 std::optional<RealType> _phase_offset;
198 std::optional<RealType> _random_phase_stdev;
199 std::optional<RealType> _random_freq_stdev;
201 bool _sync_on_pulse{
false};
Thread-safe Meyers singleton for generating unique object IDs.
Manages timing properties such as frequency, offsets, and synchronization.
PrototypeTiming & operator=(PrototypeTiming &&)=default
void clearNoiseEntries() noexcept
Clears all noise entries.
void setSyncOnPulse() noexcept
Enables synchronization on pulse.
void clearPhaseOffset() noexcept
Clears the phase offset.
void setName(std::string name) noexcept
Sets the name of the timing source.
PrototypeTiming(std::string name, const SimId id=0) noexcept
Constructor for PrototypeTiming.
void setAlpha(RealType alpha, RealType weight) noexcept
Sets an alpha and weight value.
void setRandomPhaseOffsetStdev(RealType stdev) noexcept
Sets a random phase offset standard deviation.
std::optional< RealType > getRandomPhaseOffsetStdev() const noexcept
~PrototypeTiming()=default
bool getSyncOnPulse() const noexcept
Checks if synchronization on pulse is enabled.
PrototypeTiming & operator=(const PrototypeTiming &)=default
void clearSyncOnPulse() noexcept
Disables synchronization on pulse.
std::string getName() const
Gets the name of the timing source.
void setFreqOffset(RealType offset) noexcept
Sets the frequency offset.
std::optional< RealType > getRandomFreqOffsetStdev() const noexcept
PrototypeTiming(const PrototypeTiming &)=default
void setPhaseOffset(RealType offset) noexcept
Sets the phase offset.
void setRandomFreqOffsetStdev(RealType stdev) noexcept
Sets a random frequency offset standard deviation.
RealType getFrequency() const noexcept
Gets the current frequency.
void setFrequency(const RealType freq) noexcept
Sets the frequency value.
void clearRandomPhaseOffsetStdev() noexcept
Clears the random phase offset standard deviation.
PrototypeTiming(PrototypeTiming &&)=default
std::optional< RealType > getPhaseOffset() const noexcept
Gets the phase offset.
void clearFreqOffset() noexcept
Clears the frequency offset.
void copyAlphas(std::vector< RealType > &alphas, std::vector< RealType > &weights) const noexcept
Copies the alphas and weights vectors.
SimId getId() const noexcept
Gets the unique ID of the timing source.
void clearRandomFreqOffsetStdev() noexcept
Clears the random frequency offset standard deviation.
std::optional< RealType > getFreqOffset() const noexcept
Gets the frequency offset.
Represents a timing source for simulation.
Global configuration file for the project.
double RealType
Type for real numbers.
uint64_t SimId
64-bit Unique Simulation ID.
ObjectType
Categorizes objects for ID generation.