• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - CDP Core
  • CDPOperatorBase
  • 4.11.14

CDPOperatorBase Class

The CDPOperatorBase is the base class of CDPOperator. More...

Header: #include <Signal/CDPOperator.h>
Inherits: CDPBaseObject and
Inherited By:

CDPOperator

  • List of all members, including inherited members

Public Functions

CDPOperatorBase(const CDPPropertyBase &in, Argument<T> *arg)
virtual ~CDPOperatorBase()
virtual void ForEachArgument(const std::function<void( ArgumentBase & ) > f) = 0
OSAPIMutex &GetMemberAccessMutex() override
virtual const std::string &GetName() = 0
double GetOperatorPeriod() const override
virtual const CDPPropertyBase &GetOutput() = 0
double GetPeriod() const override
std::string GetPriorityName() const override
CDPProcess *GetProcess() const override
std::string GetSchedulingGroupName() const override
int GetSyncInId() override
int GetSyncOutId() override
virtual void Init()
bool NeedsSync() override
virtual void Pass() = 0
virtual unsigned int Process() = 0
void SetProcess(CDPProcess *process) override

Reimplemented Public Functions

virtual void Create(const char *shortName, CDPBaseObject *parent) = 0
  • 42 public functions inherited from CDPBaseObject
  • 26 public functions inherited from CDP::StudioAPI::CDPNode
  • 22 public functions inherited from CDP::StudioAPI::ICDPNode

Protected Variables

const CDPPropertyBase &m_input
CDPPropertyBase &m_output
  • 9 protected variables inherited from CDPBaseObject

Additional Inherited Members

  • 1 static public member inherited from CDPBaseObject
  • 1 protected function inherited from CDP::StudioAPI::CDPNode

Detailed Description

The CDPOperatorBase is the base class of CDPOperator.

Member Function Documentation

CDPOperatorBase::CDPOperatorBase(const CDPPropertyBase &in, Argument<T> *arg)

Default constructs an instance of CDPOperatorBase.

[virtual] CDPOperatorBase::~CDPOperatorBase()

Destructs the CDPOperatorBase.

[pure virtual] void CDPOperatorBase::Create(const char *shortName, CDPBaseObject *parent)

Reimplemented from CDPBaseObject::Create().

Creates the operator, sets shortName and parent.

[pure virtual] void CDPOperatorBase::ForEachArgument(const std::function<void( ArgumentBase & ) > f)

Call argument f function for each Argument (arguments in m_arguments, m_inArg and m_outArg) the CDPOperator has.

OSAPIMutex &CDPOperatorBase::GetMemberAccessMutex()

[pure virtual] const std::string &CDPOperatorBase::GetName()

Returns the name of the operator

double CDPOperatorBase::GetOperatorPeriod() const

Returns GetParent()->GetOperatorPeriod(), which usually corresponds to CDPComponent's GetPeriod(), but may return other value in overridden function.

[pure virtual] const CDPPropertyBase &CDPOperatorBase::GetOutput()

Returns the output property.

double CDPOperatorBase::GetPeriod() const

Returns GetParent()->GetPeriod().

std::string CDPOperatorBase::GetPriorityName() const

CDPProcess *CDPOperatorBase::GetProcess() const

std::string CDPOperatorBase::GetSchedulingGroupName() const

int CDPOperatorBase::GetSyncInId()

int CDPOperatorBase::GetSyncOutId()

[virtual] void CDPOperatorBase::Init()

Does nothing, but may be overrided for some CDPOperators. The purpose of the function is to (re)initialize some internal queues or variables to start from scratch when something changes. E.g. IIRFilter and RampFilter use Init() to reset history and calculation. Currently, CDPOperatorBase::Init() is called when the (scheduling)frequency has changed for the owner CDPComponent.

bool CDPOperatorBase::NeedsSync()

[pure virtual] void CDPOperatorBase::Pass()

Called when signal operators are disabled. Should be used to pass input property value to output.

[pure virtual] unsigned int CDPOperatorBase::Process()

This is the process function that implements the signal processing from input to output.

It returns an 'unsigned int' status as defined in CDPAlarm/AlarmStatusDefines.h, or STATUS_OK if status is not modified by the operator. The returned status is or'ed into the owning signal status, to allow a 'worst' status aggregation accessible in the signal.

void CDPOperatorBase::SetProcess(CDPProcess *process)

Member Variable Documentation

const CDPPropertyBase &CDPOperatorBase::m_input

This variable holds the property from where to take the operator default input value.

CDPPropertyBase &CDPOperatorBase::m_output

This variable holds the property where to assign the operators default output value.

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top