• 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
  • CDPSignalChannel
  • 4.11.14

CDPSignalChannel Class

(ServerIO::CDPSignalChannel)

The CDPSignalChannel template-class is ACDPBaseChannel implementation based on CDPSignal. More...

Header: #include <IO/ServerIO/CDPSignalChannel.h>
Inherits: ACDPBaseChannel<T> and
  • List of all members, including inherited members

Public Functions

CDPSignalChannel()
virtual ~CDPSignalChannel()

Reimplemented Public Functions

virtual void AddProperty(std::string name, std::string value) override
virtual void Configure(XMLElementEx *pSignalXML) override
virtual void Create(const char *name, CDPComponent *pParent) override
virtual void Destroy() override
virtual std::string GetProperty(const std::string &propertyName) override
virtual bool IsInput() override
virtual const char *Name() const override
virtual void SetChannelParameters(bool input, int moduleNo, int channelGroup, int channelNo) override
virtual void SetProperty(std::string name, std::string value) override
virtual void SyncIn() override
virtual void SyncOut() override
  • 8 public functions inherited from ServerIO::ACDPBaseChannel
  • 12 public functions inherited from ServerIO::ICDPChannel
  • 6 public functions inherited from ServerIO::IChannel
  • 26 public functions inherited from CDP::StudioAPI::CDPNode
  • 22 public functions inherited from CDP::StudioAPI::ICDPNode

Protected Functions

void ValueChanged(CDP::StudioAPI::ICDPNode *node, const CDP::StudioAPI::CDPVariantValue &oldValue, const CDP::StudioAPI::CDPVariantValue &newValue) override

Reimplemented Protected Functions

virtual bool AddChild(const std::string &name, const std::string &typeName, const std::string &configuration) override
virtual void FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const override
virtual T GetExternal() const override
virtual T GetInternal(double &timeStamp) const override
virtual CDP::StudioAPI::CDPNodeType GetNodeType() const override
virtual std::string GetNodeTypeName() const override
virtual CDP::StudioAPI::CDPValueType GetNodeValueType() const override
virtual CDP::StudioAPI::CDPVariantValue GetVariantValue() const override
virtual void IssueBadDataSizeError(const char *methodName, unsigned int size) override
virtual bool RemoveChild(const std::string &name) override
virtual void SetExternal(T newValue) override
virtual void SetInternal(T newValue, double timeStamp) override
virtual void SetVariantValue(const CDP::StudioAPI::CDPVariantValue &value) override
  • 15 protected functions inherited from ServerIO::ACDPBaseChannel
  • 2 protected functions inherited from ServerIO::IChannel
  • 1 protected function inherited from CDP::StudioAPI::CDPNode

Protected Variables

CDPSignal<T> m_signal
  • 2 protected variables inherited from ServerIO::ACDPBaseChannel

Detailed Description

The CDPSignalChannel template-class is ACDPBaseChannel implementation based on CDPSignal.

This class is final and IChannel interface members are threadsafe for user thread that runs SynchronizeValuesIn() and SynchronizeValuesOut() through ChannelManager.

Note: The maximum length of CDPSignalChannel<string> is by default 925 characters. A larger or smaller buffer can be passed in with SetDataPointer().

See also ServerIO::CDPSignalChannelFactory, IOServer, ServerIO, ServerIO::ACDPBaseChannel, ServerIO::ICDPChannel, ServerIO::IChannel, ServerIO::CDPPropertyChannel, and ServerIO::ComponentStateChannel.

Member Function Documentation

CDPSignalChannel::CDPSignalChannel()

Default constructs an instance of CDPSignalChannel.

[virtual] CDPSignalChannel::~CDPSignalChannel()

Releases memory.

[override virtual protected] bool CDPSignalChannel::AddChild(const std::string &name, const std::string &typeName, const std::string &configuration)

[override virtual] void CDPSignalChannel::AddProperty(std::string name, std::string value)

Reimplemented from ICDPChannel::AddProperty().

[override virtual] void CDPSignalChannel::Configure(XMLElementEx *pSignalXML)

