• 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
  • LocalCommandRun
  • 5.0.0

LocalCommandRun Class

(ExternalControlIO::LocalCommandRun)

LocalCommandRun request implementation class. More...

Header: #include <LocalCommandRun>
Inherits: RequestBase
  • List of all members, including inherited members

Public Functions

LocalCommandRun()
~LocalCommandRun() override

Reimplemented Public Functions

virtual void Configure(XMLElementEx *xml, ExternalControlBroker *parentComp, RequestBase *parentRequest) override
virtual bool LastRequestFailed() const override
  • 7 public functions inherited from ExternalControlIO::RequestBase
  • 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

Protected Functions

void ComposeCommandInput(bp::opstream &inputStream)
void ConfigureEnvironment(XMLElementEx *xml)
std::string OSFilteredCommandLine() const
void ParseCommandOutput(bp::ipstream &outputStream)
bool RunCommand(const std::string &commandLine, bp::opstream &inputStream, bp::ipstream &outputStream)
void SetLastRunTimestamp()
void WaitForProcessEnd(bp::child *process)

Reimplemented Protected Functions

virtual void FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const override
virtual std::string GetNodeTypeName() const override
virtual void ProcessRequest() override
  • 33 protected functions inherited from ExternalControlIO::RequestBase
  • 1 protected function inherited from CDP::StudioAPI::CDPNode
  • 1 protected function inherited from OSAPIThread

Additional Inherited Members

  • 2 static public members inherited from ExternalControlIO::RequestBase
  • 1 protected type inherited from OSAPITask

Detailed Description

LocalCommandRun request implementation class.

Uses Boost.Process to invoke actual processes. Uses Boost.Regex to parse OS-specific commands from CommandLine cross-platform slice notation [WINDOWS: :] [LINUX: :] Uses Boost.IOStreams filtering streams to get input/output byte counts and optionally get input/output copy for debug.

Member Function Documentation

LocalCommandRun::LocalCommandRun()

Default constructs an instance of LocalCommandRun.

LocalCommandRun::~LocalCommandRun()

Destroys the instance of LocalCommandRun.

[protected] void LocalCommandRun::ComposeCommandInput(bp::opstream &inputStream)

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

[protected] void LocalCommandRun::ConfigureEnvironment(XMLElementEx *xml)

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

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

[override virtual] bool LocalCommandRun::LastRequestFailed() const

[protected] std::string LocalCommandRun::OSFilteredCommandLine() const

[protected] void LocalCommandRun::ParseCommandOutput(bp::ipstream &outputStream)

[override virtual protected] void LocalCommandRun::ProcessRequest()

[protected] bool LocalCommandRun::RunCommand(const std::string &commandLine, bp::opstream &inputStream, bp::ipstream &outputStream)

[protected] void LocalCommandRun::SetLastRunTimestamp()

[protected] void LocalCommandRun::WaitForProcessEnd(bp::child *process)

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