Fixing all the stuff
This commit is contained in:
@@ -191,8 +191,10 @@ export default class MultiMessageBroker {
|
||||
}
|
||||
}
|
||||
else {
|
||||
const mapping = getMapping(request.target);
|
||||
mapping.forms = mapping.forms.filter((form: InterfaceForm) => form.op.toLocaleLowerCase() === request.type.toLocaleLowerCase());
|
||||
// Because of references we need to clone this thing as we will modify it
|
||||
const mappingOrig = getMapping(request.target);
|
||||
const mapping = { ...mappingOrig };
|
||||
mapping.forms = mappingOrig.forms.filter((form) => form.op.toLocaleLowerCase() === request.type.toLocaleLowerCase()) as any;
|
||||
|
||||
if (mapping.forms.length === 0) throw new ReferenceError(`No form found for ${(request.target as any).idShort} with operation ${request.type}`);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { types } from "@aas-core-works/aas-core3.0-typescript";
|
||||
import type { EndpointMetadata, InterfaceForm } from "./aidConf";
|
||||
import type { EndpointMetadata, InterfaceAction, InterfaceEvent, InterfaceForm, InterfaceProperty } from "./aidConf";
|
||||
|
||||
/**
|
||||
* Read Property Request
|
||||
@@ -144,7 +144,8 @@ export type Request = GetRequest | WriteRequest | ObserveRequest | UnobserveRequ
|
||||
*/
|
||||
export type OnRequestCallback = (request: Request) => any & GetRequestCallback & WriteRequestCallback & ObserveRequestCallback & UnobserveRequestCallback & CallRequestCallback & AsyncStateRequestCallback & AsyncResultRequestCallback & SubscribeRequestCallback & UnsubscribeRequestCallback;
|
||||
|
||||
export type ConnectionConfiguration = EndpointMetadata & InterfaceForm; // Wenn Transformationen implementiert werden, dann hier anpassen
|
||||
type InterfaceElement = InterfaceProperty | InterfaceAction | InterfaceEvent;
|
||||
export type ConnectionConfiguration = EndpointMetadata & InterfaceElement; // Wenn Transformationen implementiert werden, dann hier anpassen
|
||||
|
||||
export type MMBEvent = {
|
||||
type: "changed" | "event";
|
||||
|
||||
Reference in New Issue
Block a user