2018-04-06 11:02:18 +00:00
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
import { Observable } from 'rxjs/Observable';
|
|
|
|
|
2018-05-24 06:44:13 +00:00
|
|
|
import { RPCService } from '@loafer/ng-rpc';
|
2018-05-02 08:25:38 +00:00
|
|
|
import { SensorItemDependency } from '@overflow/commons-typescript/model/sensor-item';
|
|
|
|
import { MetaSensorItemKey } from '@overflow/commons-typescript/model/meta';
|
|
|
|
import { MetaSensorDisplayItem } from '@overflow/commons-typescript/model/meta';
|
2018-04-06 11:02:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class SensorItemDependencyService {
|
|
|
|
|
|
|
|
public constructor(
|
|
|
|
private rpcService: RPCService,
|
|
|
|
) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public regist(dependency: SensorItemDependency): Observable<SensorItemDependency> {
|
|
|
|
return this.rpcService.call('SensorItemDependencyService.regist', dependency);
|
|
|
|
}
|
|
|
|
|
|
|
|
public readAllByDisplayItem(displayItem: MetaSensorDisplayItem): Observable<MetaSensorItemKey[]> {
|
|
|
|
return this.rpcService.call('SensorItemDependencyService.readAllByDisplayItem', displayItem);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|