@iotize/tap
Version:
IoTize Device client for Javascript
998 lines (997 loc) • 25 kB
TypeScript
/**
* Generated file. Do not edit
*/
import { TapResponse } from '@iotize/tap';
import { TargetProtocol } from '@iotize/tap';
import { TargetCoreType } from './models';
import { TargetComStats } from './models';
import { TargetSerialModbusProtocolConfiguration } from './models';
import { TargetS3PProtocolConfiguration } from './models';
import { TargetModbusTcpProtocolConfiguration } from './models';
import { TargetCanProtocolConfiguration } from './models';
import { ModbusWriteOptions } from './models';
import { ModbusOptions } from './models';
import { MemoryInfo } from './models';
import { MemoryWriteInfo } from './models';
import { AbstractService, ServiceCallType } from '@iotize/tap';
export declare class TargetService extends AbstractService {
resources: {
getProtocol: ServiceCallType<void, TargetProtocol>;
setProtocol: ServiceCallType<TargetProtocol, void>;
putProtocol: ServiceCallType<TargetProtocol, void>;
getCoreType: ServiceCallType<void, TargetCoreType>;
putCoreType: ServiceCallType<TargetCoreType, void>;
isConnected: ServiceCallType<void, boolean>;
connect: ServiceCallType<void, void>;
disconnect: ServiceCallType<void, void>;
reset: ServiceCallType<void, void>;
getFirmwareVersion: ServiceCallType<void, string>;
putFirmwareVersion: ServiceCallType<string, void>;
getVcc: ServiceCallType<void, number>;
getMinVoltage: ServiceCallType<void, number>;
putMinVoltage: ServiceCallType<number, void>;
getMaxVoltage: ServiceCallType<void, number>;
putMaxVoltage: ServiceCallType<number, void>;
getPageSize: ServiceCallType<void, number>;
putPageSize: ServiceCallType<number, void>;
getComStats: ServiceCallType<void, TargetComStats>;
clearComStats: ServiceCallType<void, void>;
getAvailableProtocols: ServiceCallType<void, TargetProtocol[]>;
getSerialModbusConfiguration: ServiceCallType<void, TargetSerialModbusProtocolConfiguration>;
setSerialModbusConfiguration: ServiceCallType<TargetSerialModbusProtocolConfiguration, void>;
putSerialModbusConfiguration: ServiceCallType<TargetSerialModbusProtocolConfiguration, void>;
getModbusDefaultSlaveAddress: ServiceCallType<void, number>;
putModbusDefaultSlaveAddress: ServiceCallType<number, void>;
getS3PConfiguration: ServiceCallType<void, TargetS3PProtocolConfiguration>;
setS3PConfiguration: ServiceCallType<TargetS3PProtocolConfiguration, void>;
putS3PConfiguration: ServiceCallType<TargetS3PProtocolConfiguration, void>;
getModbusTcpConfiguration: ServiceCallType<void, TargetModbusTcpProtocolConfiguration>;
setModbusTcpConfiguration: ServiceCallType<TargetModbusTcpProtocolConfiguration, void>;
putModbusTcpConfiguration: ServiceCallType<TargetModbusTcpProtocolConfiguration, void>;
getCanConfiguration: ServiceCallType<void, TargetCanProtocolConfiguration>;
setCanConfiguration: ServiceCallType<TargetCanProtocolConfiguration, void>;
putCanConfiguration: ServiceCallType<TargetCanProtocolConfiguration, void>;
postResetKeep: ServiceCallType<void, void>;
readDebug: ServiceCallType<number, Uint8Array>;
writeDebug: ServiceCallType<void, void>;
getRegisterAccess: ServiceCallType<void, Uint8Array>;
postRegisterAccess: ServiceCallType<void, void>;
sendReceive: ServiceCallType<Uint8Array, Uint8Array>;
send: ServiceCallType<Uint8Array, Uint8Array>;
readBytes: ServiceCallType<void, Uint8Array>;
modbusWrite: ServiceCallType<ModbusWriteOptions, void>;
modbusRead: ServiceCallType<ModbusOptions, Uint8Array>;
getSubProtocol: ServiceCallType<void, TargetProtocol>;
getReceivedCount: ServiceCallType<void, number>;
readAddress: ServiceCallType<MemoryInfo, Uint8Array>;
writeAddress: ServiceCallType<MemoryWriteInfo, void>;
};
/**
* Get target protocol
*
* LWM2M path: /1027//1
*
* @tapVersion(">=1.0")
* @return
*/
getProtocol(): Promise<TapResponse<TargetProtocol>>;
/**
*
*
* LWM2M path: /1027//1
*
* @tapVersion(">=1.0")
* @return call options
*/
getProtocolCall(): ServiceCallType;
/**
* Temporarily change target protocol
*
* LWM2M path: /1027//1
*
* @tapVersion(">=1.0")
* @param targetProtocol input
* @return
*/
setProtocol(targetProtocol: TargetProtocol): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//1
*
* @tapVersion(">=1.0")
* @param targetProtocol input
* @return call options
*/
setProtocolCall(targetProtocol: TargetProtocol): ServiceCallType;
/**
* Write target protocol in configuration
*
* LWM2M path: /1027//1
*
* @tapVersion(">=1.0")
* @param targetProtocol input
* @return
*/
putProtocol(targetProtocol: TargetProtocol): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//1
*
* @tapVersion(">=1.0")
* @param targetProtocol input
* @return call options
*/
putProtocolCall(targetProtocol: TargetProtocol): ServiceCallType;
/**
* Get core type
*
* LWM2M path: /1027//2
*
* @tapVersion(">=1.0")
* @return
*/
getCoreType(): Promise<TapResponse<TargetCoreType>>;
/**
*
*
* LWM2M path: /1027//2
*
* @tapVersion(">=1.0")
* @return call options
*/
getCoreTypeCall(): ServiceCallType;
/**
* Write core type
*
* LWM2M path: /1027//2
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
putCoreType(value: TargetCoreType): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//2
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
putCoreTypeCall(value: TargetCoreType): ServiceCallType;
/**
* Read target protocol connection status
*
* LWM2M path: /1027//3
*
* @tapVersion(">=1.63")
* @return
*/
isConnected(): Promise<TapResponse<boolean>>;
/**
*
*
* LWM2M path: /1027//3
*
* @tapVersion(">=1.63")
* @return call options
*/
isConnectedCall(): ServiceCallType;
/**
* Connect to target
*
* LWM2M path: /1027//3
*
* @tapVersion(">=1.0")
* @return
*/
connect(): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//3
*
* @tapVersion(">=1.0")
* @return call options
*/
connectCall(): ServiceCallType;
/**
* Disconnect from target
*
* LWM2M path: /1027//4
*
* @tapVersion(">=1.0")
* @return
*/
disconnect(): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//4
*
* @tapVersion(">=1.0")
* @return call options
*/
disconnectCall(): ServiceCallType;
/**
* Reset target
*
* LWM2M path: /1027//5
*
* @tapVersion(">=1.0")
* @return
*/
reset(): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//5
*
* @tapVersion(">=1.0")
* @return call options
*/
resetCall(): ServiceCallType;
/**
* Get target firmware version
*
* LWM2M path: /1027//6
*
* @tapVersion(">=1.0")
* @return
*/
getFirmwareVersion(): Promise<TapResponse<string>>;
/**
*
*
* LWM2M path: /1027//6
*
* @tapVersion(">=1.0")
* @return call options
*/
getFirmwareVersionCall(): ServiceCallType;
/**
* Write target firmware version
*
* LWM2M path: /1027//6
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
putFirmwareVersion(value: string): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//6
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
putFirmwareVersionCall(value: string): ServiceCallType;
/**
* Get vcc
*
* LWM2M path: /1027//7
*
* @tapVersion(">=1.0")
* @return
*/
getVcc(): Promise<TapResponse<number>>;
/**
*
*
* LWM2M path: /1027//7
*
* @tapVersion(">=1.0")
* @return call options
*/
getVccCall(): ServiceCallType;
/**
* Get min target voltage
*
* LWM2M path: /1027//8
*
* @tapVersion(">=1.0")
* @return
*/
getMinVoltage(): Promise<TapResponse<number>>;
/**
*
*
* LWM2M path: /1027//8
*
* @tapVersion(">=1.0")
* @return call options
*/
getMinVoltageCall(): ServiceCallType;
/**
* Write min target voltage value
*
* LWM2M path: /1027//8
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
putMinVoltage(value: number): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//8
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
putMinVoltageCall(value: number): ServiceCallType;
/**
* Get max target voltage
*
* LWM2M path: /1027//9
*
* @tapVersion(">=1.0")
* @return
*/
getMaxVoltage(): Promise<TapResponse<number>>;
/**
*
*
* LWM2M path: /1027//9
*
* @tapVersion(">=1.0")
* @return call options
*/
getMaxVoltageCall(): ServiceCallType;
/**
* Write max target voltage value
*
* LWM2M path: /1027//9
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
putMaxVoltage(value: number): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//9
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
putMaxVoltageCall(value: number): ServiceCallType;
/**
* Get target page size
*
* LWM2M path: /1027//10
*
* @tapVersion(">=1.0")
* @return
*/
getPageSize(): Promise<TapResponse<number>>;
/**
*
*
* LWM2M path: /1027//10
*
* @tapVersion(">=1.0")
* @return call options
*/
getPageSizeCall(): ServiceCallType;
/**
* Write target page size
*
* LWM2M path: /1027//10
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
putPageSize(value: number): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//10
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
putPageSizeCall(value: number): ServiceCallType;
/**
* Get communication stats
*
* LWM2M path: /1027//11
*
* @tapVersion(">=1.0")
* @return
*/
getComStats(): Promise<TapResponse<TargetComStats>>;
/**
*
*
* LWM2M path: /1027//11
*
* @tapVersion(">=1.0")
* @return call options
*/
getComStatsCall(): ServiceCallType;
/**
* Clear communication stats
*
* LWM2M path: /1027//11
*
* @tapVersion(">=1.0")
* @return
*/
clearComStats(): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//11
*
* @tapVersion(">=1.0")
* @return call options
*/
clearComStatsCall(): ServiceCallType;
/**
* List available target protocols
*
* LWM2M path: /1027//20
*
* @tapVersion(">=1.0")
* @return
*/
getAvailableProtocols(): Promise<TapResponse<TargetProtocol[]>>;
/**
*
*
* LWM2M path: /1027//20
*
* @tapVersion(">=1.0")
* @return call options
*/
getAvailableProtocolsCall(): ServiceCallType;
/**
* Get Serial/Modbus protocol configuration options
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @return
*/
getSerialModbusConfiguration(): Promise<TapResponse<TargetSerialModbusProtocolConfiguration>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @return call options
*/
getSerialModbusConfigurationCall(): ServiceCallType;
/**
* Temporary update configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
setSerialModbusConfiguration(value: TargetSerialModbusProtocolConfiguration): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
setSerialModbusConfigurationCall(value: TargetSerialModbusProtocolConfiguration): ServiceCallType;
/**
* Write protocol options in Tap configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
putSerialModbusConfiguration(value: TargetSerialModbusProtocolConfiguration): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
putSerialModbusConfigurationCall(value: TargetSerialModbusProtocolConfiguration): ServiceCallType;
/**
* Get modbus default slave address
*
* LWM2M path: /1027//22
*
* @tapVersion(">=1.0")
* @return
*/
getModbusDefaultSlaveAddress(): Promise<TapResponse<number>>;
/**
*
*
* LWM2M path: /1027//22
*
* @tapVersion(">=1.0")
* @return call options
*/
getModbusDefaultSlaveAddressCall(): ServiceCallType;
/**
* Write modbus default slave address
*
* LWM2M path: /1027//22
*
* @tapVersion(">=1.0")
* @param address input
* @return
*/
putModbusDefaultSlaveAddress(address: number): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//22
*
* @tapVersion(">=1.0")
* @param address input
* @return call options
*/
putModbusDefaultSlaveAddressCall(address: number): ServiceCallType;
/**
* Get S3P protocol configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @return
*/
getS3PConfiguration(): Promise<TapResponse<TargetS3PProtocolConfiguration>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @return call options
*/
getS3PConfigurationCall(): ServiceCallType;
/**
* Temporary update S3P configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
setS3PConfiguration(value: TargetS3PProtocolConfiguration): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
setS3PConfigurationCall(value: TargetS3PProtocolConfiguration): ServiceCallType;
/**
* Update protocol configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
putS3PConfiguration(value: TargetS3PProtocolConfiguration): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
putS3PConfigurationCall(value: TargetS3PProtocolConfiguration): ServiceCallType;
/**
* Get Modbus TCP protocol configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @return
*/
getModbusTcpConfiguration(): Promise<TapResponse<TargetModbusTcpProtocolConfiguration>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @return call options
*/
getModbusTcpConfigurationCall(): ServiceCallType;
/**
* Temporary update Modbus TCP configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
setModbusTcpConfiguration(value: TargetModbusTcpProtocolConfiguration): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
setModbusTcpConfigurationCall(value: TargetModbusTcpProtocolConfiguration): ServiceCallType;
/**
* Update Modbus TCP configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
putModbusTcpConfiguration(value: TargetModbusTcpProtocolConfiguration): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
putModbusTcpConfigurationCall(value: TargetModbusTcpProtocolConfiguration): ServiceCallType;
/**
* Get CAN protocol configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=2.6")
* @return
*/
getCanConfiguration(): Promise<TapResponse<TargetCanProtocolConfiguration>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=2.6")
* @return call options
*/
getCanConfigurationCall(): ServiceCallType;
/**
* Temporary update CAN configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=2.6")
* @param value input
* @return
*/
setCanConfiguration(value: TargetCanProtocolConfiguration): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=2.6")
* @param value input
* @return call options
*/
setCanConfigurationCall(value: TargetCanProtocolConfiguration): ServiceCallType;
/**
* Update CAN protocol configuration
*
* LWM2M path: /1027//21
*
* @tapVersion(">=2.6")
* @param value input
* @return
*/
putCanConfiguration(value: TargetCanProtocolConfiguration): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//21
*
* @tapVersion(">=2.6")
* @param value input
* @return call options
*/
putCanConfigurationCall(value: TargetCanProtocolConfiguration): ServiceCallType;
/**
* Put and keep target in Reset state
*
* LWM2M path: /1027//30
*
* @tapVersion(">=1.0")
* @return
*/
postResetKeep(): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//30
*
* @tapVersion(">=1.0")
* @return call options
*/
postResetKeepCall(): ServiceCallType;
/**
* Debug access
*
* LWM2M path: /1027//31
*
* @tapVersion(">=1.0")
* @param address input
* @return
*/
readDebug(address: number): Promise<TapResponse<Uint8Array>>;
/**
*
*
* LWM2M path: /1027//31
*
* @tapVersion(">=1.0")
* @param address input
* @return call options
*/
readDebugCall(address: number): ServiceCallType;
/**
* Write address
*
* LWM2M path: /1027//31
*
* @tapVersion(">=1.0")
* @return
*/
writeDebug(): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//31
*
* @tapVersion(">=1.0")
* @return call options
*/
writeDebugCall(): ServiceCallType;
/**
* Register access
*
* LWM2M path: /1027//32
*
* @tapVersion(">=1.0")
* @return
*/
getRegisterAccess(): Promise<TapResponse<Uint8Array>>;
/**
*
*
* LWM2M path: /1027//32
*
* @tapVersion(">=1.0")
* @return call options
*/
getRegisterAccessCall(): ServiceCallType;
/**
* Write register value
*
* LWM2M path: /1027//32
*
* @tapVersion(">=1.0")
* @return
*/
postRegisterAccess(): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//32
*
* @tapVersion(">=1.0")
* @return call options
*/
postRegisterAccessCall(): ServiceCallType;
/**
* Transparent send and receive
*
* LWM2M path: /1027//34
*
* @tapVersion(">=1.0")
* @param data input
* @return
*/
sendReceive(data: Uint8Array): Promise<TapResponse<Uint8Array>>;
/**
*
*
* LWM2M path: /1027//34
*
* @tapVersion(">=1.0")
* @param data input
* @return call options
*/
sendReceiveCall(data: Uint8Array): ServiceCallType;
/**
* Transparent send
*
* LWM2M path: /1027//34
*
* @tapVersion(">=1.0")
* @param data input
* @return
*/
send(data: Uint8Array): Promise<TapResponse<Uint8Array>>;
/**
*
*
* LWM2M path: /1027//34
*
* @tapVersion(">=1.0")
* @param data input
* @return call options
*/
sendCall(data: Uint8Array): ServiceCallType;
/**
* Read data transparent mode with limit
*
* LWM2M path: /1027//35
*
* @tapVersion(">=1.0")
* @return
*/
readBytes(): Promise<TapResponse<Uint8Array>>;
/**
*
*
* LWM2M path: /1027//35
*
* @tapVersion(">=1.0")
* @return call options
*/
readBytesCall(): ServiceCallType;
/**
* Direct modbus write
*
* LWM2M path: /1027//37
*
* @tapVersion(">=1.0")
* @param data input
* @return
*/
modbusWrite(data: ModbusWriteOptions): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//37
*
* @tapVersion(">=1.0")
* @param data input
* @return call options
*/
modbusWriteCall(data: ModbusWriteOptions): ServiceCallType;
/**
* Direct modbus read
*
* LWM2M path: /1027//38
*
* @tapVersion(">=1.0")
* @param data input
* @return
*/
modbusRead(data: ModbusOptions): Promise<TapResponse<Uint8Array>>;
/**
*
*
* LWM2M path: /1027//38
*
* @tapVersion(">=1.0")
* @param data input
* @return call options
*/
modbusReadCall(data: ModbusOptions): ServiceCallType;
/**
* Get current sub protocol
*
* LWM2M path: /1027//40
*
* @tapVersion(">=1.0")
* @return
*/
getSubProtocol(): Promise<TapResponse<TargetProtocol>>;
/**
*
*
* LWM2M path: /1027//40
*
* @tapVersion(">=1.0")
* @return call options
*/
getSubProtocolCall(): ServiceCallType;
/**
* Get byte length received in buffer
*
* LWM2M path: /1027//43
*
* @tapVersion(">=1.57")
* @return
*/
getReceivedCount(): Promise<TapResponse<number>>;
/**
*
*
* LWM2M path: /1027//43
*
* @tapVersion(">=1.57")
* @return call options
*/
getReceivedCountCall(): ServiceCallType;
/**
* SWD direct Read
*
* LWM2M path: /1027//33
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
readAddress(value: MemoryInfo): Promise<TapResponse<Uint8Array>>;
/**
*
*
* LWM2M path: /1027//33
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
readAddressCall(value: MemoryInfo): ServiceCallType;
/**
* SWD direct Write
*
* LWM2M path: /1027//33
*
* @tapVersion(">=1.0")
* @param value input
* @return
*/
writeAddress(value: MemoryWriteInfo): Promise<TapResponse<void>>;
/**
*
*
* LWM2M path: /1027//33
*
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
writeAddressCall(value: MemoryWriteInfo): ServiceCallType;
}