Page tree
Skip to end of metadata
Go to start of metadata

The Methods tab is used to define methods for the thing definition. Methods define the interface to functions that are implemented in a gateway trigger (using TR50 Method trigger event type) or are implemented in an application. The following are the possible ways a method gets called:

  • A gateway trigger, 
  • From an application, 
  • From the thing's page in the Management Portal, or 
  • From a cloud trigger within the IoT Portal.

To define a method within the Methods tab, do the following:

  1. Click on the to add a new method
    The New method definition screen appears that will allow you to define the new method

  2. Enter the Key of the method definition. For more information on defining the key, see Field Formats and Limitations
    The Key must correspond to a trigger key or a method key.

  3. Enter the Name of the method definition

  4. Click the Handler drop-down and do one of the following:
    1. Select Method - If you want to execute a method in the device with the corresponding key selected in Step 2
    2. Select Trigger - If you want to execute a trigger (must be triggered through a method.exec event) with the corresponding key selected in Step 2.

  5. Enter the Default ack timeout (seconds) - The number of seconds the method needs to wait for the response before timing out.

  6. Enter the Security tags that will control the access by a user or application trying to execute the method. The user or application must have a role that has the same <update> security tag associated with it in order to execute a method with an <update> security tag associated with it.

  7. To define a Notification variable, click on theNotification variables are input parameters passed to the method.
    1. Enter the Key to the notification variable
    2. Enter the Name of the method notification variable definition
    3. Enter the Count. The count is the number of responses expected. 
    4. Enter the Length. The length of data that will be returned.
    5. Select the Type of data that will be returned
    6. Select the UI type for the notification variable from the UI Type drop-down. This is used when the method is selected from the thing's page to execute the method from the Management Portal  The options includes:

      • Text box
      • Multilinetext box
      • Check box
      • Select
      • Multi-select
      • Tag input box

  8. To define a Completion variable, click on the . Completion variables are returned parameters from executing a method.
    1. Enter the key of the completion variable
    2. Enter the Name of the method completion variable.
    3. Enter the Count. The count is the number of responses expected. 
    4. Enter the Length. The length of data that will be returned.
    5. Select the Type of data that will be returned
    6. Select the UI type for the notification variable from the UI Type drop-down. This is used when the method is selected from the thing's page to execute the method from the Management Portal  The options includes:

      • Text box
      • Multilinetext box
      • Check box
      • Select
      • Multi-select
      • Tag input box

Related topics

  • No labels