/*
Header BitStreamQueue : Manage message received
Copyright (C) 2019 AleaJactaEst
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#ifndef BIT_STREAM_QUEUE_H
#define BIT_STREAM_QUEUE_H
#define SIZE_QUEUE_MESSAGE 6
#include "core/reference.h"
#include "modules/bitstream/bitstream.h"
class BitStreamQueue : public Reference {
GDCLASS(BitStreamQueue, Reference)
protected:
static void _bind_methods();
private:
int _size;
uint32_t _received_number[SIZE_QUEUE_MESSAGE];
Ref _msgin[SIZE_QUEUE_MESSAGE];
//Vector _msgin[SIZE_QUEUE_MESSAGE];
public:
BitStreamQueue();
~BitStreamQueue();
void clear();
int length();
int put_msgbytes(PoolByteArray msgbytes);
Ref get_msg(int pos);
uint32_t get_received_number(int pos);
void erase(int pos);
};
#endif // BIT_STREAM_QUEUE_H