more simplifications for shared ring buffer
This commit is contained in:
parent
6484c1a276
commit
f9ce1d9eb9
@ -3,15 +3,14 @@
|
|||||||
#include <framework/ipc/MutexHelper.h>
|
#include <framework/ipc/MutexHelper.h>
|
||||||
|
|
||||||
SharedRingBuffer::SharedRingBuffer(object_id_t objectId, const size_t size,
|
SharedRingBuffer::SharedRingBuffer(object_id_t objectId, const size_t size,
|
||||||
bool overwriteOld, size_t maxExcessBytes, dur_millis_t mutexTimeout):
|
bool overwriteOld, size_t maxExcessBytes):
|
||||||
SystemObject(objectId), SimpleRingBuffer(size, overwriteOld,
|
SystemObject(objectId), SimpleRingBuffer(size, overwriteOld,
|
||||||
maxExcessBytes) {
|
maxExcessBytes) {
|
||||||
mutex = MutexFactory::instance()->createMutex();
|
mutex = MutexFactory::instance()->createMutex();
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedRingBuffer::SharedRingBuffer(object_id_t objectId, uint8_t *buffer,
|
SharedRingBuffer::SharedRingBuffer(object_id_t objectId, uint8_t *buffer,
|
||||||
const size_t size, bool overwriteOld, size_t maxExcessBytes,
|
const size_t size, bool overwriteOld, size_t maxExcessBytes):
|
||||||
dur_millis_t mutexTimeout):
|
|
||||||
SystemObject(objectId), SimpleRingBuffer(buffer, size, overwriteOld,
|
SystemObject(objectId), SimpleRingBuffer(buffer, size, overwriteOld,
|
||||||
maxExcessBytes) {
|
maxExcessBytes) {
|
||||||
mutex = MutexFactory::instance()->createMutex();
|
mutex = MutexFactory::instance()->createMutex();
|
||||||
|
@ -24,8 +24,7 @@ public:
|
|||||||
* will be overwritten.
|
* will be overwritten.
|
||||||
*/
|
*/
|
||||||
SharedRingBuffer(object_id_t objectId, const size_t size,
|
SharedRingBuffer(object_id_t objectId, const size_t size,
|
||||||
bool overwriteOld, size_t maxExcessBytes,
|
bool overwriteOld, size_t maxExcessBytes);
|
||||||
dur_millis_t mutexTimeout = 10);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This constructor takes an external buffer with the specified size.
|
* This constructor takes an external buffer with the specified size.
|
||||||
@ -36,8 +35,7 @@ public:
|
|||||||
* will be overwritten.
|
* will be overwritten.
|
||||||
*/
|
*/
|
||||||
SharedRingBuffer(object_id_t objectId, uint8_t* buffer, const size_t size,
|
SharedRingBuffer(object_id_t objectId, uint8_t* buffer, const size_t size,
|
||||||
bool overwriteOld, size_t maxExcessBytes,
|
bool overwriteOld, size_t maxExcessBytes);
|
||||||
dur_millis_t mutexTimeout = 10);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unless a read-only constant value is read, all operations on the
|
* Unless a read-only constant value is read, all operations on the
|
||||||
|
Loading…
Reference in New Issue
Block a user