23 "yarp.carrier.priority",
61 portName = proto.
getRoute().getToName();
63 group = getPeers().add(portName,
this);
86#ifdef WITH_PRIORITY_DEBUG
87 if(options.
check(
"debug"))
91 std::snprintf(dummy, 1024,
"\n%s:\n",
sourceName.c_str());
93 std::snprintf(dummy, 1024,
" stimulation: %.2f\n",
stimulation);
95 std::snprintf(dummy, 1024,
" bias: %.2f\n",
bias);
97 std::snprintf(dummy, 1024,
" tc: %.2fs\n",
timeConstant);
99 std::snprintf(dummy, 1024,
" tr: %.2fs\n",
timeResting);
101 std::snprintf(dummy, 1024,
" ex: ");
109 std::snprintf(dummy, 1024,
"(%s, %.2f) ",
117 std::snprintf(dummy, 1024,
" virtual: %s\n",
120 double rate = options.
check(
"rate",
Value(10)).asInt32() / 1000.0;
121 std::snprintf(dummy, 1024,
" db.rate: %fs\n", rate);
232 return ((
I<0) ? 0 :
I);
269 for(
size_t i=0; i<
peerCol->excitation.size(); i++)
326 double output =
Y(
row,0) *
X(
row,0);
355#ifdef WITH_PRIORITY_DEBUG
Allow priority-based message selection.
bool configure(yarp::os::ConnectionState &proto) override
Give carrier a shot at looking at how the connection is set up.
double getActualInput(double t)
double temporalStimulation
bool isResting(double priority)
bool acceptIncomingData(yarp::os::ConnectionReader &reader) override
Determine whether incoming data should be accepted.
yarp::os::Bottle excitation
double getActualStimulation(double t)
yarp::os::BufferedPort< yarp::sig::Vector > debugPort
~PriorityDebugThread() override
void threadRelease() override
Release method.
void run() override
Loop function.
PriorityCarrier * pcarrier
bool threadInit() override
Initialization method.
PriorityDebugThread(PriorityCarrier *carrier)
Class PriorityDebugThread.
std::string debugPortName
virtual bool acceptIncomingData(yarp::os::ConnectionReader &reader, PriorityCarrier *source)
bool recalculate(double t)
Class PriorityGroup.
A simple collection of objects that can be described and transmitted in a portable way.
size_type size() const
Gets the number of elements in the bottle.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
A mini-server for performing network communication in the background.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
void write(bool forceStrict=false)
Write the current object being returned by BufferedPort::prepare.
T & prepare()
Access the object which will be transmitted by the next call to yarp::os::BufferedPort::write.
An interface for reading from a network connection.
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.
static LogCallback printCallback()
Get current print callback.
static LogType minimumPrintLevel()
Get current minimum print level.
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.
An abstraction for a periodic thread.
bool setPeriod(double period)
Set the (new) period of the thread.
bool isRunning() const
Returns true when the thread is started, false otherwise.
bool start()
Call this to start the thread.
void stop()
Call this to stop the thread, this call blocks until the thread is terminated (and releaseThread() ca...
A class for storing options and configuration information.
void fromString(const std::string &txt, bool wipe=true)
Interprets a string as a list of properties.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
Bottle & findGroup(const std::string &key) const override
Gets a list corresponding to a given keyword.
A single value (typically within a Bottle).
virtual yarp::conf::float64_t asFloat64() const
Get 64-bit floating point value.
virtual bool isList() const
Checks if value is a list.
virtual Bottle * asList() const
Get list value.
virtual std::string asString() const
Get string value.
void resize(size_t r, size_t c)
Resize the matrix, if matrix is not empty preserve old content.
std::string toString(int precision=-1, int width=-1, const char *endRowStr="\n") const
Print matrix to a string.
const Matrix & eye()
Build an identity matrix, don't resize.
void resize(size_t size) override
Resize the vector.
#define yCInfo(component,...)
#define yCError(component,...)
#define yCAssert(component, x)
#define yCTrace(component,...)
#define YARP_LOG_COMPONENT(name,...)
double det(const yarp::sig::Matrix &in)
Computes the determinant of a matrix (defined in Math.h).
yarp::sig::Matrix luinv(const yarp::sig::Matrix &in)
Invert a square matrix using LU-decomposition (defined in Math.h).
double now()
Return the current time in seconds, relative to an arbitrary starting point.
An interface to the operating system, including Port based communication.