• 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

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Protocols - ExternalControl I/O
  • RequestBase
  • 5.0.0

RequestBase Class

(ExternalControlIO::RequestBase)

Abstract base class for all types of requests of ExternalControlBroker. More...

Header: #include <RequestBase>
Inherits: CDP::StudioAPI::CDPNode, OSAPIThread, and ServerIO::ISendTrigger
Inherited By:

ExternalControlIO::LocalCommandRun and ExternalControlIO::URLRequestBase

  • List of all members, including inherited members

Public Functions

~RequestBase() override
virtual void Configure(XMLElementEx *xml, ExternalControlBroker *parentComp, RequestBase *parentRequest)
void DeregisterSendOnChanges()
virtual void Destroy()
virtual bool LastRequestFailed() const = 0
ExternalControlBroker *ParentComp() const
std::string RequestPath() const
std::string RequestTranslatorMimeType() const
  • 27 public functions inherited from CDP::StudioAPI::CDPNode
  • 1 public function inherited from OSAPIThread
  • 2 public functions inherited from ServerIO::ISendTrigger
  • 22 public functions inherited from CDP::StudioAPI::ICDPNode
  • 15 public functions inherited from OSAPITask

Static Public Members

RequestBase *CreateNew(const std::string &modelName)
RequestBase *CreateNewSub(const std::string &subModelName)

Protected Functions

RequestBase()
void AddChannelTreeToFormatter(const ServerIO::Translator::TranslatorChannelGroup &channelTree, boost::format &Formatter) const
void AddSubRequest(RequestBase *subRequest)
void ComposeRequestStream(std::ostream &requestStream)
void ConfigureChannel(const char *name, XMLElementEx *channelXML, bool input, ServerIO::Translator::TranslatorChannelGroup *parentGroup)
void ConfigureChannelGroups(XMLElementEx *xml)
void ConfigureRequestChannels(XMLElementEx *xml, ServerIO::Translator::TranslatorChannelGroup *parentGroup)
void ConfigureResponseChannels(XMLElementEx *xml, ServerIO::Translator::TranslatorChannelGroup *parentGroup)
void ConfigureSubRequests(XMLElementEx *xml)
ServerIO::Translator::TranslatorBase<STREAMTYPE> *ConfigureTranslator(XMLElementEx *xml, std::string elementName) const
void ConfigureTranslators(XMLElementEx *xml)
void ConfigureTriggering()
void ConfigureValueMapper(XMLElementEx *xml)
std::string DefaultTranslator(XMLElementEx *xml) const
virtual std::string DefaultTranslator(XMLElementEx *requestXML, std::string streamType) const
void IncreaseRequestByteCounter(uint64_t addend)
void IncreaseResponseByteCounter(uint64_t add)
ServerIO::Translator::TranslatorBase<STREAMTYPE> *InheritedTranslator() const
void InvokeRequest()
void NotifySubRequestsSomeValueMapHasChanged()
RequestBase *ParentRequest() const
std::string ParentRequestPathPrefix() const
void ParseResponseStream(std::istream &responseStream)
virtual void ProcessRequest() = 0
uint64_t ResponseWaitTimeout() const
void TranslateRequestParameter(const std::string &parameter, const std::string &parameterName, std::stringstream &translatedParameter, const ServerIO::Translator::TranslatorChannelGroup &channelTree) const
std::string TranslatedRequestParameter(const std::string &parameter, const std::string &parameterName) const
void UpdateValueMapper(ServerIO::Translator::ValueMapper *valueMapper)
void UpdateValueMapperTree()
bool WorkingThreadRunning()

Reimplemented Protected Functions

virtual void FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const override
virtual void FlagForSend() override
virtual const std::string GetNodeName() const override
virtual void Main() override
  • 1 protected function inherited from CDP::StudioAPI::CDPNode
  • 1 protected function inherited from OSAPIThread

Additional Inherited Members

  • 1 protected type inherited from OSAPITask

Detailed Description

Abstract base class for all types of requests of ExternalControlBroker.

Inherits OSAPIthread for implementations to be able to perform blocking processing in separate thread. Derived classes must implement:

  • ProcessRequest() - to perform the actual (blocking) request
  • LastRequestFailed() - (must be thread safe) to return false if last request was failing (to be used in IOServer IsCommProblem())

