Messages(SEND_buf,...)
Description
Send string to another thread.
Syntax
Messages(SEND_buf, length, string[], script_name[]);
Parameters
Variable | Input |
|---|---|
| Number of bytes to send. |
| String of data to send. |
| User defined script name, to which data is going to be transferred. |
Returns
Return value | Return explanation |
SCRIPT_OPERATION_SUCCESS | Success |
SCRIPT_OPERATION_FAILED | Failed |
SCRIPT_PARAM_INVALID | Passed array is too small. |
Function call example
Example of sending string with message
main()
{
for(;;)
{
Messages(SEND_buf, 5, "Hello", "Script2"); //send 5 elements buffer (word "Hello") to script named Thread2.
Delay(1000);
}
}