Init(Remote_Command)
Description
Function enables remote command callback.
Syntax
Init(Remote_Command);
Returns
Return value | Return explanation |
SCRIPT_OPERATION_SUCCESS | Success |
SCRIPT_NO_ACCESS | Peripheral already initialized. |
Function call example
Remote callback initialization example
new buffer[255]; // Max Remote_command buffer length 255 byte.
public callback(event)
{
switch(event)
{
case Remote_Command: // RemoteCommand callback event
{
if(buf_len(Remote_Command)) // Check for Remote_Command buffer length
{
read_buf(Remote_Command, len, buffer); // Read data that came and store it somewhere
}
}
}
return 0;
}
main()
{
Init(Remote_Command); // initialization of `Remote_Command`
for(;;)
{
Delay(1000);
}
}