UNPKG

@iotize/tap

Version:

IoTize Device client for Javascript

31 lines (26 loc) 1.3 kB
import { READ_CONFIGURATOR_CONFIG, WRITE_CONFIGURATOR_CONFIG } from '@iotize/tap/configurator'; import { DBIOT_VARIABLE_CONFIG_CONVERTER } from '@iotize/tap/extra/dbiot'; const READ_CONFIGURATOR_CONFIG_EXT = READ_CONFIGURATOR_CONFIG; const WRITE_CONFIGURATOR_CONFIG_EXT = WRITE_CONFIGURATOR_CONFIG; function loadDBIOTTapConfiguratorExtension() { if (!WRITE_CONFIGURATOR_CONFIG_EXT['data.variables[].dbiot']) { WRITE_CONFIGURATOR_CONFIG_EXT['data.variables[].dbiot'] = (context) => { const dbiotValue = context.value; const encodedValue = DBIOT_VARIABLE_CONFIG_CONVERTER.encode(dbiotValue); return context.service.variable.putRawMetaCall(context.param, encodedValue); }; } if (!READ_CONFIGURATOR_CONFIG_EXT['data.variables[].dbiot']) { READ_CONFIGURATOR_CONFIG_EXT['data.variables[].dbiot'] = (context) => { const rawData = context.service.variable.getRawMetaCall(context.param); rawData.responseBodyDecoder = DBIOT_VARIABLE_CONFIG_CONVERTER; return rawData; }; } } loadDBIOTTapConfiguratorExtension(); /** * Generated bundle index. Do not edit. */ export { loadDBIOTTapConfiguratorExtension }; //# sourceMappingURL=iotize-tap-configurator-ext-dbiot.js.map