11#ifndef __BE_PROCESS_WORKER_H__
12#define __BE_PROCESS_WORKER_H__
69 const std::string &name);
87 const std::string &name);
105 const std::string &name);
123 const std::string &name);
136 const std::string &name,
137 std::shared_ptr<void> argument);
296 volatile
bool _stopRequested;
302 bool _communicationEnabled;
306 int _pipeFromChild[2];
An abstraction of an instance that performs work on given data.
void closeManagerPipeEnds()
Perform initialization for communication from Manager to Worker.
void sendMessageToManager(const Memory::uint8Array &message)
Send a message to the Manager.
int getReceivingPipe() const
Obtain the pipe used to receive messages to this Worker.
void _initCommunication()
Perform general communication initialization from Constructor.
std::shared_ptr< void > getParameter(const std::string &name)
Obtain a parameter passed to this Worker.
double getParameterAsDouble(const std::string &name)
Obtain a parameter passed to this Worker as a double.
virtual int32_t workerMain()=0
The method that will get called to start execution by a ProcessManager.
int64_t getParameterAsInteger(const std::string &name)
Obtain a parameter passed to this Worker as an integer.
void setParameter(const std::string &name, std::shared_ptr< void > argument)
Pass a parameter to this Worker.
virtual void stop() final
Tell this Worker to return ASAP.
int getSendingPipe() const
Obtain the pipe used to send messages to this Worker.
void closeWorkerPipeEnds()
Perform initialization for communication from Worker to Manager.
std::string getParameterAsString(const std::string &name)
Obtain a parameter passed to this Worker as a string.
void receiveMessageFromManager(Memory::uint8Array &message)
Receive a message from the Manager.
bool waitForMessage(int numSeconds=-1) const
Block while waiting for a message from the Manager.
virtual bool stopRequested() const final
Determine if the parent has requested this child to exit.
AutoArray< uint8_t > uint8Array
std::map< std::string, std::shared_ptr< void > > ParameterList
Convenience alias for parameter lists to child routines.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...