UNPKG

@iotize/device-client.js

Version:

IoTize Device client for Javascript

751 lines (750 loc) 22.3 kB
/** * This file has been generated * DO NOT EDIT, IT MAY BE OVERWRITTEN */ import { Client, Response, ApiConfig } from "../import-adapter"; import { AbstractService, ServiceCallType } from '../abstract-service'; import { MemoryInfo } from '../../all-models'; import { ProtocolConfiguration } from '../../all-models'; import { TargetCoreType } from '../../all-models'; import { ModbusWriteOptions } from '../../all-models'; import { MemoryWriteInfo } from '../../all-models'; import { TargetProtocol } from '../../all-models'; import { UartSettings } from '../../all-models'; import { TapVersion } from '../../all-models'; import { TargetComStats } from '../../all-models'; import { ModbusOptions } from '../../all-models'; export declare class TargetService extends AbstractService { constructor(client: Client, apiConfig: ApiConfig); resources: { [key: string]: ServiceCallType; }; /** * Clear communication stats * * LWM2M path: /1027//11 * @tapVersion(">=1.0") * @return void api call */ clearComStats(): Promise<Response<void>>; /** * Clear communication stats * * LWM2M path: /1027//11 * @tapVersion(">=1.0") * @return call options */ clearComStatsCall(): ServiceCallType; /** * Connect to target * * LWM2M path: /1027//3 * @tapVersion(">=1.0") * @return void api call */ connect(): Promise<Response<void>>; /** * Connect to target * * LWM2M path: /1027//3 * @tapVersion(">=1.0") * @return call options */ connectCall(): ServiceCallType; /** * Disconnect from target * * LWM2M path: /1027//4 * @tapVersion(">=1.0") * @return void api call */ disconnect(): Promise<Response<void>>; /** * Disconnect from target * * LWM2M path: /1027//4 * @tapVersion(">=1.0") * @return call options */ disconnectCall(): ServiceCallType; /** * List available target protocols * * LWM2M path: /1027//20 * @tapVersion(">=1.0") * @return Array<TargetProtocol> api call */ getAvailableProtocols(): Promise<Response<Array<TargetProtocol>>>; /** * List available target protocols * * LWM2M path: /1027//20 * @tapVersion(">=1.0") * @return call options */ getAvailableProtocolsCall(): ServiceCallType; /** * 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 */ getComStats(): Promise<Response<TargetComStats>>; /** * 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 */ getComStatsCall(): ServiceCallType; /** * Get core type * * LWM2M path: /1027//2 * @tapVersion(">=1.0") * @return TargetCoreType api call */ getCoreType(): Promise<Response<TargetCoreType>>; /** * Get core type * * LWM2M path: /1027//2 * @tapVersion(">=1.0") * @return call options */ getCoreTypeCall(): ServiceCallType; /** * Get firmware version * * LWM2M path: /1027//6 * @tapVersion(">=1.0") * @return TapVersion api call */ getFirmwareVersion(): Promise<Response<TapVersion>>; /** * Get firmware version * * LWM2M path: /1027//6 * @tapVersion(">=1.0") * @return call options */ getFirmwareVersionCall(): ServiceCallType; /** * Get max voltage * * LWM2M path: /1027//9 * @tapVersion(">=1.0") * @return number api call */ getMaxVoltage(): Promise<Response<number>>; /** * Get max voltage * * LWM2M path: /1027//9 * @tapVersion(">=1.0") * @return call options */ getMaxVoltageCall(): ServiceCallType; /** * Get min voltage * * LWM2M path: /1027//8 * @tapVersion(">=1.0") * @return number api call */ getMinVoltage(): Promise<Response<number>>; /** * Get min voltage * * LWM2M path: /1027//8 * @tapVersion(">=1.0") * @return call options */ getMinVoltageCall(): ServiceCallType; /** * Get page size * Alignement page (TAR) * LWM2M path: /1027//10 * @tapVersion(">=1.0") * @return number api call */ getPageSize(): Promise<Response<number>>; /** * Get page size * Alignement page (TAR) * LWM2M path: /1027//10 * @tapVersion(">=1.0") * @return call options */ getPageSizeCall(): ServiceCallType; /** * Get target protocol * * LWM2M path: /1027//1 * @tapVersion(">=1.0") * @return TargetProtocol api call */ getProtocol(): Promise<Response<TargetProtocol>>; /** * Get target protocol * * LWM2M path: /1027//1 * @tapVersion(">=1.0") * @return call options */ getProtocolCall(): ServiceCallType; /** * Get protocol configuration options * * LWM2M path: /1027//21 * @tapVersion(">=1.0") * @return ProtocolConfiguration api call */ getProtocolConfiguration(): Promise<Response<ProtocolConfiguration>>; /** * Get protocol configuration options * * LWM2M path: /1027//21 * @tapVersion(">=1.0") * @return call options */ getProtocolConfigurationCall(): ServiceCallType; /** * Get byte length received in buffer (when using serial communication) * * LWM2M path: /1027//43 * @tapVersion(">=1.57") * @return number api call */ getReceivedCount(): Promise<Response<number>>; /** * Get byte length received in buffer (when using serial communication) * * LWM2M path: /1027//43 * @tapVersion(">=1.57") * @return call options */ getReceivedCountCall(): ServiceCallType; /** * 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 */ getRegisterAccess(): Promise<Response<Uint8Array>>; /** * 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 */ getRegisterAccessCall(): ServiceCallType; /** * Get current sub protocol * * LWM2M path: /1027//40 * @tapVersion(">=1.0") * @return TargetProtocol api call */ getSubProtocol(): Promise<Response<TargetProtocol>>; /** * Get current sub protocol * * LWM2M path: /1027//40 * @tapVersion(">=1.0") * @return call options */ getSubProtocolCall(): ServiceCallType; /** * 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 */ getUARTSettings(): Promise<Response<UartSettings>>; /** * 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 */ getUARTSettingsCall(): ServiceCallType; /** * Get vcc * Lit la valeur de la tension de la cible * LWM2M path: /1027//7 * @tapVersion(">=1.0") * @return number api call */ getVcc(): Promise<Response<number>>; /** * Get vcc * Lit la valeur de la tension de la cible * LWM2M path: /1027//7 * @tapVersion(">=1.0") * @return call options */ getVccCall(): ServiceCallType; /** * Check if target is connected * * LWM2M path: /1027//3 * @tapVersion(">=1.63") * @return boolean api call */ isConnected(): Promise<Response<boolean>>; /** * Check if target is connected * * LWM2M path: /1027//3 * @tapVersion(">=1.63") * @return call options */ isConnectedCall(): ServiceCallType; /** * Generic modbus read * * LWM2M path: /1027//38 * Body converter id: "ModbusOptions" * @tapVersion(">=1.0") * @param data input * @return Uint8Array api call */ modbusRead(data: ModbusOptions): Promise<Response<Uint8Array>>; /** * Generic modbus read * * LWM2M path: /1027//38 * Body converter id: "ModbusOptions" * @tapVersion(">=1.0") * @param data input * @return call options */ modbusReadCall(data: ModbusOptions): ServiceCallType; /** * Generic modbus write * * LWM2M path: /1027//37 * Body converter id: "ModbusWriteOptions" * @tapVersion(">=1.0") * @param data input * @return void api call */ modbusWrite(data: ModbusWriteOptions): Promise<Response<void>>; /** * Generic modbus write * * LWM2M path: /1027//37 * Body converter id: "ModbusWriteOptions" * @tapVersion(">=1.0") * @param data input * @return call options */ modbusWriteCall(data: ModbusWriteOptions): ServiceCallType; /** * Write register value * * LWM2M path: /1027//32 * @tapVersion(">=1.0") * @return void api call */ postRegisterAccess(): Promise<Response<void>>; /** * Write register value * * LWM2M path: /1027//32 * @tapVersion(">=1.0") * @return call options */ postRegisterAccessCall(): ServiceCallType; /** * 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 */ postResetKeep(): Promise<Response<void>>; /** * 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 */ postResetKeepCall(): ServiceCallType; /** * Write core type * * LWM2M path: /1027//2 * Body converter id: "TargetCoreType" * @tapVersion(">=1.0") * @param value input * @return void api call */ putCoreType(value: TargetCoreType): Promise<Response<void>>; /** * Write core type * * LWM2M path: /1027//2 * Body converter id: "TargetCoreType" * @tapVersion(">=1.0") * @param value input * @return call options */ putCoreTypeCall(value: TargetCoreType): ServiceCallType; /** * Write firmware version * * LWM2M path: /1027//6 * Body converter id: "TapVersion" * @tapVersion(">=1.0") * @param value input * @return void api call */ putFirmwareVersion(value: TapVersion): Promise<Response<void>>; /** * Write firmware version * * LWM2M path: /1027//6 * Body converter id: "TapVersion" * @tapVersion(">=1.0") * @param value input * @return call options */ putFirmwareVersionCall(value: TapVersion): ServiceCallType; /** * Write max voltage value * * LWM2M path: /1027//9 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param value input * @return void api call */ putMaxVoltage(value: number): Promise<Response<void>>; /** * Write max voltage value * * LWM2M path: /1027//9 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param value input * @return call options */ putMaxVoltageCall(value: number): ServiceCallType; /** * Write min voltage value * * LWM2M path: /1027//8 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param value input * @return void api call */ putMinVoltage(value: number): Promise<Response<void>>; /** * Write min voltage value * * LWM2M path: /1027//8 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param value input * @return call options */ putMinVoltageCall(value: number): ServiceCallType; /** * Write page size * * LWM2M path: /1027//10 * Body converter id: "integer_uint32" * @tapVersion(">=1.0") * @param value input * @return void api call */ putPageSize(value: number): Promise<Response<void>>; /** * Write page size * * LWM2M path: /1027//10 * Body converter id: "integer_uint32" * @tapVersion(">=1.0") * @param value input * @return call options */ putPageSizeCall(value: number): ServiceCallType; /** * Configure target protocol * * LWM2M path: /1027//1 * Body converter id: "TargetProtocol" * @tapVersion(">=1.0") * @param targetProtocol input * @return void api call */ putProtocol(targetProtocol: TargetProtocol): Promise<Response<void>>; /** * Configure target protocol * * LWM2M path: /1027//1 * Body converter id: "TargetProtocol" * @tapVersion(">=1.0") * @param targetProtocol input * @return call options */ putProtocolCall(targetProtocol: TargetProtocol): ServiceCallType; /** * Update protocol configuration * * LWM2M path: /1027//21 * Body converter id: "ProtocolConfiguration" * @tapVersion(">=1.0") * @param value input * @return void api call */ putProtocolConfiguration(value: ProtocolConfiguration): Promise<Response<void>>; /** * Update protocol configuration * * LWM2M path: /1027//21 * Body converter id: "ProtocolConfiguration" * @tapVersion(">=1.0") * @param value input * @return call options */ putProtocolConfigurationCall(value: ProtocolConfiguration): ServiceCallType; /** * 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 */ readAddress(value: MemoryInfo): Promise<Response<Uint8Array>>; /** * 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 */ readAddressCall(value: MemoryInfo): ServiceCallType; /** * 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 */ readBytes(): Promise<Response<Uint8Array>>; /** * 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 */ readBytesCall(): ServiceCallType; /** * 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 */ readDebug(address: number): Promise<Response<Uint8Array>>; /** * 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 */ readDebugCall(address: number): ServiceCallType; /** * 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 */ reset(): Promise<Response<void>>; /** * 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 */ resetCall(): ServiceCallType; /** * 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 */ send(data: Uint8Array): Promise<Response<Uint8Array>>; /** * 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 */ sendCall(data: Uint8Array): ServiceCallType; /** * 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 */ sendReceive(data: Uint8Array): Promise<Response<Uint8Array>>; /** * 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 */ sendReceiveCall(data: Uint8Array): ServiceCallType; /** * Write target protocol * * LWM2M path: /1027//1 * Body converter id: "TargetProtocol" * @tapVersion(">=1.0") * @param targetProtocol input * @return void api call */ setProtocol(targetProtocol: TargetProtocol): Promise<Response<void>>; /** * Write target protocol * * LWM2M path: /1027//1 * Body converter id: "TargetProtocol" * @tapVersion(">=1.0") * @param targetProtocol input * @return call options */ setProtocolCall(targetProtocol: TargetProtocol): ServiceCallType; /** * 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 */ setProtocolConfiguration(value: ProtocolConfiguration): Promise<Response<void>>; /** * 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 */ setProtocolConfigurationCall(value: ProtocolConfiguration): ServiceCallType; /** * 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 */ setUARTSettings(value: UartSettings): Promise<Response<void>>; /** * 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 */ setUARTSettingsCall(value: UartSettings): ServiceCallType; /** * Write into memory on target * * LWM2M path: /1027//33 * Body converter id: "MemoryWriteInfo" * @tapVersion(">=1.0") * @param value input * @return void api call */ writeAddress(value: MemoryWriteInfo): Promise<Response<void>>; /** * Write into memory on target * * LWM2M path: /1027//33 * Body converter id: "MemoryWriteInfo" * @tapVersion(">=1.0") * @param value input * @return call options */ writeAddressCall(value: MemoryWriteInfo): ServiceCallType; /** * Write address * * LWM2M path: /1027//31 * @tapVersion(">=1.0") * @return void api call */ writeDebug(): Promise<Response<void>>; /** * Write address * * LWM2M path: /1027//31 * @tapVersion(">=1.0") * @return call options */ writeDebugCall(): ServiceCallType; /** * 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 */ writeUARTSettings(value: UartSettings): Promise<Response<void>>; /** * 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 */ writeUARTSettingsCall(value: UartSettings): ServiceCallType; }