Object Multicast¶
Name | Input Params | Return Data | Description |
---|---|---|---|
resiot_sendmulticast | String, String, Boolean, String, String, Integer | Error | Send a message to some nodes using multicast |
resiot_sendmulticast_datarate | String, String, Boolean, String, String, Integer, Integer | Error | Send a message to some nodes using multicast |
resiot_sendmulticast(HexID, Payload, Raw, GwEUI, Reference, Port)¶
Send a message to some nodes using multicast.
Example
Error = resiot_sendmulticast (HexID, Payload, Raw, GwEUI, Reference, Port)
Input Parameters
- HexID (String): * Hexadecimal ID of the multicast to use.
- Payload (String): * The Payload to sent to the nodes.
- Raw (Boolean): * Check if the Payload is in Raw format (true), or it is already encoded (false).
- GwEUI (String): * Gateway EUI of the gateway you want to use.
- Reference (String): * String to identify the message.
- Port (Integer): * Port in which send the message.
Returns
- Error (String): * If there is any type of error, it is specified here. *
HexID = "736365323437" -- Hexadecimal ID of the multicast to use
Payload = "123456" -- The Payload to sent to the nodes
Raw = true -- Check if the Payload is in Raw format (true), or it is already encoded (false)
GwEUI = "00800000A00009B5" -- Gateway EUI of the gateway you want to use
Reference = "Tutorial" -- String to identify the message
Port = 1 -- Port in which send the message
-- The Multicast will be sent using the default regional RX2 Datarate
Error = resiot_sendmulticast (HexID, Payload, Raw, GwEUI, Reference, Port)
if Error ~= "" then
-- error
resiot_debug(Error)
end
resiot_sendmulticast_datarate (HexID, Payload, Raw, GwEUI, Reference, Port, Datarate)¶
Send a message to some nodes using multicast with a user defined RX2 datarate.
Example
Error = resiot_sendmulticast_datarate (HexID, Payload, Raw, GwEUI, Reference, Port, Datarate)
Input Parameters
- HexID (String): * Hexadecimal ID of the multicast to use.
- Payload (String): * The Payload to sent to the nodes.
- Raw (Boolean): * Check if the Payload is in Raw format (true), or it is already encoded (false).
- GwEUI (String): * Gateway EUI of the gateway you want to use.
- Reference (String): * String to identify the message.
- Port (Integer): * Port in which send the message.
- Datarate (Integer): * Custom Datarate for the multicast downlink.
Returns
- Error (String): * If there is any type of error, it is specified here.
HexID = "736365323437" -- Hexadecimal ID of the multicast to use
Payload = "123456" -- The Payload to sent to the nodes
Raw = true -- Check if the Payload is in Raw format (true), or it is already encoded (false)
GwEUI = "00800000A00009B5" -- Gateway EUI of the gateway you want to use
Reference = "Tutorial" -- String to identify the message
Port = 1 -- Port in which send the message
Datarate = -1 -- Custom Datarate for the multicast downlink
-- If set to -1, the regional defaul value will be used
-- For the list of possible datarate values, please refer to your LoRaWAN regional documentation
Error = resiot_sendmulticast_datarate (HexID, Payload, Raw, GwEUI, Reference, Port, Datarate)
if Error ~= "" then
-- error
resiot_debug(Error)
end