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

ComponentStateChannel Class

(ServerIO::ComponentStateChannel)

The ComponentStateChannel template-class is ACDPBaseChannel implementation using CDPConnector. More...

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

Public Functions

ComponentStateChannel()
virtual ~ComponentStateChannel()

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()
virtual T GetExternal() const override
virtual T GetInternal(double &timeStamp) const override
virtual std::string GetProperty(const std::string &propertyName) override
virtual bool IsInput() override
virtual void IssueBadDataSizeError(const char *methodName, unsigned int size) override
virtual const char *Name() const override
virtual void SetChannelMask(unsigned char mask) override
virtual void SetChannelParameters(bool input, int moduleNo, int channelGroup, int channelNo) override
virtual void SetExternal(T newValue) override
virtual void SetInternal(T newValue, double timeStamp) override
virtual void SetProperty(std::string name, std::string value) 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

Additional Inherited Members

  • 15 protected functions inherited from ServerIO::ACDPBaseChannel
  • 2 protected functions inherited from ServerIO::IChannel
  • 1 protected function inherited from CDP::StudioAPI::CDPNode
  • 2 protected variables inherited from ServerIO::ACDPBaseChannel

Detailed Description

The ComponentStateChannel template-class is ACDPBaseChannel implementation using CDPConnector.

This class is final and IChannel interface members are threadsafe for user thread that runs SynchronizeValuesIn() and SynchronizeValuesOut() through ChannelManager. The State Channel enables checking if some remote component is in predefined state and will return true/1/1.0 or false/0/0.0 depending on the primitive type of the template when declared. The Property that declares the expected state is "CurrentState" and the property that decleares the route to monitored property by the CDPConnector is "Component". These properties are present only in ComponentStateChannel.

See also ServerIO::ComponentStateChannelFactory, IOServer, ServerIO, ServerIO::ACDPBaseChannel, ServerIO::ICDPChannel, ServerIO::IChannel, ServerIO::CDPPropertyChannel, and ServerIO::CDPSignalChannel.

Member Function Documentation

ComponentStateChannel::ComponentStateChannel()

Constructs an instance of ComponentStateChannel, including a new CDPConnector.

[virtual] ComponentStateChannel::~ComponentStateChannel()

Handles destruction of the CDPConnector created in the constructor.

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

Reimplemented from ICDPChannel::AddProperty().

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

Reimplemented from ICDPChannel::Configure().

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

Reimplemented from ICDPChannel::Create().

[virtual] void ComponentStateChannel::Destroy()

[override virtual] T ComponentStateChannel::GetExternal() const

Reimplemented from ACDPBaseChannel::GetExternal().

Returns true/1/1.0 or false/0/0.0 (if "CurrentState" is equal or not to remote component state).

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

Reimplemented from ACDPBaseChannel::GetInternal().

Returns true/1/1.0 or false/0/0.0 (if "CurrentState" is equal or not to remote component state), called from ACDPBaseChannel::SyncIn().

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

Reimplemented from ICDPChannel::GetProperty().

[override virtual] bool ComponentStateChannel::IsInput()

Reimplemented from IChannel::IsInput().

[override virtual] void ComponentStateChannel::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 *ComponentStateChannel::Name() const

Reimplemented from IChannel::Name().

[override virtual] void ComponentStateChannel::SetChannelMask(unsigned char mask)

Reimplemented from ICDPChannel::SetChannelMask().

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

Reimplemented from ICDPChannel::SetChannelParameters().

[override virtual] void ComponentStateChannel::SetExternal(T newValue)

Reimplemented from ACDPBaseChannel::SetExternal().

Will write true/1/1.0 or false/0/0.0 (if "CurrentState" is equal or not to remote component state) into m_storagePointer.

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

Reimplemented from ACDPBaseChannel::SetInternal().

Will write true/1/1.0 or false/0/0.0 (if "CurrentState" is equal or not to remote component state) into m_storagePointer, called from ACDPBaseChannel::SyncOut().

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

Reimplemented from ICDPChannel::SetProperty().

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