13 using namespace Rebot;
18 if(sizeInBytes % 4 != 0) {
22 if(addressInBytes % 4 != 0) {
39 size_t iterationsRequired = registerInfo.
nWords / READ_BLOCK_SIZE;
40 size_t leftOverWords = registerInfo.
nWords % READ_BLOCK_SIZE;
43 for(
size_t count = 0; count < iterationsRequired; ++count) {
45 registerInfo.
addressInWords + (count * READ_BLOCK_SIZE), READ_BLOCK_SIZE, data + (count * READ_BLOCK_SIZE));
49 data + (iterationsRequired * READ_BLOCK_SIZE));
56 std::vector<uint32_t> packet(3);
57 for(
unsigned int i = 0; i < registerInfo.
nWords; ++i) {
58 packet[0] = SINGLE_WORD_WRITE;
60 packet[2] =
static_cast<uint32_t
>(data[i]);
72 if(responseCode[0] != Rebot::READ_ACK) {
84 unsigned int datasendSize = 3 *
sizeof(int);
85 std::vector<char> datasend(datasendSize);
86 std::vector<uint32_t> packet(3);
87 packet[0] = MULTI_WORD_READ;
88 packet[1] = wordAddress;
89 packet[2] = wordsToRead;
95 for(
const auto& i : source) {
96 *destination =
static_cast<int32_t
>(i);