62void rpb::CoreV2::setup_python() {}
65rpb::CoreV2::CoreV2() {
74rpb::CoreV2::~CoreV2() {}
77void rpb::CoreV2::initSize(uint32_t size) {
83uint32_t rpb::CoreV2::count() {
88uint32_t rpb::CoreV2::headerSize() {
94 return frame_->begin();
99 return frame_->begin() + headerSize_;
103uint32_t rpb::CoreV2::tailSize() {
109 if (index >= tails_.size())
111 "Attempt to get tail index %" PRIu32
" in message with %" PRIu32
" tails",
116 return tails_[(tails_.size() - 1) - index];
121 if (index >= tails_.size())
123 "Attempt to access tail %" PRIu32
" in frame with %" PRIu32
" tails",
128 return tails_[(tails_.size() - 1) - index] + tailSize_;
133 if (index >= list_.size())
135 "Attempt to access record %" PRIu32
" in frame with %" PRIu32
" records",
140 return list_[(list_.size() - 1) - index];
144uint32_t rpb::CoreV2::sequence() {
165 if ((frame->getError())) {
166 log_->warning(
"Dropping frame due to error: 0x%" PRIx8, frame->getError());
171 if ((rem = frame->getPayload()) < 10) {
172 log_->warning(
"Dropping small frame size = %" PRIu32, frame->getPayload());
177 beg = frame->begin();
191 if ((temp & 0xF) != 2) {
192 log_->error(
"Version mismatch. Got %" PRIu8, (temp & 0xF));
206 while (mark != beg) {
208 if (rem < tailSize_) {
209 log_->error(
"Not enough space (%" PRIu32
") for tail (%" PRIu32
")", rem, tailSize_);
219 tails_.push_back(mark);
230 log_->error(
"Not enough space (%" PRIu32
") for frame (%" PRIu32
")", rem, fSize);
240 list_.push_back(rpb::Data::create(mark, fSize, dest, fUser, lUser));
246void rpb::CoreV2::reset() {
static GeneralError create(std::string src, const char *fmt,...)
Creates a formatted error instance.
static std::shared_ptr< rogue::Logging > create(const std::string &name, bool quiet=false)
Creates a logger instance.
Random-access byte iterator across a Frame payload.
static void fromFrame(rogue::interfaces::stream::FrameIterator &iter, uint32_t size, void *dst)
Copies bytes from a frame iterator to a destination pointer.
std::shared_ptr< rogue::interfaces::stream::Frame > FramePtr
Shared pointer alias for Frame.
std::shared_ptr< rogue::protocols::batcher::CoreV2 > CoreV2Ptr
std::shared_ptr< rogue::protocols::batcher::Data > DataPtr