From 47a02d76c04d0ee0739900979623cd0cb87a3638 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Mon, 12 Aug 2024 08:25:26 +0200 Subject: [PATCH] feat(binding-coap): remove cov:observe subprotocol --- packages/binding-coap/src/coap-server.ts | 16 +++------------- packages/binding-coap/test/coap-server-test.ts | 1 - 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/packages/binding-coap/src/coap-server.ts b/packages/binding-coap/src/coap-server.ts index b94d91a9f..a570f66f2 100644 --- a/packages/binding-coap/src/coap-server.ts +++ b/packages/binding-coap/src/coap-server.ts @@ -35,7 +35,7 @@ import { MdnsIntroducer } from "./mdns-introducer"; import { PropertyElement, DataSchema, ActionElement, EventElement } from "wot-thing-description-types"; import { CoapServerConfig } from "./coap"; import { DataSchemaValue } from "wot-typescript-definitions"; -import { filterPropertyObserveOperations, getPropertyOpValues } from "./util"; +import { getPropertyOpValues } from "./util"; const { debug, warn, info, error } = createLoggers("binding-coap", "coap-server"); @@ -248,14 +248,6 @@ export default class CoapServer implements ProtocolServer { continue; } - let subprotocol: string | undefined; - - const observeOpValues = filterPropertyObserveOperations(formOpValues); - - if (observeOpValues.length > 0) { - subprotocol = "cov:observe"; - } - const form = this.createAffordanceForm( base, this.PROPERTY_DIR, @@ -263,8 +255,7 @@ export default class CoapServer implements ProtocolServer { formOpValues, thing.uriVariables, propertyName, - property.uriVariables, - subprotocol + property.uriVariables ); this.addFormToAffordance(form, property); @@ -299,8 +290,7 @@ export default class CoapServer implements ProtocolServer { ["subscribeevent", "unsubscribeevent"], thing.uriVariables, eventName, - event.uriVariables, - "cov:observe" + event.uriVariables ); this.addFormToAffordance(form, event); diff --git a/packages/binding-coap/test/coap-server-test.ts b/packages/binding-coap/test/coap-server-test.ts index dc91d4da7..467e10133 100644 --- a/packages/binding-coap/test/coap-server-test.ts +++ b/packages/binding-coap/test/coap-server-test.ts @@ -679,7 +679,6 @@ class CoapServerTest { if (observeOpValuePresent) { observeOpValueFormCount++; - expect(form.subprotocol).to.eql("cov:observe"); } const readWriteOpValueCount = filterPropertyReadWriteOperations(