Accessing params from functions in codewarrior

Hey Guys,

I need a bone here. I am trying to read parameters being passed into a function call and for development purpose I want to simply dump them to the console to see what I am working with. Now I am new to C syntax so I know it is in the method that i am doing something wrong.
I wont bother to put any code other then the generated code because I tried in many different ways I will simply ask in the following example how do you access the parameters data or find their location in memory in other words how do you access that data and dump it in a more or less readable format?

#ifdef ENABLE_XBEE_HANDLE_RX
int xbee_transparent_rx(const wpan_envelope_t FAR *envelope, void FAR *context)
{
   /*Suppose i want to read the envelope*/
    
	return 0;
}
#endif

What do i do?
More importantly how can I add nodes in the address map?
Where is this handled aps.h ?
How do you override or remap a function?
Anything could help. A decent explanation of the codewarrior lib would be great.

Hello Cplus,

Have you tried with the provided examples? New -> Xbee sample project.

This is the handler for the “Basic frame reception” example


#ifdef ENABLE_XBEE_HANDLE_RX
int xbee_transparent_rx(const wpan_envelope_t FAR *envelope, void FAR *context)
{
	char addrbuf[ADDR64_STRING_LENGTH];

	puts("Received Simple Frame");
	puts("---------------------");
	sys_watchdog_reset();
	printf("Source     : %s
", addr64_format(addrbuf, &envelope->ieee_address));
	printf("Network    : %04x
", be16toh(envelope->network_address));
	printf("Data length: %u
", envelope->length);
	sys_watchdog_reset();
	dump(envelope->payload, envelope->length);
	puts("
");

	return 0;
}
#endif