@iotize/tap
Version:
IoTize Device client for Javascript
34 lines (33 loc) • 1.18 kB
TypeScript
import { VariableType } from '@iotize/tap/service/impl/variable';
import { ByteOrder16Bits, ByteOrder32Bits } from '../definitions';
import { IotizeBundleModel } from './iotize-bundle-model';
import { IotizeConfigModel } from './iotize-config-model';
export declare class IotizeVariableModel {
data: any;
iotizeModule: IotizeConfigModel;
_bundle?: IotizeBundleModel;
constructor(data: any, iotizeModule: IotizeConfigModel, bundle?: IotizeBundleModel);
toJson(): any;
module(): IotizeConfigModel;
/**
* Size (int bits) of one element
*/
valueSize(): 1 | 8 | 16 | 32;
valueQuantity(): number;
name(): string;
id(): string;
alias(): string;
description(): string;
unit(): string;
bundle(): IotizeBundleModel | undefined;
dataType(): VariableType.Data;
/**
* Return attribute by name
*/
attribute(name: string): string | undefined;
byteOrder(): ByteOrder32Bits | ByteOrder16Bits | undefined;
/**
* Convert unit size found in configuration file into a number of bits
*/
static unitSizeToBitSize(unitSize: number): 1 | 8 | 16 | 32;
}