61 for (x = 0; x < 256; x++) {
69rpp::Controller::~Controller() {
74void rpp::Controller::stopQueue() {
88 lFrame = ris::Frame::create();
91 if ((size % alignSize_) != 0) size += (alignSize_ - (size % alignSize_));
94 while (lFrame->getAvailable() < size) {
96 fSize = (size - lFrame->getAvailable()) + headSize_ + tailSize_;
99 rFrame = tran_->reqFrame(fSize,
false);
103 buff = *(rFrame->beginBuffer());
106 if (((buff->getAvailable() - tailSize_) % alignSize_) != 0)
107 buff->adjustTail((buff->getAvailable() - tailSize_) % alignSize_);
110 if (buff->getAvailable() < (headSize_ + tailSize_ + 1))
112 "Buffer size %" PRIu32
" is less than min size required %" PRIu32,
113 buff->getAvailable(),
114 (headSize_ + tailSize_ + 1)));
117 buff->adjustHeader(headSize_);
118 buff->adjustTail(tailSize_);
121 lFrame->appendBuffer(buff);
133 frame = tranQueue_.pop();
141uint32_t rpp::Controller::getDropCount() {
146void rpp::Controller::setTimeout(uint32_t timeout) {
147 div_t divResult = div(timeout, 1000000);
148 timeout_.tv_sec = divResult.quot;
149 timeout_.tv_usec = divResult.rem;
static GeneralError create(std::string src, const char *fmt,...)
Creates a formatted error instance.
RAII helper that releases the Python GIL for a scope.
static std::shared_ptr< rogue::Logging > create(const std::string &name, bool quiet=false)
Creates a logger instance.
void setThold(uint32_t thold)
Sets busy-threshold depth used by busy().
rogue::Queue< std::shared_ptr< rogue::interfaces::stream::Frame > > tranQueue_
std::atomic< uint32_t > dropCount_
std::shared_ptr< rogue::protocols::packetizer::Application > * app_
std::shared_ptr< rogue::protocols::packetizer::Transport > tran_
std::shared_ptr< rogue::Logging > log_
std::shared_ptr< rogue::interfaces::stream::Buffer > BufferPtr
Shared pointer alias for Buffer.
std::shared_ptr< rogue::interfaces::stream::Frame > FramePtr
Shared pointer alias for Frame.
std::shared_ptr< rogue::protocols::packetizer::Transport > TransportPtr
std::shared_ptr< rogue::protocols::packetizer::Application > ApplicationPtr
void defaultTimeout(struct timeval &tout)
Returns Rogue default timeout as a timeval.