Giter Site home page Giter Site logo

Comments (4)

lemunozm avatar lemunozm commented on June 15, 2024

Hi @baozeng90,

It seems to be a problem with the processor word size. Are you using the 16bits TMS570 version? Currently, we only support 32bits processor or higher.

from micro-xrce-dds-client.

baozeng90 avatar baozeng90 commented on June 15, 2024

@lemunozm
1)It‘s 32bits.But my client(TMS570) is BIG ENDIANNESS.my agent is LITTLE ENDIANNESS.
2)I have modify config.h(#define BIG_ENDIAN 1)
3) In file basic.c (function ucdr_serialize_byte_2),UCDR_MACHINE_ENDIANNESS must be UCDR_LITTLE_ENDIANNESS!?There are some similar funtions.
4) I think my problem is related to deserialize ACK from agent.
5) Now I have no idea.
bool ucdr_serialize_byte_2(ucdrBuffer* mb, const ucdrEndianness endianness, const uint16_t* bytes)
{
uint32_t data_size = sizeof(uint16_t);
uint32_t alignment = ucdr_buffer_alignment(mb, data_size);

if(ucdr_check_buffer(mb, alignment + data_size))
{
    mb->iterator += alignment;

    if(UCDR_LITTLE_ENDIANNESS == endianness) 
    {
        memcpy(mb->iterator, bytes, data_size);
    }
    else
    {
        uint8_t* bytes_pointer = (uint8_t*)bytes;
        *mb->iterator = *(bytes_pointer + 1);
        *(mb->iterator + 1) = *bytes_pointer;
    }

    mb->iterator += data_size;
    mb->last_data_size = data_size;
}
return !mb->error;

}

from micro-xrce-dds-client.

lemunozm avatar lemunozm commented on June 15, 2024

Hi @baozeng90,

we are working on this problem.

This issue has a PR associated: #71
I'll let you know once the PR is accepted to master

from micro-xrce-dds-client.

lemunozm avatar lemunozm commented on June 15, 2024

The PR #71 with the solution is already merged in master.

Please, set the variable CONFIG_BIG_ENDIANNESS of the client.config file to TRUE to compile with the big endianness behavior.

from micro-xrce-dds-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.