Skip to content

Commit

Permalink
Update overview.md
Browse files Browse the repository at this point in the history
  • Loading branch information
richturner authored Aug 28, 2024
1 parent d94506f commit 4842dd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/user-guide/agents-protocols/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ Regular assets are connected to agents by adding an `Agent Link` configuration i
| `messageMatchPredicate` | Used in combination with the `messageMatchFilters`; the predicate is applied to inbound messages (after the `messageMatchFilters` have been applied) and if the predicate matches then the message is said to match the attribute and the attribute will be updated by passing the original message through the value filter(s) and converter | [ValuePredicate](https://github.com/openremote/openremote/blob/a58951f6780176163bad7f58f79ba2a12eb75eb6/model/src/main/java/org/openremote/model/query/filter/ValuePredicate.java) | N |
| `messageMatchFilters` | Used in combination with the `messageMatchPredicate` to allow filtering the inbound message before the match predicate is evaluated | [ValueFilter[]](https://github.com/openremote/openremote/blob/master/model/src/main/java/org/openremote/model/value/ValueFilter.java) | N |

### Dynamic Value Injection
Dynamic injection of the written or current attribute value is supported in generic protocols by using the dynamic value placeholder `%VALUE[:FORMAT]%`, this can be used in the `writeValue` of the `AgentLink` as well as in other supported places depending on the protocol, for example the HTTP protocol supports using this in the headers, query parameters and/or path. The `:FORMAT` is optional and uses the [java.util.Formatter](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Formatter.html), if not specified then built in value conversion is used to convert the value into a JSON string representation. e.g. `%VALUE:%.2f%`, `%VALUE%`

### Dynamic value injection
When writing to linked attributes it can be desirable to insert the written value into a bigger payload before sending to the agent protocol; the dynamic value placeholder `{$value}` makes this possible and every occurrence within the bigger payload is replaced by the value written to the linked attribute.
### Dynamic Time Injection
Dynamic injection of the current time is supported in generic protocols by using the dynamic time placeholder `%TIME[+/-PnDTnHnMn.nS][:FORMAT]%`, this can be used in the `writeValue` of the `AgentLink` as well as in other supported places depending on the protocol, for example the HTTP protocol supports using this in the headers, query parameters and/or path. The `+/-PnDTnHnMn.nS` and `:FORMAT` are optional where `+/-PnDTnHnMn.nS` uses [java.time.Durtion.parse()]([https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Formatter.html](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/Duration.html#parse(java.lang.CharSequence))) and `:FORMAT` uses [DateTimeFormatter](https://docs.oracle.com/en%2Fjava%2Fjavase%2F22%2Fdocs%2Fapi%2F%2F/java.base/java/time/format/DateTimeFormatter.html) with added support for `EPOCH_MILLIS` and `EPOCH_SECONDS` if `:FORMAT` is not specified then [ISO_INSTANT](https://docs.oracle.com/en%2Fjava%2Fjavase%2F22%2Fdocs%2Fapi%2F%2F/java.base/java/time/format/DateTimeFormatter.html#ISO_INSTANT) is asssumed. e.g. `%TIME%`, `%TIME-PT1H%`, `%TIME+P20D:yyyy-dd-mm%`, `%TIME:EPOCH_MILLIS%`

### Value filter known types

Expand Down

0 comments on commit 4842dd2

Please sign in to comment.