UNPKG

@iotize/device-client.js

Version:

IoTize Device client for Javascript

1,242 lines (1,241 loc) 40 kB
"use strict"; /** * This file has been generated * DO NOT EDIT, IT MAY BE OVERWRITTEN */ var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var abstract_service_1 = require("../abstract-service"); var TargetService = /** @class */ (function (_super) { __extends(TargetService, _super); function TargetService(client, apiConfig) { var _this = _super.call(this, client, apiConfig) || this; _this.resources = { 'clearComStats': { path: "/target/com-stats", methodType: "POST" }, 'connect': { path: "/target/connect", methodType: "POST" }, 'disconnect': { path: "/target/disconnect", methodType: "POST" }, 'getAvailableProtocols': { path: "/target/available-protocols", methodType: "GET", returnTypeConverter: "Array<TargetProtocol>" }, 'getComStats': { path: "/target/com-stats", methodType: "GET", returnTypeConverter: "TargetComStats" }, 'getCoreType': { path: "/target/core-type", methodType: "GET", returnTypeConverter: "TargetCoreType" }, 'getFirmwareVersion': { path: "/target/firmware-version", methodType: "GET", returnTypeConverter: "TapVersion" }, 'getMaxVoltage': { path: "/target/max-voltage", methodType: "GET", returnTypeConverter: "integer_uint16" }, 'getMinVoltage': { path: "/target/min-voltage", methodType: "GET", returnTypeConverter: "integer_uint16" }, 'getPageSize': { path: "/target/page-size", methodType: "GET", returnTypeConverter: "integer_uint32" }, 'getProtocol': { path: "/target/protocol", methodType: "GET", returnTypeConverter: "TargetProtocol" }, 'getProtocolConfiguration': { path: "/target/protocol-configuration", methodType: "GET", returnTypeConverter: "ProtocolConfiguration" }, 'getReceivedCount': { path: "/target/received-count", methodType: "GET", returnTypeConverter: "integer_uint16" }, 'getRegisterAccess': { path: "/target/register-access", methodType: "GET", returnTypeConverter: "Bytes" }, 'getSubProtocol': { path: "/target/sub-protocol", methodType: "GET", returnTypeConverter: "TargetProtocol" }, 'getUARTSettings': { path: "/target/uart/settings", methodType: "GET", returnTypeConverter: "UartSettings" }, 'getVcc': { path: "/target/vcc", methodType: "GET", returnTypeConverter: "integer_uint16" }, 'isConnected': { path: "/target/connect", methodType: "GET", returnTypeConverter: "boolean" }, 'modbusRead': { path: "/target/modbus/read", methodType: "GET", returnTypeConverter: "Bytes", bodyEncoder: "ModbusOptions" }, 'modbusWrite': { path: "/target/modbus/write", methodType: "POST", bodyEncoder: "ModbusWriteOptions" }, 'postRegisterAccess': { path: "/target/register-access", methodType: "POST" }, 'postResetKeep': { path: "/target/reset-keep", methodType: "POST" }, 'putCoreType': { path: "/target/core-type", methodType: "PUT", bodyEncoder: "TargetCoreType" }, 'putFirmwareVersion': { path: "/target/firmware-version", methodType: "PUT", bodyEncoder: "TapVersion" }, 'putMaxVoltage': { path: "/target/max-voltage", methodType: "PUT", bodyEncoder: "integer_uint16" }, 'putMinVoltage': { path: "/target/min-voltage", methodType: "PUT", bodyEncoder: "integer_uint16" }, 'putPageSize': { path: "/target/page-size", methodType: "PUT", bodyEncoder: "integer_uint32" }, 'putProtocol': { path: "/target/protocol", methodType: "PUT", bodyEncoder: "TargetProtocol" }, 'putProtocolConfiguration': { path: "/target/protocol-configuration", methodType: "PUT", bodyEncoder: "ProtocolConfiguration" }, 'readAddress': { path: "/target/read-address", methodType: "GET", returnTypeConverter: "Bytes", bodyEncoder: "MemoryInfo" }, 'readBytes': { path: "/target/transparent/read-bytes", methodType: "GET", returnTypeConverter: "Bytes" }, 'readDebug': { path: "/target/debug-access", methodType: "GET", returnTypeConverter: "Bytes", bodyEncoder: "integer_uint32" }, 'reset': { path: "/target/reset", methodType: "POST" }, 'send': { path: "/target/transparent/send", methodType: "POST", returnTypeConverter: "Bytes", bodyEncoder: "Bytes" }, 'sendReceive': { path: "/target/transparent/send-receive", methodType: "GET", returnTypeConverter: "Bytes", bodyEncoder: "Bytes" }, 'setProtocol': { path: "/target/protocol", methodType: "POST", bodyEncoder: "TargetProtocol" }, 'setProtocolConfiguration': { path: "/target/protocol-configuration", methodType: "POST", bodyEncoder: "ProtocolConfiguration" }, 'setUARTSettings': { path: "/target/uart/settings", methodType: "POST", bodyEncoder: "UartSettings" }, 'writeAddress': { path: "/target/read-address", methodType: "POST", bodyEncoder: "MemoryWriteInfo" }, 'writeDebug': { path: "/target/debug-access", methodType: "POST" }, 'writeUARTSettings': { path: "/target/uart/settings", methodType: "PUT", bodyEncoder: "UartSettings" }, }; return _this; } /** * Clear communication stats * * LWM2M path: /1027//11 * @tapVersion(">=1.0") * @return void api call */ TargetService.prototype.clearComStats = function () { var callOptions = this.clearComStatsCall(); return this._call(callOptions); }; /** * Clear communication stats * * LWM2M path: /1027//11 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.clearComStatsCall = function () { var callOptions = this.resources.clearComStats; return callOptions; }; /** * Connect to target * * LWM2M path: /1027//3 * @tapVersion(">=1.0") * @return void api call */ TargetService.prototype.connect = function () { var callOptions = this.connectCall(); return this._call(callOptions); }; /** * Connect to target * * LWM2M path: /1027//3 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.connectCall = function () { var callOptions = this.resources.connect; return callOptions; }; /** * Disconnect from target * * LWM2M path: /1027//4 * @tapVersion(">=1.0") * @return void api call */ TargetService.prototype.disconnect = function () { var callOptions = this.disconnectCall(); return this._call(callOptions); }; /** * Disconnect from target * * LWM2M path: /1027//4 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.disconnectCall = function () { var callOptions = this.resources.disconnect; return callOptions; }; /** * List available target protocols * * LWM2M path: /1027//20 * @tapVersion(">=1.0") * @return Array<TargetProtocol> api call */ TargetService.prototype.getAvailableProtocols = function () { var callOptions = this.getAvailableProtocolsCall(); return this._call(callOptions); }; /** * List available target protocols * * LWM2M path: /1027//20 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getAvailableProtocolsCall = function () { var callOptions = this.resources.getAvailableProtocols; return callOptions; }; /** * Get communication stats * Get Nb of failed communications and number of successful communications with Target * LWM2M path: /1027//11 * @tapVersion(">=1.0") * @return TargetComStats api call */ TargetService.prototype.getComStats = function () { var callOptions = this.getComStatsCall(); return this._call(callOptions); }; /** * Get communication stats * Get Nb of failed communications and number of successful communications with Target * LWM2M path: /1027//11 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getComStatsCall = function () { var callOptions = this.resources.getComStats; return callOptions; }; /** * Get core type * * LWM2M path: /1027//2 * @tapVersion(">=1.0") * @return TargetCoreType api call */ TargetService.prototype.getCoreType = function () { var callOptions = this.getCoreTypeCall(); return this._call(callOptions); }; /** * Get core type * * LWM2M path: /1027//2 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getCoreTypeCall = function () { var callOptions = this.resources.getCoreType; return callOptions; }; /** * Get firmware version * * LWM2M path: /1027//6 * @tapVersion(">=1.0") * @return TapVersion api call */ TargetService.prototype.getFirmwareVersion = function () { var callOptions = this.getFirmwareVersionCall(); return this._call(callOptions); }; /** * Get firmware version * * LWM2M path: /1027//6 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getFirmwareVersionCall = function () { var callOptions = this.resources.getFirmwareVersion; return callOptions; }; /** * Get max voltage * * LWM2M path: /1027//9 * @tapVersion(">=1.0") * @return number api call */ TargetService.prototype.getMaxVoltage = function () { var callOptions = this.getMaxVoltageCall(); return this._call(callOptions); }; /** * Get max voltage * * LWM2M path: /1027//9 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getMaxVoltageCall = function () { var callOptions = this.resources.getMaxVoltage; return callOptions; }; /** * Get min voltage * * LWM2M path: /1027//8 * @tapVersion(">=1.0") * @return number api call */ TargetService.prototype.getMinVoltage = function () { var callOptions = this.getMinVoltageCall(); return this._call(callOptions); }; /** * Get min voltage * * LWM2M path: /1027//8 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getMinVoltageCall = function () { var callOptions = this.resources.getMinVoltage; return callOptions; }; /** * Get page size * Alignement page (TAR) * LWM2M path: /1027//10 * @tapVersion(">=1.0") * @return number api call */ TargetService.prototype.getPageSize = function () { var callOptions = this.getPageSizeCall(); return this._call(callOptions); }; /** * Get page size * Alignement page (TAR) * LWM2M path: /1027//10 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getPageSizeCall = function () { var callOptions = this.resources.getPageSize; return callOptions; }; /** * Get target protocol * * LWM2M path: /1027//1 * @tapVersion(">=1.0") * @return TargetProtocol api call */ TargetService.prototype.getProtocol = function () { var callOptions = this.getProtocolCall(); return this._call(callOptions); }; /** * Get target protocol * * LWM2M path: /1027//1 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getProtocolCall = function () { var callOptions = this.resources.getProtocol; return callOptions; }; /** * Get protocol configuration options * * LWM2M path: /1027//21 * @tapVersion(">=1.0") * @return ProtocolConfiguration api call */ TargetService.prototype.getProtocolConfiguration = function () { var callOptions = this.getProtocolConfigurationCall(); return this._call(callOptions); }; /** * Get protocol configuration options * * LWM2M path: /1027//21 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getProtocolConfigurationCall = function () { var callOptions = this.resources.getProtocolConfiguration; return callOptions; }; /** * Get byte length received in buffer (when using serial communication) * * LWM2M path: /1027//43 * @tapVersion(">=1.57") * @return number api call */ TargetService.prototype.getReceivedCount = function () { var callOptions = this.getReceivedCountCall(); return this._call(callOptions); }; /** * Get byte length received in buffer (when using serial communication) * * LWM2M path: /1027//43 * @tapVersion(">=1.57") * @return call options */ TargetService.prototype.getReceivedCountCall = function () { var callOptions = this.resources.getReceivedCount; return callOptions; }; /** * Register access * Access registres (Cortex&#x3D;&gt;R0...R15) de la cible. Accès conditionné par les ACLs du Bundle Debug (-2) * LWM2M path: /1027//32 * @tapVersion(">=1.0") * @return Uint8Array api call */ TargetService.prototype.getRegisterAccess = function () { var callOptions = this.getRegisterAccessCall(); return this._call(callOptions); }; /** * Register access * Access registres (Cortex&#x3D;&gt;R0...R15) de la cible. Accès conditionné par les ACLs du Bundle Debug (-2) * LWM2M path: /1027//32 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getRegisterAccessCall = function () { var callOptions = this.resources.getRegisterAccess; return callOptions; }; /** * Get current sub protocol * * LWM2M path: /1027//40 * @tapVersion(">=1.0") * @return TargetProtocol api call */ TargetService.prototype.getSubProtocol = function () { var callOptions = this.getSubProtocolCall(); return this._call(callOptions); }; /** * Get current sub protocol * * LWM2M path: /1027//40 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getSubProtocolCall = function () { var callOptions = this.resources.getSubProtocol; return callOptions; }; /** * Get protocol configuration options * This resource returns a variable data length determined by the configuration * LWM2M path: /1027//21 * @tapVersion(">=1.0") * @return UartSettings api call */ TargetService.prototype.getUARTSettings = function () { var callOptions = this.getUARTSettingsCall(); return this._call(callOptions); }; /** * Get protocol configuration options * This resource returns a variable data length determined by the configuration * LWM2M path: /1027//21 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getUARTSettingsCall = function () { var callOptions = this.resources.getUARTSettings; return callOptions; }; /** * Get vcc * Lit la valeur de la tension de la cible * LWM2M path: /1027//7 * @tapVersion(">=1.0") * @return number api call */ TargetService.prototype.getVcc = function () { var callOptions = this.getVccCall(); return this._call(callOptions); }; /** * Get vcc * Lit la valeur de la tension de la cible * LWM2M path: /1027//7 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.getVccCall = function () { var callOptions = this.resources.getVcc; return callOptions; }; /** * Check if target is connected * * LWM2M path: /1027//3 * @tapVersion(">=1.63") * @return boolean api call */ TargetService.prototype.isConnected = function () { var callOptions = this.isConnectedCall(); return this._call(callOptions); }; /** * Check if target is connected * * LWM2M path: /1027//3 * @tapVersion(">=1.63") * @return call options */ TargetService.prototype.isConnectedCall = function () { var callOptions = this.resources.isConnected; return callOptions; }; /** * Generic modbus read * * LWM2M path: /1027//38 * Body converter id: "ModbusOptions" * @tapVersion(">=1.0") * @param data input * @return Uint8Array api call */ TargetService.prototype.modbusRead = function (data) { var callOptions = this.modbusReadCall(data); return this._call(callOptions); }; /** * Generic modbus read * * LWM2M path: /1027//38 * Body converter id: "ModbusOptions" * @tapVersion(">=1.0") * @param data input * @return call options */ TargetService.prototype.modbusReadCall = function (data) { var callOptions = this.resources.modbusRead; callOptions.body = data; callOptions.pathParameters = {}; return callOptions; }; /** * Generic modbus write * * LWM2M path: /1027//37 * Body converter id: "ModbusWriteOptions" * @tapVersion(">=1.0") * @param data input * @return void api call */ TargetService.prototype.modbusWrite = function (data) { var callOptions = this.modbusWriteCall(data); return this._call(callOptions); }; /** * Generic modbus write * * LWM2M path: /1027//37 * Body converter id: "ModbusWriteOptions" * @tapVersion(">=1.0") * @param data input * @return call options */ TargetService.prototype.modbusWriteCall = function (data) { var callOptions = this.resources.modbusWrite; callOptions.body = data; callOptions.pathParameters = {}; return callOptions; }; /** * Write register value * * LWM2M path: /1027//32 * @tapVersion(">=1.0") * @return void api call */ TargetService.prototype.postRegisterAccess = function () { var callOptions = this.postRegisterAccessCall(); return this._call(callOptions); }; /** * Write register value * * LWM2M path: /1027//32 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.postRegisterAccessCall = function () { var callOptions = this.resources.postRegisterAccess; return callOptions; }; /** * Reset target * Reset de la cible (RST&#x3D;0) et maintient en Reset. Le relachement se fait par Reset (plus haut). Accès conditionné par les ACLs du Bundle réservé Debug (-2) si il existe, sinon Admin seulement * LWM2M path: /1027//30 * @tapVersion(">=1.0") * @return void api call */ TargetService.prototype.postResetKeep = function () { var callOptions = this.postResetKeepCall(); return this._call(callOptions); }; /** * Reset target * Reset de la cible (RST&#x3D;0) et maintient en Reset. Le relachement se fait par Reset (plus haut). Accès conditionné par les ACLs du Bundle réservé Debug (-2) si il existe, sinon Admin seulement * LWM2M path: /1027//30 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.postResetKeepCall = function () { var callOptions = this.resources.postResetKeep; return callOptions; }; /** * Write core type * * LWM2M path: /1027//2 * Body converter id: "TargetCoreType" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.putCoreType = function (value) { var callOptions = this.putCoreTypeCall(value); return this._call(callOptions); }; /** * Write core type * * LWM2M path: /1027//2 * Body converter id: "TargetCoreType" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.putCoreTypeCall = function (value) { var callOptions = this.resources.putCoreType; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Write firmware version * * LWM2M path: /1027//6 * Body converter id: "TapVersion" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.putFirmwareVersion = function (value) { var callOptions = this.putFirmwareVersionCall(value); return this._call(callOptions); }; /** * Write firmware version * * LWM2M path: /1027//6 * Body converter id: "TapVersion" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.putFirmwareVersionCall = function (value) { var callOptions = this.resources.putFirmwareVersion; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Write max voltage value * * LWM2M path: /1027//9 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.putMaxVoltage = function (value) { var callOptions = this.putMaxVoltageCall(value); return this._call(callOptions); }; /** * Write max voltage value * * LWM2M path: /1027//9 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.putMaxVoltageCall = function (value) { var callOptions = this.resources.putMaxVoltage; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Write min voltage value * * LWM2M path: /1027//8 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.putMinVoltage = function (value) { var callOptions = this.putMinVoltageCall(value); return this._call(callOptions); }; /** * Write min voltage value * * LWM2M path: /1027//8 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.putMinVoltageCall = function (value) { var callOptions = this.resources.putMinVoltage; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Write page size * * LWM2M path: /1027//10 * Body converter id: "integer_uint32" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.putPageSize = function (value) { var callOptions = this.putPageSizeCall(value); return this._call(callOptions); }; /** * Write page size * * LWM2M path: /1027//10 * Body converter id: "integer_uint32" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.putPageSizeCall = function (value) { var callOptions = this.resources.putPageSize; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Configure target protocol * * LWM2M path: /1027//1 * Body converter id: "TargetProtocol" * @tapVersion(">=1.0") * @param targetProtocol input * @return void api call */ TargetService.prototype.putProtocol = function (targetProtocol) { var callOptions = this.putProtocolCall(targetProtocol); return this._call(callOptions); }; /** * Configure target protocol * * LWM2M path: /1027//1 * Body converter id: "TargetProtocol" * @tapVersion(">=1.0") * @param targetProtocol input * @return call options */ TargetService.prototype.putProtocolCall = function (targetProtocol) { var callOptions = this.resources.putProtocol; callOptions.body = targetProtocol; callOptions.pathParameters = {}; return callOptions; }; /** * Update protocol configuration * * LWM2M path: /1027//21 * Body converter id: "ProtocolConfiguration" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.putProtocolConfiguration = function (value) { var callOptions = this.putProtocolConfigurationCall(value); return this._call(callOptions); }; /** * Update protocol configuration * * LWM2M path: /1027//21 * Body converter id: "ProtocolConfiguration" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.putProtocolConfigurationCall = function (value) { var callOptions = this.resources.putProtocolConfiguration; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Read memory at given address on the target application * * LWM2M path: /1027//33 * Body converter id: "MemoryInfo" * @tapVersion(">=1.0") * @param value input * @return Uint8Array api call */ TargetService.prototype.readAddress = function (value) { var callOptions = this.readAddressCall(value); return this._call(callOptions); }; /** * Read memory at given address on the target application * * LWM2M path: /1027//33 * Body converter id: "MemoryInfo" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.readAddressCall = function (value) { var callOptions = this.resources.readAddress; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Read data transparent mode with limit * Lecture de données de la target en mode transparent ou semi-transparent si il y en a, sans attente. * LWM2M path: /1027//35 * @tapVersion(">=1.0") * @return Uint8Array api call */ TargetService.prototype.readBytes = function () { var callOptions = this.readBytesCall(); return this._call(callOptions); }; /** * Read data transparent mode with limit * Lecture de données de la target en mode transparent ou semi-transparent si il y en a, sans attente. * LWM2M path: /1027//35 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.readBytesCall = function () { var callOptions = this.resources.readBytes; return callOptions; }; /** * Debug access * Access registres de contrôle (SWD&#x3D;&gt;APDP) de la cible. Accès conditionné par les ACLs du Bundle Debug (-2) * LWM2M path: /1027//31 * Body converter id: "integer_uint32" * @tapVersion(">=1.0") * @param address input * @return Uint8Array api call */ TargetService.prototype.readDebug = function (address) { var callOptions = this.readDebugCall(address); return this._call(callOptions); }; /** * Debug access * Access registres de contrôle (SWD&#x3D;&gt;APDP) de la cible. Accès conditionné par les ACLs du Bundle Debug (-2) * LWM2M path: /1027//31 * Body converter id: "integer_uint32" * @tapVersion(">=1.0") * @param address input * @return call options */ TargetService.prototype.readDebugCall = function (address) { var callOptions = this.resources.readDebug; callOptions.body = address; callOptions.pathParameters = {}; return callOptions; }; /** * Reset target * Reset de la cible. (Reset &#x3D;0, wait, Reset &#x3D; 1) utilisé pour relacher le reset après utilisation de ResetKeep. Accès conditionné par les ACLs du Bundle Debug (-2) * LWM2M path: /1027//5 * @tapVersion(">=1.0") * @return void api call */ TargetService.prototype.reset = function () { var callOptions = this.resetCall(); return this._call(callOptions); }; /** * Reset target * Reset de la cible. (Reset &#x3D;0, wait, Reset &#x3D; 1) utilisé pour relacher le reset après utilisation de ResetKeep. Accès conditionné par les ACLs du Bundle Debug (-2) * LWM2M path: /1027//5 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.resetCall = function () { var callOptions = this.resources.reset; return callOptions; }; /** * Transparent send * Send data to the target application * LWM2M path: /1027//34 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param data input * @return Uint8Array api call */ TargetService.prototype.send = function (data) { var callOptions = this.sendCall(data); return this._call(callOptions); }; /** * Transparent send * Send data to the target application * LWM2M path: /1027//34 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param data input * @return call options */ TargetService.prototype.sendCall = function (data) { var callOptions = this.resources.send; callOptions.body = data; callOptions.pathParameters = {}; return callOptions; }; /** * Transparent send and receive * Send data to the target application and expect response length * LWM2M path: /1027//34 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param data input * @return Uint8Array api call */ TargetService.prototype.sendReceive = function (data) { var callOptions = this.sendReceiveCall(data); return this._call(callOptions); }; /** * Transparent send and receive * Send data to the target application and expect response length * LWM2M path: /1027//34 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param data input * @return call options */ TargetService.prototype.sendReceiveCall = function (data) { var callOptions = this.resources.sendReceive; callOptions.body = data; callOptions.pathParameters = {}; return callOptions; }; /** * Write target protocol * * LWM2M path: /1027//1 * Body converter id: "TargetProtocol" * @tapVersion(">=1.0") * @param targetProtocol input * @return void api call */ TargetService.prototype.setProtocol = function (targetProtocol) { var callOptions = this.setProtocolCall(targetProtocol); return this._call(callOptions); }; /** * Write target protocol * * LWM2M path: /1027//1 * Body converter id: "TargetProtocol" * @tapVersion(">=1.0") * @param targetProtocol input * @return call options */ TargetService.prototype.setProtocolCall = function (targetProtocol) { var callOptions = this.resources.setProtocol; callOptions.body = targetProtocol; callOptions.pathParameters = {}; return callOptions; }; /** * Temporary update configuration * Configuration will be lost after a tap reboot/reset * LWM2M path: /1027//21 * Body converter id: "ProtocolConfiguration" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.setProtocolConfiguration = function (value) { var callOptions = this.setProtocolConfigurationCall(value); return this._call(callOptions); }; /** * Temporary update configuration * Configuration will be lost after a tap reboot/reset * LWM2M path: /1027//21 * Body converter id: "ProtocolConfiguration" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.setProtocolConfigurationCall = function (value) { var callOptions = this.resources.setProtocolConfiguration; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Temporary update configuration * Execute permet de changer la valeur (mais pas la taille) courante de manière temporaire. Elle sera réinitialisée au reset d&#39;après la valeur configurée. * LWM2M path: /1027//21 * Body converter id: "UartSettings" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.setUARTSettings = function (value) { var callOptions = this.setUARTSettingsCall(value); return this._call(callOptions); }; /** * Temporary update configuration * Execute permet de changer la valeur (mais pas la taille) courante de manière temporaire. Elle sera réinitialisée au reset d&#39;après la valeur configurée. * LWM2M path: /1027//21 * Body converter id: "UartSettings" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.setUARTSettingsCall = function (value) { var callOptions = this.resources.setUARTSettings; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Write into memory on target * * LWM2M path: /1027//33 * Body converter id: "MemoryWriteInfo" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.writeAddress = function (value) { var callOptions = this.writeAddressCall(value); return this._call(callOptions); }; /** * Write into memory on target * * LWM2M path: /1027//33 * Body converter id: "MemoryWriteInfo" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.writeAddressCall = function (value) { var callOptions = this.resources.writeAddress; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; /** * Write address * * LWM2M path: /1027//31 * @tapVersion(">=1.0") * @return void api call */ TargetService.prototype.writeDebug = function () { var callOptions = this.writeDebugCall(); return this._call(callOptions); }; /** * Write address * * LWM2M path: /1027//31 * @tapVersion(">=1.0") * @return call options */ TargetService.prototype.writeDebugCall = function () { var callOptions = this.resources.writeDebug; return callOptions; }; /** * Update configuration * Put permet de changer la valeur (mais pas la taille) courante de manière permanente * LWM2M path: /1027//21 * Body converter id: "UartSettings" * @tapVersion(">=1.0") * @param value input * @return void api call */ TargetService.prototype.writeUARTSettings = function (value) { var callOptions = this.writeUARTSettingsCall(value); return this._call(callOptions); }; /** * Update configuration * Put permet de changer la valeur (mais pas la taille) courante de manière permanente * LWM2M path: /1027//21 * Body converter id: "UartSettings" * @tapVersion(">=1.0") * @param value input * @return call options */ TargetService.prototype.writeUARTSettingsCall = function (value) { var callOptions = this.resources.writeUARTSettings; callOptions.body = value; callOptions.pathParameters = {}; return callOptions; }; return TargetService; }(abstract_service_1.AbstractService)); exports.TargetService = TargetService;