Thin Client Error_ about AJ_MarshalArgs()

asked 2014-04-07 06:34:33 -0700

anonymous user


updated 2014-04-07 09:50:32 -0700

georgen gravatar image

I made a function which is about (remote)method call. But the error message is written in Arduino Serial monitor.

010.489 aj_msg.cpp:1773 AJ_MarshalArg(): AJ_ERR_END_OF_DATA
010.494 aj_msg.cpp:1881 AJ_MarshalArgs(): status=AJ_ERR_END_OF_DATA
SensorCheck() resulted in a status of 0x000a.

The code is below, and the point which the error is occured is AJ_MarshalArgs.

int CDSvalue = 0;

int SensorCheck(AJ_Message* msg)
    AJ_Status status = AJ_OK;
    AJ_Message reply;

    status = AJ_MarshalReplyMsg(msg, &reply);

    if(status != AJ_OK) printf("SENSORCHECK METHOD CALL STATUS = %d\n", status);
    if (status == AJ_OK) {
        status = AJ_MarshalArgs(&reply, "i", CDSvalue);
        ***if(status != AJ_OK) printf("SENSORCHECK MARSHAL ARGS STATUS = %d\n", status);***

    if (status == AJ_OK) {
        status = AJ_DeliverMsg(&reply);
        if(status != AJ_OK) printf("SENSORCHECK DELEIVER STATUS = %d\n", status);
    printf("SensorCheck() resulted in a status of 0x%04x.\n", status);
    return 500;

I think I match the signature and the value. ("i", CDSvalue);

How can I modify the code?

edit retag flag offensive close merge delete


Please provide the interface you are using? I believe you may not have defined a return argument, but would like to see the interface definition to confirm.

bspencer ( 2014-04-07 09:35:28 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-05 10:20:22 -0700

bspencer gravatar image

You are trying to marshal the "i" into a method call that was not defined to return an "i" data type. Please modify the interface definition for the method to include an ">i", for example:

static const char* const askSolutionInterfaceExample[] = {
    "?someMethod out>i",

Once you add to your interface definition the ">i" you will be able to marshal the return value.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-04-07 06:34:33 -0700

Seen: 184 times

Last updated: May 05 '14