Skip to content

Object Channels

Name Input Params Return Data Description
resiot_chan_send_in String, String, Int String Send a message in a channel after waiting the time specified in the 3rd parameter

resiot_chan_send_in(String, String, Int)

Send a message in a specified channel.
After specifing the channel, the message and the time to wait to send it (in ms), the function will send the message.
In case of error, the function will store it in a string variable.
Example
Comm = resiot_chan_send_in(ChannelName, Message, Time)
Input Parameters
  - ChannelName (String): The name of the selected channel.
  - Message (String): The message that will be sent to the channel.
  - Time (Int): The time to wait before the sending of the message, in ms.
Returns
  - Message = Returns empty if there is no error, otherwise it will contain the error.

ChannelName = "ch001"           -- The name of the selected channel
Message = "First Message"       -- The message that will be sent to the channel
Time = 1000                     -- The time to wait before the sending of the message, in ms
Comm = resiot_chan_send_in(ChannelName, Message, Time)
resiot_debug(Comm)
-- 
-- Result Example:
-- 
-- Comm = ""
-- 
-- If there is error:
-- 
-- Comm = "Invalid Channel"
-- 

Return to index