Example using two interfaces
This commit is contained in:
@@ -28,7 +28,10 @@ const broker = MultiMessageBroker.getInstance();
|
|||||||
broker.registerInterfaceConnection({ interfaceConnection: MQTTConnector, config: { reconnectPeriod: 1000 }})
|
broker.registerInterfaceConnection({ interfaceConnection: MQTTConnector, config: { reconnectPeriod: 1000 }})
|
||||||
// Also we need to register the aas and the server interfaces it should use.
|
// Also we need to register the aas and the server interfaces it should use.
|
||||||
// Multiple server interfaces can be used for the same AAS (by making "serverInterfaces" an array).
|
// Multiple server interfaces can be used for the same AAS (by making "serverInterfaces" an array).
|
||||||
broker.registerAAS({ aas, serverInterfaces: { serverInterface: HTTPInterfaceServer, config: { bindPort: 3000, bindAddress: "0.0.0.0" } } });
|
broker.registerAAS({ aas, serverInterfaces: [
|
||||||
|
{ serverInterface: HTTPInterfaceServer, config: { bindPort: 3000, bindAddress: "0.0.0.0" } },
|
||||||
|
{ serverInterface: HTTPInterfaceServer, config: { bindPort: 3001, bindAddress: "0.0.0.0" } },
|
||||||
|
]});
|
||||||
|
|
||||||
// Prepare the broker (this will create instances of the interfaces and connectors)
|
// Prepare the broker (this will create instances of the interfaces and connectors)
|
||||||
broker.prepare();
|
broker.prepare();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as aasCore from "@aas-core-works/aas-core3.0-typescript";
|
import * as aasCore from "@aas-core-works/aas-core3.0-typescript";
|
||||||
import Traverser from "../helper/traverser";
|
import Traverser from "../helper/traverser";
|
||||||
import { AssetInterfacesMappingConfiguration, MappingConfEntry, MappingConfiguration } from "../types/aimcConf";
|
import type { AssetInterfacesMappingConfiguration, MappingConfEntry, MappingConfiguration } from "../types/aimcConf";
|
||||||
import { endpointAvailable, ResolvedRelationshipElement } from "../types/common";
|
import { endpointAvailable, ResolvedRelationshipElement } from "../types/common";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user