-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: query provider classes and TimeSeriesData support (#51)
- Loading branch information
Showing
16 changed files
with
530 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { SiteWiseAssetModule } from '.'; | ||
import { IotAppKitDataModule } from './data-module/IotAppKitDataModule'; | ||
import { IoTAppKitComponentSession, DataModuleSession } from './interface.d'; | ||
|
||
/** | ||
* Component session to manage component data module sessions. | ||
* Contains a reference to sitewise data modules | ||
*/ | ||
export class AppKitComponentSession implements IoTAppKitComponentSession { | ||
public componentId: string; | ||
|
||
public siteWiseTimeSeriesModule: IotAppKitDataModule; | ||
|
||
public siteWiseAssetModule: SiteWiseAssetModule; | ||
|
||
private sessions: DataModuleSession[] = []; | ||
|
||
constructor({ | ||
componentId, | ||
siteWiseTimeSeriesModule, | ||
siteWiseAssetModule, | ||
}: { | ||
componentId: string; | ||
siteWiseTimeSeriesModule: IotAppKitDataModule; | ||
siteWiseAssetModule: SiteWiseAssetModule; | ||
}) { | ||
this.componentId = componentId; | ||
this.siteWiseTimeSeriesModule = siteWiseTimeSeriesModule; | ||
this.siteWiseAssetModule = siteWiseAssetModule; | ||
} | ||
|
||
attachDataModuleSession(session: DataModuleSession): void { | ||
this.sessions.push(session); | ||
} | ||
|
||
close(): void { | ||
this.sessions.forEach((session) => session.close()); | ||
} | ||
} |
Oops, something went wrong.