LogoLogo
Thinger.io
  • IOTMP
    • Protocol
    • Message Structure
      • Message Header
      • Message Body
    • Messages
      • Ok
      • Error
      • Connect
      • Disconnect
      • Keep Alive
      • Run Resource
      • Describe Resources
      • Resource Streams
        • Start Stream
        • Stop Stream
        • Stream Data
    • Definitions
  • Thinger.io IOTMP
    • Features
      • REST API
      • Remote Desktop
      • Remote Proxies
      • Remote Webservices
      • Remote Terminal
      • Remote Filesystem
      • MQTT Interoperability
    • Implemenation
      • Messages
        • Connect
    • SDKs
      • Linux IOTMP
      • Arduino IOTMP
      • NodeJS IOTMP
      • Web IOTMP
      • Python SDK
Powered by GitBook
On this page
  • Request
  • Header
  • Body
  • Responses
  • OK
  • Error

Was this helpful?

Edit on GitHub
  1. IOTMP
  2. Messages

Run Resource

Message to run a resource in a device or in the broker.

Last updated 2 years ago

Was this helpful?

This message enables running remote defined both in client and server. Resources are defined dynamically by clients and servers. As described in the definition, a resource is basically like a function that can be executed like in RPC (Remote Procedure Call). As a "function" it can receive inputs, and provide an output.

A device can define multiple resources as required by its use case, i.e., read humidity, adjust temperature, turn on a light, etc. Typical resources for an IoT device are functions for reading device states, sensor values, adjust parameters, or actuating over digital pins to mention a few.

A server or broker can also define multiple resources that can be executed by their clients. Such resources can vary depending on the use case, and normally involves complex task that are not worth to be executed in the device. Typical resources defined by a server can be actions like writing to a database, calling an external endpoint for sending communications, managing device configuration, etc.

Request

Header

Field
Value
Description

Message Type

0x06

Run

Message Size

Remaining Message Length

Body

Name
Field
Type
Mandatory
Description

Resource

0x00

any

Stream Id

0x01

varint

Parameters

0x02

any

Payload

0x03

any

The payload sent to the target resource.

Responses

OK

The resource executed correctly.

Error

An error occurred while executing the resource.

.

. If set, the target endpoint should answer to the run message. If not, it should not send back any response.

to be supplied while executing the resource.

resources
resources
varint
Resource identifier
Stream identifier
Resource parameters