43    if (port >= NumInputs())
 
   44       EOUT(
"MultiplexerModule %s process inpevent from not existing input %u total %u", GetName(), port, NumInputs());
 
   59    while (CanSendToAllOutputs() && (fQueue.Size()>0)) {
 
   60       unsigned id = fQueue.Pop();
 
   62       if (
id >= NumInputs()) {
 
   63          EOUT(
"MultiplexerModule %s wrong input port id %u, use 0", GetName(), 
id);
 
   70          EOUT(
"Fail to get buffer from input %u", 
id);
 
   74       SendToAllOutputs(buf);
 
   87    std::string ratemeter = 
Cfg(
"DataRateName", cmd).
AsStr();
 
   89    if (!ratemeter.empty()) {
 
  101    bool isout = (port < NumOutputs());
 
  103    if (isout && !CanSend(port)) 
return false;
 
  106    if (isout) Send(port, buf);
 
  114    if (!CanRecv(port)) 
return false;
 
Reference on memory from memory pool.
 
Represents command with its arguments.
 
Base class for user-derived code, implementing event-processing.
 
bool SetPortSignaling(const std::string &name, Port::EventsProducing signal)
 
virtual Parameter CreatePar(const std::string &name, const std::string &kind="")
 
std::string InputName(unsigned indx=0, bool fullname=false) const
 
unsigned NumOutputs() const
 
unsigned NumInputs() const
 
void EnsurePorts(unsigned numinp=0, unsigned numout=0, const std::string &poolname="")
Method ensure that at least specified number of input and output ports will be created.
 
bool SetPortRatemeter(const std::string &name, const Parameter &ref)
 
std::string fDataRateName
 
virtual void ProcessOutputEvent(unsigned port)
Method called by framework when output event is produced.
 
virtual void ProcessInputEvent(unsigned port)
Method called by framework when input event is produced.
 
MultiplexerModule(const std::string &name, dabc::Command cmd=nullptr)
 
const char * GetName() const
Returns name of the object, thread safe
 
Parameter & SetUnits(const std::string &unit)
Set units field of parameter.
 
Parameter & SetRatemeter(bool synchron=false, double interval=1.0)
Converts parameter in ratemeter - all values will be summed up and divided on specified interval.
 
std::string AsStr(const std::string &dflt="") const
 
void Release()
Releases reference on the object.
 
bool null() const
Returns true if reference contains nullptr.
 
virtual bool ProcessSend(unsigned port)
Method called by framework when at least one buffer can be send to output port.
 
RepeaterModule(const std::string &name, dabc::Command cmd=nullptr)
 
virtual bool ProcessRecv(unsigned port)
Method called by framework when at least one buffer available in input port.
 
Parameter Par(const std::string &name) const
Returns reference on worker parameter object.
 
RecordField Cfg(const std::string &name, Command cmd=nullptr) const
Returns configuration field of specified name Configuration value of specified name searched in follo...