About Interpreters

An interpreter parses the payload and extracts the device telemetry data. The connector then uses the data to form a device message in Oracle Internet of Things Cloud Service. Interpreters can be categorized as JSON or binary. Binary interpreters support additional payload grammars which can be used to parse device-native binary payloads

An interpreter is needed to parse each type of payload. When you configure an interpreter, you provide its selection criteria, which the connector uses to select an interpreter.

Declarative Configuration of an Interpreter

In Oracle Internet of Things Cloud Service, you create an interpreter using the management console. You can also create an interpreter at runtime when a connector receives a notification from a device.

Before you configure an interpreter, you need these details:
  • Selection criteria: Provide information that the connector uses to select a suitable interpreter to parse the payload data. For a connector that lets you connect multiple types of devices, the envelope data of the connector must have some suitably unique field value that can be used to identify different payload types. An example, if the envelop contains a type field which contains the sub-string E1 where E1 defines a type of payload data, then the selection criteria will look like type LIKE "%E1%" where type is a metadata field parsed from the envelop data by the connector.Description of interpreter_selection_criteria_example.png follows
    Description of the illustration interpreter_selection_criteria_example.png
  • Device models: Specify the name of the device model for the interpreter. Your Oracle Internet of Things Cloud Service instance should include all the required device models.
  • Sample payload data and payload grammar: Provide a sample payload data for a payload type. If the sample payload is in JSON, the grammar is built in and the parsing is done by the connector. If the sample payload in binary, you'll need to provide the grammar for parsing the binary payload. See Learn About Adding Grammars
  • Device metadata: Map the standard metadata fields such as Name, Hardware ID, or custom fields to the parsed envelope data. This helps the connector to create a device record when it registers the device in Oracle Internet of Things Cloud Service.
  • Alerts and Custom Data: Add any alerts or custom data message types contained in the selected device model to be signaled through this connector. Each alert or custom data format can have its own sample payload and field map.