|
Robot Raconteur Core C++ Library
|
Single dimensional namedarray random access memory region. More...
#include <MemoryMember.h>
Public Member Functions | |
| NamedArrayMemory () | |
| Construct a new NamedArrayMemory instance. | |
| NamedArrayMemory (const boost::intrusive_ptr< RRNamedArray< T > > &memory) | |
| Construct a new NamedArrayMemory instance attached to an RRNamedArrayPtr<T>. | |
| virtual void | Attach (const boost::intrusive_ptr< RRNamedArray< T > > &memory) |
| Attach NamedArrayMemory instance to an RRNamedArrayPtr<T>. | |
| RR_OVIRTUAL uint64_t | Length () RR_OVERRIDE |
| Return the length of the array memory. | |
| virtual void | Read (uint64_t memorypos, boost::intrusive_ptr< RRNamedArray< T > > &buffer, uint64_t bufferpos, uint64_t count) |
| Read a segment from an array memory. | |
| virtual void | Write (uint64_t memorypos, const boost::intrusive_ptr< RRNamedArray< T > > &buffer, uint64_t bufferpos, uint64_t count) |
| Write a segment to an array memory. | |
Single dimensional namedarray random access memory region.
Memories represent random access memory regions that are typically represented as arrays of various shapes and types. Memories can be declared in service definition files using the memory member keyword within service definitions. Services expose memories to clients, and the nodes will proxy read, write, and parameter requests between the client and service. The node will also break up large requests to avoid the message size limit of the transport.
The NamedArrayMemory class is used to represent a single dimensional named array. Multidimensional named arrays should use NamedMultiDimArrayMemory. Type T must be declared in a service definition using the namedarray keyword, and generated using RobotRaconteurGen.
NamedArrayMemory instances are attached to an RRNamedArrayPtr<T>, either when constructed or later using Attach().
NamedArrayMemory instances returned by clients are special implementations designed to proxy requests to the service. They cannot be attached to an arbitrary array.
| T | The namedarray type of the array |
|
inline |
Construct a new NamedArrayMemory instance.
New instance will not be attached to an array.
NamedArrayMemory must be constructed with boost::make_shared<NamedArrayMemory<T> >();
|
inline |
Construct a new NamedArrayMemory instance attached to an RRNamedArrayPtr<T>.
New instance will be constructed attached to an array.
NamedArrayMemory must be constructed with boost::make_shared<NamedArrayMemory<T> >();
| memory | The array to attach |
|
inlinevirtual |
Attach NamedArrayMemory instance to an RRNamedArrayPtr<T>.
| memory | The array to attach |
|
inlinevirtual |
Return the length of the array memory.
When used with a memory returned by a client, this function will call the service to execute the request.
Implements RobotRaconteur::ArrayMemoryBase.
|
inlinevirtual |
Read a segment from an array memory.
Read a segment of an array memory into a supplied buffer array. The start positions and length of the read are specified.
When used with a memory returned by a client, this function will call the service to execute the request.
| memorypos | The start index in the memory array to read |
| buffer | The buffer to receive the read data |
| bufferpos | The start index in the buffer to write the data |
| count | The number of array elements to read |
|
inlinevirtual |
Write a segment to an array memory.
Writes a segment to an array memory from a supplied buffer array. The start positions and length of the write are specified.
When used with a memory returned by a client, this function will call the service to execute the request.
| memorypos | The start index in the memory array to write |
| buffer | The buffer to write the data from |
| bufferpos | The start index in the buffer to read the data |
| count | The number of array elements to write |