March 2018
Beginner to intermediate
410 pages
10h 40m
English
We then only need to trap these events from our main application. We instantiate the IPSO Digital Output smart object as follows:
this.lwm2mClient = new Lwm2mClient("MIoT:Actuator:" +
this.deviceId, this.coapEndpoint,
new Lwm2mSecurityObject(),
new Lwm2mServerObject(),
new Lwm2mAccessControlObject(),
new Lwm2mDeviceObject("Waher Data AB", "ActuatorLwm2m",
this.deviceId, "1.0", "Actuator", "1.0", "1.0"),
new DigitalOutput(
this.digitalOutput0 = new DigitalOutputInstance(0,
this.output.HasValue && this.output.Value, "Relay")));
It's then easy to forward incoming changes to the rest of the application by attaching an event handler on the OnRemoteUpdate event we just created:
this.digitalOutput0.OnRemoteUpdate ...
Read now
Unlock full access