Synopsis:
task_id=msg_senderid()
Arguments:
none
Description: This function returns the Telecom Engine task id for the task that sent the last message to the calling task. This function can be used to determine where to send a return message to after receiving a message.
For example:
msg_str=msg_read(30);
// If a message was received..
if(msg_str strneq "")
// Get the task ID of the sending task
return_id=msg_senderid();
// Send back an ACK message
msg_send(return_id,"ACK");
endif
Returns: Returns the task ID of the task that sent the last message received by the calling task or -1 if no messages have been received.