Derived classes can override:

  • DefaultTranslator() - if TextTranslator is not suitable for request type

Member Function Documentation

[protected] RequestBase::RequestBase()

Default constructs an instance of RequestBase.

RequestBase::~RequestBase()

Destroys the instance of RequestBase.

[protected] void RequestBase::AddChannelTreeToFormatter(const ServerIO::Translator::TranslatorChannelGroup &channelTree, boost::format &Formatter) const

[protected] void RequestBase::AddSubRequest(RequestBase *subRequest)

[protected] void RequestBase::ComposeRequestStream(std::ostream &requestStream)

[virtual] void RequestBase::Configure(XMLElementEx *xml, ExternalControlBroker *parentComp, RequestBase *parentRequest)

[protected] void RequestBase::ConfigureChannel(const char *name, XMLElementEx *channelXML, bool input, ServerIO::Translator::TranslatorChannelGroup *parentGroup)

[protected] void RequestBase::ConfigureChannelGroups(XMLElementEx *xml)

[protected] void RequestBase::ConfigureRequestChannels(XMLElementEx *xml, ServerIO::Translator::TranslatorChannelGroup *parentGroup)

[protected] void RequestBase::ConfigureResponseChannels(XMLElementEx *xml, ServerIO::Translator::TranslatorChannelGroup *parentGroup)

[protected] void RequestBase::ConfigureSubRequests(XMLElementEx *xml)

[protected] ServerIO::Translator::TranslatorBase<STREAMTYPE> *RequestBase::ConfigureTranslator(XMLElementEx *xml, std::string elementName) const

[protected] void RequestBase::ConfigureTranslators(XMLElementEx *xml)

[protected] void RequestBase::ConfigureTriggering()

[protected] void RequestBase::ConfigureValueMapper(XMLElementEx *xml)

[static] RequestBase *RequestBase::CreateNew(const std::string &modelName)

[static] RequestBase *RequestBase::CreateNewSub(const std::string &subModelName)

[protected] std::string RequestBase::DefaultTranslator(XMLElementEx *xml) const

[virtual protected] std::string RequestBase::DefaultTranslator(XMLElementEx *requestXML, std::string streamType) const

void RequestBase::DeregisterSendOnChanges()

[virtual] void RequestBase::Destroy()

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

[override virtual protected] void RequestBase::FlagForSend()

[override virtual protected] const std::string RequestBase::GetNodeName() const

[protected] void RequestBase::IncreaseRequestByteCounter(uint64_t addend)

[protected] void RequestBase::IncreaseResponseByteCounter(uint64_t add)

[protected] ServerIO::Translator::TranslatorBase<STREAMTYPE> *RequestBase::InheritedTranslator() const

[protected] void RequestBase::InvokeRequest()

[pure virtual] bool RequestBase::LastRequestFailed() const

[override virtual protected] void RequestBase::Main()

[protected] void RequestBase::NotifySubRequestsSomeValueMapHasChanged()

ExternalControlBroker *RequestBase::ParentComp() const

[protected] RequestBase *RequestBase::ParentRequest() const

[protected] std::string RequestBase::ParentRequestPathPrefix() const

[protected] void RequestBase::ParseResponseStream(std::istream &responseStream)

[pure virtual protected] void RequestBase::ProcessRequest()

std::string RequestBase::RequestPath() const

std::string RequestBase::RequestTranslatorMimeType() const

[protected] uint64_t RequestBase::ResponseWaitTimeout() const

[protected] void RequestBase::TranslateRequestParameter(const std::string &parameter, const std::string &parameterName, std::stringstream &translatedParameter, const ServerIO::Translator::TranslatorChannelGroup &channelTree) const

[protected] std::string RequestBase::TranslatedRequestParameter(const std::string &parameter, const std::string &parameterName) const

[protected] void RequestBase::UpdateValueMapper(ServerIO::Translator::ValueMapper *valueMapper)

[protected] void RequestBase::UpdateValueMapperTree()

[protected] bool RequestBase::WorkingThreadRunning()

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

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top