More setup and an example componente

This commit is contained in:
Daniel Kluge
2023-10-16 18:29:16 +02:00
parent 2bf455b44a
commit 99fd86ff95
11 changed files with 1692 additions and 74 deletions
+14 -4
View File
@@ -2,10 +2,20 @@ import type { types } from "@aas-core-works/aas-core3.0rc02-typescript";
type ConnectionType = "ON_DEMAND" | "PERMANENT";
export abstract class InterfaceConnectionObject {
public abstract readonly name: string;
public abstract readonly connectionType: ConnectionType;
public abstract readonly supportsSubscriptions: boolean;
export type OnResponseCallback = (response: any) => void
export default abstract class InterfaceConnectionObject<ConfigInterface> {
protected abstract readonly name: string;
protected abstract readonly connectionType: ConnectionType;
protected abstract readonly supportsSubscriptions: boolean;
protected config: ConfigInterface;
private onResponseCallback: OnResponseCallback;
constructor(config: ConfigInterface, onResponseCallback: OnResponseCallback) {
this.config = config;
this.onResponseCallback = onResponseCallback;
}
public abstract connect(): boolean;