Reimplemented from ICDPChannel::Configure().

[override virtual] void CDPSignalChannel::Create(const char *name, CDPComponent *pParent)

Reimplemented from ICDPChannel::Create().

[override virtual] void CDPSignalChannel::Destroy()

Reimplemented from ICDPChannel::Destroy().

Destroys m_signal.

[override virtual protected] void CDPSignalChannel::FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const

Reimplemented from CDPNode::FillNodeChildren().

Serializes m_name, m_networkConvert, m_channelNo and m_signal.

[override virtual protected] T CDPSignalChannel::GetExternal() const

Reimplemented from ACDPBaseChannel::GetExternal().

Returns the value of m_signal as type T.

[override virtual protected] T CDPSignalChannel::GetInternal(double &timeStamp) const

Reimplemented from ACDPBaseChannel::GetInternal().

timestamp is updated and value from m_signal is returned, called from ACDPBaseChannel::SyncIn().

[override virtual protected] CDP::StudioAPI::CDPNodeType CDPSignalChannel::GetNodeType() const

Reimplemented from ICDPNode::GetNodeType().

Returns eCDP_OBJECT_NODE, see CDP::StudioAPI::CDPNodeType.

[override virtual protected] std::string CDPSignalChannel::GetNodeTypeName() const

Reimplemented from ICDPNode::GetNodeTypeName().

Returns "CDPSignalChannel<T>" where T is the type, e.g. "double", "bool".

[override virtual protected] CDP::StudioAPI::CDPValueType CDPSignalChannel::GetNodeValueType() const

Reimplemented from ICDPNode::GetNodeValueType().

Returns the ValueType of m_signal, see CDP::StudioAPI::CDPValueType.

[override virtual] std::string CDPSignalChannel::GetProperty(const std::string &propertyName)

Reimplemented from ICDPChannel::GetProperty().

[override virtual protected] CDP::StudioAPI::CDPVariantValue CDPSignalChannel::GetVariantValue() const

Reimplemented from ICDPNode::GetVariantValue().

Returns the value of m_signal as a CDPVariantValue.

[override virtual] bool CDPSignalChannel::IsInput()

Reimplemented from IChannel::IsInput().

[override virtual protected] void CDPSignalChannel::IssueBadDataSizeError(const char *methodName, unsigned int size)

Reimplemented from ACDPBaseChannel::IssueBadDataSizeError().

Prints an error CDPMessage because of mismatch between specified size and size of type T.

[override virtual] const char *CDPSignalChannel::Name() const

Reimplemented from IChannel::Name().

[override virtual protected] bool CDPSignalChannel::RemoveChild(const std::string &name)

[override virtual] void CDPSignalChannel::SetChannelParameters(bool input, int moduleNo, int channelGroup, int channelNo)

Reimplemented from ICDPChannel::SetChannelParameters().

[override virtual protected] void CDPSignalChannel::SetExternal(T newValue)

Reimplemented from ACDPBaseChannel::SetExternal().

Sets the value of m_signal from newValue of type T.

[override virtual protected] void CDPSignalChannel::SetInternal(T newValue, double timeStamp)

Reimplemented from ACDPBaseChannel::SetInternal().

m_signal is updated with newValue and timestamp, called from ACDPBaseChannel::SyncOut().

[override virtual] void CDPSignalChannel::SetProperty(std::string name, std::string value)

Reimplemented from ICDPChannel::SetProperty().

[override virtual protected] void CDPSignalChannel::SetVariantValue(const CDP::StudioAPI::CDPVariantValue &value)

[override virtual] void CDPSignalChannel::SyncIn()

[override virtual] void CDPSignalChannel::SyncOut()

[protected] void CDPSignalChannel::ValueChanged(CDP::StudioAPI::ICDPNode *node, const CDP::StudioAPI::CDPVariantValue &oldValue, const CDP::StudioAPI::CDPVariantValue &newValue)

Member Variable Documentation

CDPSignal<T> CDPSignalChannel::m_signal

This variable holds the CDP class that facilitates the external communication with rest of cdp.

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