RUI3 (RAK Unified Interface 3) - RAK4631
bg77::qcoapoption

Public Member Functions

String set (int, int, int)
 
String set (int, int, int, int, int)
 

Member Function Documentation

◆ set() [1/2]

String set ( int  ,
int  ,
int   
)
Description
This api configures the options of a CoAP message
Syntax
bg77.qcoapoption.set(clientID,mode,opt_index)
Parameters
clientIDint Integer type. CoAP client identifier. Range: 0–5.
modeint Integer type. The operation mode of this command.
  • 0 Add a new option for CoAP message
  • 1 Remove an existing option from CoAP message
opt_indexint Integer type. Index of the option to be added/deleted. Range: 0–7
Returns
String response

◆ set() [2/2]

String set ( int  ,
int  ,
int  ,
int  ,
int   
)
Description
This api configures the options of a CoAP message
Syntax
bg77.qcoapoption.set(clientID,mode,opt_index,opt_number,opt_value)
Parameters
clientIDint Integer type. CoAP client identifier. Range: 0–5.
modeint Integer type. The operation mode of this command.
  • 0 Add a new option for CoAP message
  • 1 Remove an existing option from CoAP message
opt_indexint Integer type. Index of the option to be added/deleted. Range: 0–7
opt_numberint Integer type. Option number. Only valid when <mode>=0. The individual CoAP options are summarized and explained in RFC 7252 section 5.10. Option Number Option Name
  • 1 If-Match
  • 3 Uri-Host
  • 4 ETag
  • 5 If-None-Match
  • 7 Uri-Port
  • 8 Location-Path
  • 11 Uri-Path
  • 12 Content-Format
  • 14 Max-Age
  • 15 Uri-Query
  • 17 Accept
  • 20 Location-Query
  • 35 Proxy-Uri
  • 39 Proxy-Scheme
  • 60 Size1
opt_valueint Option value that corresponds to each option number. Only valid when <mode>=0.
Returns
String response