MCPcopy Create free account
hub / github.com/WebThingsIO/webthing-node / constructor

Method constructor

example/platform/board/edison.js:20–34  ·  view source on GitHub ↗
(name, type, description)

Source from the content-addressed store, hash-verified

18
19class EdisonThing extends Thing {
20 constructor(name, type, description) {
21 super('urn:dev:ops:my-edison-1234',
22 name || 'Edison',
23 type || [],
24 description || 'A web connected Edison');
25 const self = this;
26 this.pinProperties = [
27 new PwmProperty(this, 'PWM0', 50, {
28 description: 'Analog port of Edison',
29 }),
30 ];
31 this.pinProperties.forEach((property) => {
32 self.addProperty(property);
33 });
34 }
35
36 close() {
37 this.pinProperties.forEach((property) => {

Callers

nothing calls this directly

Calls 1

addPropertyMethod · 0.80

Tested by

no test coverage detected