34 group = getPeers().add(
portName,
this);
44 options.
put(
"sender_side",
46 options.
put(
"receiver_side",
48 options.
put(
"carrier", proto.
getRoute().getCarrierName());
59 std::string script = options.
check(
"type",
Value(
"lua")).asString();
60 std::string filename = options.
check(
"file",
Value(
"modifier")).asString();
61 std::string constraint = options.
check(
"constraint",
Value(
"")).asString();
63 std::string context = options.
check(
"context",
Value(
"")).asString();
93 info.put(
"type", script);
156 cReader.setParentConnectionReader(&reader);
174 localReader = &reader;
286 if (peers==
nullptr) {
const yarp::os::LogComponent & PORTMONITORCARRIER()
virtual bool hasAccept()=0
virtual bool hasUpdate()=0
virtual bool hasUpdateReply()=0
virtual bool acceptData(yarp::os::Things &thing)=0
static MonitorBinding * create(const char *script_type)
factory method
virtual bool canAccept()=0
virtual bool getParams(yarp::os::Property ¶ms)=0
virtual yarp::os::Things & updateData(yarp::os::Things &thing)=0
virtual yarp::os::Things & updateReply(yarp::os::Things &thing)=0
virtual bool setParams(const yarp::os::Property ¶ms)=0
virtual bool peerTrigged()=0
virtual bool load(const yarp::os::Property &options)=0
virtual bool setAcceptConstraint(const char *constraint)=0
virtual bool acceptIncomingData(PortMonitor *source)
Allow to monitor and modify port data from Lua script Under development.
MonitorBinding * getBinder()
void getCarrierParams(yarp::os::Property ¶ms) const override
Get carrier configuration and deliver it by port administrative commands.
yarp::os::ConnectionReader & modifyIncomingData(yarp::os::ConnectionReader &reader) override
Modify incoming payload data, if appropriate.
const yarp::os::PortWriter & modifyOutgoingData(const yarp::os::PortWriter &writer) override
Modify outgoing payload data, if appropriate.
yarp::os::PortReader & modifyReply(yarp::os::PortReader &reader) override
Modify reply payload data, if appropriate.
void setCarrierParams(const yarp::os::Property ¶ms) override
Configure carrier from port administrative commands.
bool configureFromProperty(yarp::os::Property &options) override
bool acceptIncomingData(yarp::os::ConnectionReader &reader) override
Determine whether incoming data should be accepted.
bool acceptOutgoingData(const yarp::os::PortWriter &writer) override
Determine whether outgoing data should be accepted.
bool configure(yarp::os::ConnectionState &proto) override
Class PortMonitor.
A mini-server for performing network communication in the background.
std::string getName() const override
Get name of port.
An interface for reading from a network connection.
virtual ConnectionWriter * getWriter()=0
Gets a way to reply to the message, if possible.
virtual void setParentConnectionReader(ConnectionReader *parentConnectionReader)
Set ConnectionReader to be used for reading the envelope.
The basic state of a connection - route, streams in use, etc.
virtual const Route & getRoute() const =0
Get the route associated with this connection.
virtual std::string getSenderSpecifier() const =0
Extract a name for the sender, if the connection type supports that.
virtual Contactable * getContactable() const =0
Get the port associated with the connection.
ConnectionWriter & getWriter()
Get the dummy ConnectionWriter loaded with whatever was written the ConnectionWriter since it was las...
ConnectionReader & getReader(ConnectionWriter *replyWriter=nullptr)
Get the dummy ConnectionReader loaded with whatever was written the ConnectionWriter since it was las...
void reset()
Reset and clear the current ConnectionWriter.
static void unlock()
Call post() on a global mutual-exclusion semaphore allocated by YARP.
static void lock()
Call wait() on a global mutual-exclusion semaphore allocated by YARP.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
A class for storing options and configuration information.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
void fromString(const std::string &txt, bool wipe=true)
Interprets a string as a list of properties.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
void clear()
Remove all associations.
Helper class for finding config files and other external resources.
bool setDefaultContext(const std::string &contextName)
Sets the context for the current ResourceFinder object.
bool configure(int argc, char *argv[], bool skipFirstArgument=true)
Sets up the ResourceFinder.
std::string findFile(const std::string &name)
Find the full path to a file.
Base class for generic things.
bool setConnectionReader(yarp::os::ConnectionReader &reader)
set a reference to a ConnectionReader
yarp::os::PortWriter * getPortWriter()
yarp::os::PortReader * getPortReader()
bool write(yarp::os::ConnectionWriter &connection)
void setPortReader(yarp::os::PortReader *reader)
Set the reference to a PortReader object.
void setPortWriter(yarp::os::PortWriter *writer)
Set the reference to a PortWriter object.
A single value (typically within a Bottle).
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual std::string asString() const
Get string value.
#define yCError(component,...)
#define yCAssert(component, x)
#define yCTrace(component,...)
An interface to the operating system, including Port based communication.