private void flushTestpointValues(String testpointId) {
        // If we don't have any values yet, no need to flush
        if(!testpointFieldValues.containsKey(testpointId)) {
            return;
        }
        // If we don't have a name for the testpoint, we shouldn't flush
        if(!testpointNames.containsKey(testpointId)) {
            missingNames.add(testpointId);
            return;
        }

        String testpointName = testpointNames.get(testpointId);

        Point.Builder builder = Point.measurement("Messstelle")
            .time(System.currentTimeMillis(), TimeUnit.MILLISECONDS)
            .tag("MESSSTELLE", testpointName);

        Map<Short, Object> values = testpointFieldValues.get(testpointId);
        for (Map.Entry<Short, Object> fieldValues : values.entrySet()) {
            if(fieldValues.getValue() instanceof Number) {
                builder.addField(getTestpointName(testpointId, fieldValues.getKey()), (Number) fieldValues.getValue());
            } else if(fieldValues.getValue() instanceof Boolean) {
                builder.addField(getTestpointName(testpointId, fieldValues.getKey()), (Boolean) fieldValues.getValue());
            } else {
                System.out.println("unknown type");
            }
        }

        Point point = builder.build();

        // Write the data to the db.
        connection.write(point);
    }
Writes all current values for a fiven testpoint to the database.

@param testpointId id of the testpoint.
plc4j/protocols/delta-v/src/test/java/org/apache/plc4x/java/deltav/PoCInflux.java