AddRandom Class

(Automation::AddRandom)

A Random value adder operator. More...

Header: #include <AddRandom>
Inherits: ArgumentableOperator<T>

Public Functions

AddRandom(const CDPPropertyBase &in)

Reimplemented Public Functions

virtual void Configure(XMLPrimitive *operatorXML) override
virtual std::string GetNodeTypeName() const override
virtual unsigned int Process() override

Additional Inherited Members

Detailed Description

A Random value adder operator.

This CDP operator can be used to add a uniformly distributed random number to output. This can be useful to imitate input signal noise in test systems (for example Sine+Random).

F.e. AddRandom with arguments Lower=-1.0 and Upper=1.0 will add random number between -1...1 to signal at every calculation cycle.

Arguments

Argument nameDescription
LowerRandom generator lower limit.
UpperRandom generator upper limit.

Lower and Upper argument can be routed from another signal, parameter or property.

Example

Below is example plot with Sine signal (cyan) and the same signal with operator AddRandom(Lower=-0.1, Upper=0.1) applied (orange):

See also Argument.

Member Function Documentation

AddRandom::AddRandom(const CDPPropertyBase &in)

Constructs a AddRandom with input in.

[override virtual] void AddRandom::Configure(XMLPrimitive *operatorXML)

Reimplemented from CDPBaseObject::Configure().

[override virtual] std::string AddRandom::GetNodeTypeName() const

Reimplemented from CDPNode::GetNodeTypeName().

[override virtual] unsigned int AddRandom::Process()

Reimplemented from CDPOperatorBase::Process().

Returns STATUS_OK.