Skip to content

Commit d04c813

Browse files
committed
feat(binding-coap): remove cov:observe subprotocol
1 parent 2f88743 commit d04c813

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

packages/binding-coap/src/coap-server.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { MdnsIntroducer } from "./mdns-introducer";
3535
import { PropertyElement, DataSchema, ActionElement, EventElement } from "wot-thing-description-types";
3636
import { CoapServerConfig } from "./coap";
3737
import { DataSchemaValue } from "wot-typescript-definitions";
38-
import { filterPropertyObserveOperations, getPropertyOpValues } from "./util";
38+
import { getPropertyOpValues } from "./util";
3939

4040
const { debug, warn, info, error } = createLoggers("binding-coap", "coap-server");
4141

@@ -248,23 +248,14 @@ export default class CoapServer implements ProtocolServer {
248248
continue;
249249
}
250250

251-
let subprotocol: string | undefined;
252-
253-
const observeOpValues = filterPropertyObserveOperations(formOpValues);
254-
255-
if (observeOpValues.length > 0) {
256-
subprotocol = "cov:observe";
257-
}
258-
259251
const form = this.createAffordanceForm(
260252
base,
261253
this.PROPERTY_DIR,
262254
offeredMediaType,
263255
formOpValues,
264256
thing.uriVariables,
265257
propertyName,
266-
property.uriVariables,
267-
subprotocol
258+
property.uriVariables
268259
);
269260

270261
this.addFormToAffordance(form, property);
@@ -299,8 +290,7 @@ export default class CoapServer implements ProtocolServer {
299290
["subscribeevent", "unsubscribeevent"],
300291
thing.uriVariables,
301292
eventName,
302-
event.uriVariables,
303-
"cov:observe"
293+
event.uriVariables
304294
);
305295

306296
this.addFormToAffordance(form, event);

packages/binding-coap/test/coap-server-test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,6 @@ class CoapServerTest {
679679

680680
if (observeOpValuePresent) {
681681
observeOpValueFormCount++;
682-
expect(form.subprotocol).to.eql("cov:observe");
683682
}
684683

685684
const readWriteOpValueCount = filterPropertyReadWriteOperations(

0 commit comments

Comments
 (0)