public override MessageElementNestedElementList PackWriteRequest(vector_uint64_t bufferpos, vector_uint64_t count) { using (bufferpos) using (count) { NamedMultiDimArray o = new NamedMultiDimArray(count.Select(x => (uint)x).ToArray(), new T[count.Aggregate(1, (x, y) => (int)x * (int)y)]); buffer.RetrieveSubArray(bufferpos.Select(x => (uint)x).ToArray(), o, new uint[buffer.Dims.Length], count.Select(x => (uint)x).ToArray()); return(RobotRaconteurNode.s.PackNamedMultiDimArray <T>(o)); } }
public virtual void Read(ulong[] memorypos, NamedMultiDimArray buffer, ulong[] bufferpos, ulong[] count) { multimemory.RetrieveSubArray(memorypos.Select(x => (uint)x).ToArray(), buffer, bufferpos.Select(x => (uint)x).ToArray(), count.Select(x => (uint)x).ToArray()); }