Skip to content

Commit

Permalink
add implicitStandanloneThingCreation mapper description
Browse files Browse the repository at this point in the history
Signed-off-by: marianne-klein <marianne.klein@bosch.io>
  • Loading branch information
marianne-klein committed Jul 5, 2021
1 parent 9c3cf41 commit d37efa3
Showing 1 changed file with 30 additions and 3 deletions.
Expand Up @@ -66,7 +66,8 @@ The following message mappers are included in the Ditto codebase:
| [Normalized](#normalized-mapper) | Transforms the payload of events to a normalized view. | ||
| [ConnectionStatus](#connectionstatus-mapper) | This mapper handles messages containing `creation-time` and `ttd` headers by updating a feature of the targeted thing with [definition](basic-feature.html#feature-definition) [ConnectionStatus](https://vorto.eclipse.org/#/details/org.eclipse.ditto:ConnectionStatus:1.0.0). || |
| [RawMessage](#rawmessage-mapper) | For outgoing message commands and responses, this mapper extracts the payload for publishing directly into the channel. For incoming messages, this mapper wraps them in a configured message command or response envelope. |||
| [ImplicitThingCreation](#implicitthingcreation-mapper) | This mapper handles messages for which a Thing should be created automatically based on a defined template|| |
| [implicitThingCreation](#implicitthingcreation-mapper) | This mapper handles messages for which a Thing should be created automatically based on a defined template. || |
| [implicitStandaloneThingCreation](#implicitstandalonethingcreation-mapper) | This mapper handles messages for which a Thing should be created automatically based on a defined template. || |

### Ditto mapper

Expand Down Expand Up @@ -246,11 +247,13 @@ Example configuration:
* `ditto-message-feature-id` (optional): Include to send the message or message response to a feature of the thing.
Exclude to send it to the thing itself. Default to `{%raw%}{{ header:ditto-message-feature-id }}{%endraw%}`.

### ImplicitThingCreation Mapper
### ImplicitThingCreation mapper

This mapper implicitly creates a new thing for an incoming message.

The created thing contains the values defined in the template, configured in the `mappingDefinitions` `options`.<br/>
The created thing contains the values defined in the template, configured in the `mappingDefinitions` `options`.

In this case we assume that a gateway device will register the attached edge devices, thus the device will communicate via the gateway.

#### Configuration options

Expand All @@ -269,6 +272,30 @@ The created thing contains the values defined in the template, configured in the
}
```

### ImplicitStandaloneThingCreation mapper

This mapper implicitly creates a new thing for an incoming message.

The created thing contains the values defined in the template, configured in the `mappingDefinitions` `options`.

In this case we assume that a standalone device needs to be registered.

#### Configuration options

* `thing` (required): The values of the thing that is created implicitly. It can either contain fixed values
or header placeholders (e.g. `{%raw%}{{ header:device_id }}{%endraw%}`).

Example of a template defined in `options`:
```json
{
"thing": {
"thingId": "{%raw%}{{ header:device_id }}{%endraw%}",
"attributes": {
"CreatedBy": "ImplicitStandaloneThingCreation"
}
}
}
```

## Example connection with multiple mappers

Expand Down

0 comments on commit d37efa3

Please sign in to comment.