|
Robot Raconteur Core C++ Library
|
Single dimensional pod random access memory region. More...
#include <MemoryMember.h>
Public Member Functions | |
| PodArrayMemory () | |
| Construct a new PodArrayMemory instance. | |
| PodArrayMemory (const boost::intrusive_ptr< RRPodArray< T > > &memory) | |
| Construct a new PodArrayMemory instance attached to an RRPodArrayPtr<T>. | |
| virtual void | Attach (const boost::intrusive_ptr< RRPodArray< T > > &memory) |
| Attach PodArrayMemory instance to an RRPodArrayPtr<T>. | |
| RR_OVIRTUAL uint64_t | Length () RR_OVERRIDE |
| Return the length of the array memory. | |
| virtual void | Read (uint64_t memorypos, boost::intrusive_ptr< RRPodArray< 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< RRPodArray< T > > &buffer, uint64_t bufferpos, uint64_t count) |
| Write a segment to an array memory. | |
Single dimensional pod 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 PodArrayMemory class is used to represent a single dimensional pod array. Multidimensional pod arrays should use PodMultiDimArrayMemory. Type T must be declared in a service definition using the pod keyword, and generated using RobotRaconteurGen.
PodArrayMemory instances are attached to an RRPodArrayPtr<T>, either when constructed or later using Attach().
PodArrayMemory instances returned by clients are special implementations designed to proxy requests to the service. They cannot be attached to an arbitrary array.
| T | The pod type of the array |
|
inline |
Construct a new PodArrayMemory instance.
New instance will not be attached to an array.
PodArrayMemory must be constructed with boost::make_shared<PodArrayMemory<T> >();
|
inline |
Construct a new PodArrayMemory instance attached to an RRPodArrayPtr<T>.
New instance will be constructed attached to an array.
PodArrayMemory must be constructed with boost::make_shared<PodArrayMemory<T> >();
| memory | The array to attach |
|
inlinevirtual |
Attach PodArrayMemory instance to an RRPodArrayPtr<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 |