This class is used to get access to buffer memory
More...
#include <IoBuffer.hpp>
|
using | Ptr = std::shared_ptr< IoBuffer > |
|
using | IGdsBuffer = Arp::Plc::Commons::Internal::Gds::Buffer::IGdsBuffer |
|
using | IGdsBufferPtr = std::shared_ptr< IGdsBuffer > |
|
|
| IoBuffer (const IoBuffer &arg)=delete |
|
| IoBuffer (IoBuffer &&arg) noexcept |
| Default move constructor.
|
|
IoBuffer & | operator= (const IoBuffer &arg)=delete |
|
IoBuffer & | operator= (IoBuffer &&arg) noexcept |
| Default move-assignment operator.
|
|
| ~IoBuffer (void) |
| Default destructor.
|
|
| IoBuffer (IGdsBufferPtr gdsBufferPtr) |
| Constructs an IoBuffer instance. More...
|
|
size_t | GetSize (void) const |
| Returns the buffer data size. More...
|
|
Endianness | GetEndianness () const |
| Returns the buffer endianness. More...
|
|
void | SetDataValid (bool isValid=true) |
| Sets data valid flag. More...
|
|
bool | BeginRead (byte *¤tReadData) |
| Locks the buffer for reading and returns address of the current read buffer data segment. More...
|
|
void | EndRead (void) |
| Releases the buffer for reading.
|
|
void | BeginWrite (byte *¤tWriteData) |
| Locks the buffer for writing and returns current write buffer data segment. More...
|
|
void | EndWrite (bool isValid=true) |
| Releases the buffer for writing and sets a data valid flag. More...
|
|
Impl & | GetImpl (void) |
| For internal use only.
|
|
const Impl & | GetImpl (void) const |
|
This class is used to get access to buffer memory
Objects of this class should only be created by the DataManager provided by IoComponentBase.
◆ IoBuffer()
Arp::Io::Commons::IoBuffer::IoBuffer |
( |
IGdsBufferPtr |
gdsBufferPtr | ) |
|
|
explicit |
Constructs an IoBuffer instance.
- Parameters
-
gdsBufferPtr | The pointer to the IGdsBufferPtr. Throws if nullptr is used. |
- Exceptions
-
ArgumentNullException | If gdsBufferPtr is nullptr . |
◆ BeginRead()
bool Arp::Io::Commons::IoBuffer::BeginRead |
( |
byte *& |
currentReadData | ) |
|
Locks the buffer for reading and returns address of the current read buffer data segment.
- Parameters
-
currentReadData | Returns the address of the current read buffer data segment |
- Returns
true
if the buffer data is valid, otherwise false
.
◆ BeginWrite()
void Arp::Io::Commons::IoBuffer::BeginWrite |
( |
byte *& |
currentWriteData | ) |
|
Locks the buffer for writing and returns current write buffer data segment.
- Parameters
-
currentWriteData | Returns the address of the current write buffer data segment. |
◆ EndWrite()
void Arp::Io::Commons::IoBuffer::EndWrite |
( |
bool |
isValid = true | ) |
|
Releases the buffer for writing and sets a data valid flag.
- Parameters
-
isValid | Sets the data valid flag of the current buffer object. |
◆ GetEndianness()
Endianness Arp::Io::Commons::IoBuffer::GetEndianness |
( |
void |
| ) |
const |
Returns the buffer endianness.
- Returns
- The buffer Endianness.
◆ GetSize()
size_t Arp::Io::Commons::IoBuffer::GetSize |
( |
void |
| ) |
const |
Returns the buffer data size.
- Returns
- The buffer data size.
◆ SetDataValid()
void Arp::Io::Commons::IoBuffer::SetDataValid |
( |
bool |
isValid = true | ) |
|
Sets data valid flag.
- Parameters
-
isValid | Sets status of data valid fag. |
The documentation for this class was generated from the following files: