forked from eclipse-hara/hara-ddiclient
/
ConfigDataProvider.kt
36 lines (31 loc) · 918 Bytes
/
ConfigDataProvider.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* Copyright © 2017-2024 Kynetics LLC
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.hara.ddiclient.api
/**
* A provider that configures the device data that is sent
* to the server
*/
interface ConfigDataProvider {
/**
* Device data that is sent to the server
* @return the map that contains the device data
*/
fun configData(): Map<String, String> = emptyMap()
/**
* @returns true if the map returned by [configData]
* is the same that was sent to the server, false otherwise.
*/
fun isUpdated(): Boolean = false
/**
* Callback called after the device data is successfully
* notified to the server
*/
fun onConfigDataUpdate() {}
}