UNPKG

@iotize/device-client.js

Version:

IoTize Device client for Javascript

418 lines (417 loc) 12.6 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 { ReadWriteRights } from '../../all-models'; import { VariableType } from '../../all-models'; import { VariableFormat } from '../../all-models'; export declare class VariableService extends AbstractService { constructor(client: Client, apiConfig: ApiConfig); resources: { [key: string]: ServiceCallType; }; /** * Write variable bundle id * Create a variable * LWM2M path: /1029/{variableId}/65535 * Body converter id: "integer_uint8" * @tapVersion(">=1.0") * @param variableId input * @param extraSize input * @return void api call */ create(variableId: number, extraSize: number): Promise<Response<void>>; /** * Write variable bundle id * Create a variable * LWM2M path: /1029/{variableId}/65535 * Body converter id: "integer_uint8" * @tapVersion(">=1.0") * @param variableId input * @param extraSize input * @return call options */ createCall(variableId: number, extraSize: number): ServiceCallType; /** * Get variable address * * LWM2M path: /1029/{variableId}/0 * @tapVersion(">=1.0") * @param variableId input * @return number api call */ getAddress(variableId: number): Promise<Response<number>>; /** * Get variable address * * LWM2M path: /1029/{variableId}/0 * @tapVersion(">=1.0") * @param variableId input * @return call options */ getAddressCall(variableId: number): ServiceCallType; /** * Get variable bundle id * ID du bundle qui contient la variable * LWM2M path: /1029/{variableId}/6 * @tapVersion(">=1.0") * @param variableId input * @return number api call */ getBundleId(variableId: number): Promise<Response<number>>; /** * Get variable bundle id * ID du bundle qui contient la variable * LWM2M path: /1029/{variableId}/6 * @tapVersion(">=1.0") * @param variableId input * @return call options */ getBundleIdCall(variableId: number): ServiceCallType; /** * Get variable bundle values (formated as a TLV) * * LWM2M path: /1029/{variableId}/7 * @tapVersion(">=1.0") * @param variableId input * @return Uint8Array api call */ getBundleValues(variableId: number): Promise<Response<Uint8Array>>; /** * Get variable bundle values (formated as a TLV) * * LWM2M path: /1029/{variableId}/7 * @tapVersion(">=1.0") * @param variableId input * @return call options */ getBundleValuesCall(variableId: number): ServiceCallType; /** * Get access rights for the variable * Get access rights for the variable (read and write) * LWM2M path: /1029/{variableId}/3 * @tapVersion(">=1.0") * @param variableId input * @return ReadWriteRights api call */ getCurrentAccess(variableId: number): Promise<Response<ReadWriteRights>>; /** * Get access rights for the variable * Get access rights for the variable (read and write) * LWM2M path: /1029/{variableId}/3 * @tapVersion(">=1.0") * @param variableId input * @return call options */ getCurrentAccessCall(variableId: number): ServiceCallType; /** * Get data format for variable * * LWM2M path: /1029/{variableId}/1 * @tapVersion(">=1.0") * @param variableId input * @return VariableFormat api call */ getFormat(variableId: number): Promise<Response<VariableFormat>>; /** * Get data format for variable * * LWM2M path: /1029/{variableId}/1 * @tapVersion(">=1.0") * @param variableId input * @return call options */ getFormatCall(variableId: number): ServiceCallType; /** * Get variable name * * LWM2M path: /1029/{variableId}/8 * @deprecated * @tapVersion(">=1.60") * @param variableId input * @return string api call */ getName(variableId: number): Promise<Response<string>>; /** * Get variable name * * LWM2M path: /1029/{variableId}/8 * @deprecated * @tapVersion(">=1.60") * @param variableId input * @return call options */ getNameCall(variableId: number): ServiceCallType; /** * Get variable array size * Get the number of element of the variable * LWM2M path: /1029/{variableId}/2 * @tapVersion(">=1.0") * @param variableId input * @return number api call */ getNumberOfElements(variableId: number): Promise<Response<number>>; /** * Get variable array size * Get the number of element of the variable * LWM2M path: /1029/{variableId}/2 * @tapVersion(">=1.0") * @param variableId input * @return call options */ getNumberOfElementsCall(variableId: number): ServiceCallType; /** * Get data type for variable * * LWM2M path: /1029/{variableId}/1 * @tapVersion(">=1.0") * @param variableId input * @return VariableType api call */ getType(variableId: number): Promise<Response<VariableType>>; /** * Get data type for variable * * LWM2M path: /1029/{variableId}/1 * @tapVersion(">=1.0") * @param variableId input * @return call options */ getTypeCall(variableId: number): ServiceCallType; /** * Get variable unit * * LWM2M path: /1029/{variableId}/9 * @deprecated * @tapVersion(">=1.60") * @param variableId input * @return string api call */ getUnit(variableId: number): Promise<Response<string>>; /** * Get variable unit * * LWM2M path: /1029/{variableId}/9 * @deprecated * @tapVersion(">=1.60") * @param variableId input * @return call options */ getUnitCall(variableId: number): ServiceCallType; /** * Get variable value * Value of array of values. The size depends of variable format * LWM2M path: /1029/{variableId}/4 * @tapVersion(">=1.0") * @param variableId input * @return Uint8Array api call */ getValue(variableId: number): Promise<Response<Uint8Array>>; /** * Get variable value * Value of array of values. The size depends of variable format * LWM2M path: /1029/{variableId}/4 * @tapVersion(">=1.0") * @param variableId input * @return call options */ getValueCall(variableId: number): ServiceCallType; /** * Write variable address * * LWM2M path: /1029/{variableId}/0 * Body converter id: "integer_uint32" * @tapVersion(">=1.0") * @param variableId input * @param address input * @return void api call */ putAddress(variableId: number, address: number): Promise<Response<void>>; /** * Write variable address * * LWM2M path: /1029/{variableId}/0 * Body converter id: "integer_uint32" * @tapVersion(">=1.0") * @param variableId input * @param address input * @return call options */ putAddressCall(variableId: number, address: number): ServiceCallType; /** * Write variable bundle id * * LWM2M path: /1029/{variableId}/6 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return void api call */ putBundleId(variableId: number, value: number): Promise<Response<void>>; /** * Write variable bundle id * * LWM2M path: /1029/{variableId}/6 * Body converter id: "integer_uint16" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return call options */ putBundleIdCall(variableId: number, value: number): ServiceCallType; /** * Set data format of the variable * * LWM2M path: /1029/{variableId}/1 * Body converter id: "VariableFormat" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return void api call */ putFormat(variableId: number, value: VariableFormat): Promise<Response<void>>; /** * Set data format of the variable * * LWM2M path: /1029/{variableId}/1 * Body converter id: "VariableFormat" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return call options */ putFormatCall(variableId: number, value: VariableFormat): ServiceCallType; /** * Write variable name * * LWM2M path: /1029/{variableId}/8 * Body converter id: "string" * @deprecated * @tapVersion(">=1.60") * @param variableId input * @param address input * @return void api call */ putName(variableId: number, address: string): Promise<Response<void>>; /** * Write variable name * * LWM2M path: /1029/{variableId}/8 * Body converter id: "string" * @deprecated * @tapVersion(">=1.60") * @param variableId input * @param address input * @return call options */ putNameCall(variableId: number, address: string): ServiceCallType; /** * Write variable array size * Set the number of element of the variable * LWM2M path: /1029/{variableId}/2 * Body converter id: "integer_uint8" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return void api call */ putNumberOfElements(variableId: number, value: number): Promise<Response<void>>; /** * Write variable array size * Set the number of element of the variable * LWM2M path: /1029/{variableId}/2 * Body converter id: "integer_uint8" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return call options */ putNumberOfElementsCall(variableId: number, value: number): ServiceCallType; /** * Write variable unit * * LWM2M path: /1029/{variableId}/9 * Body converter id: "string" * @deprecated * @tapVersion(">=1.60") * @param variableId input * @param address input * @return void api call */ putUnit(variableId: number, address: string): Promise<Response<void>>; /** * Write variable unit * * LWM2M path: /1029/{variableId}/9 * Body converter id: "string" * @deprecated * @tapVersion(">=1.60") * @param variableId input * @param address input * @return call options */ putUnitCall(variableId: number, address: string): ServiceCallType; /** * Set variable value * * LWM2M path: /1029/{variableId}/4 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return void api call */ putValue(variableId: number, value: Uint8Array): Promise<Response<void>>; /** * Set variable value * * LWM2M path: /1029/{variableId}/4 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return call options */ putValueCall(variableId: number, value: Uint8Array): ServiceCallType; /** * Get all variable values for the current profile * * LWM2M path: /1029//4 * @tapVersion(">=1.0") * @return Uint8Array api call */ readProfile(): Promise<Response<Uint8Array>>; /** * Get all variable values for the current profile * * LWM2M path: /1029//4 * @tapVersion(">=1.0") * @return call options */ readProfileCall(): ServiceCallType; /** * Set variable value * Difference with put ? * LWM2M path: /1029/{variableId}/5 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return void api call */ setValue(variableId: number, value: Uint8Array): Promise<Response<void>>; /** * Set variable value * Difference with put ? * LWM2M path: /1029/{variableId}/5 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param variableId input * @param value input * @return call options */ setValueCall(variableId: number, value: Uint8Array): ServiceCallType; }