LocalCommandRun Class

(ExternalControlIO::LocalCommandRun)

LocalCommandRun request implementation class. More...

Header: #include <LocalCommandRun>
Inherits: RequestBase

Public Functions

Reimplemented Public Functions

virtual void Configure(XMLElementEx *xml, ExternalControlBroker *parentComp, RequestBase *parentRequest) override
virtual bool LastRequestFailed() const override

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

Additional Inherited Members

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)