Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027 C12832 EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: EmulatedResourceFactory.cpp
- Revision:
- 76:888c43aceb1c
- Parent:
- 74:4c8bf308383e
- Child:
- 77:2907f6a2968a
--- a/EmulatedResourceFactory.cpp Tue Mar 04 18:37:32 2014 +0000
+++ b/EmulatedResourceFactory.cpp Tue Mar 04 21:02:56 2014 +0000
@@ -70,18 +70,38 @@
this->createResource("/fw/devtype","Light");
this->createResource("/dev/bat","0.0",(void *)&init_battery,NULL);
this->createResource("/sen/I","0.0",(void *)&init_current,NULL);
+ this->createResource("/dev/I","0.0",(void *)&init_current,NULL);
this->createResource("/nw/ipaddr",ethernet.getIPAddress());
this->createResource(endpoint_name,"/lt/0/dim","25",(void *)&emulated_light_dimming_cb); // Action: dim/brighten light
this->createResource("/nw/eripaddr","N/A");
this->createResource(endpoint_name,"/lt/0/on","1",(void *)&emulated_light_switch_cb); // Action: light on/off
+ this->createResource(endpoint_name,"/lt/0/ctr","1",(void *)&emulated_light_switch_cb); // Action: light on/off
this->createResource("/dev/mdl","MQTT MBED Light");
this->createResource("/gps/int","0");
this->createResource("/gps/fix","1");
this->createResource("/nw/pipaddr","N/A");
- this->createResource("/nw/prssi","-70");
+ this->createResource("/dev/W","120W");
+ this->createResource("/nw/prssi","-63");
this->createResource("/sen/temp","0.0",(void *)&init_temperature,NULL);
+ this->createResource("/dev/t","0.0",(void *)&init_temperature,NULL);
this->createResource("/sen/V","5.0",(void *)&init_voltage,NULL);
+ this->createResource("/dev/V","5.0",(void *)&init_voltage,NULL);
this->createResource("/gps/loc",ENDPOINT_GPS_COORDS,(void *)&init_gps,NULL);
+
+ this->createResource("/res/int","1");
+ this->createResource("/res/systime","1010101");
+ this->createResource("/fw/curr/NanoLightingApplication/ver","1.0");
+ this->createResource("/fw/new/NanoLightingApplication/ver","1.0");
+ this->createResource("/fw/upload","false");
+ this->createResource("/fw/download","none");
+ this->createResource("/nsp/nspaddr",NSP_ADDRESS);
+ this->createResource("/lt/0/ontime","0");
+ this->createResource("/lt/0/pfact","1.0");
+ this->createResource("/lt/0/sched","none");
+ this->createResource("/lt/0/sched_elem","0");
+ this->createResource("/lt/0/totKwh","6.23");
+ this->createResource("/nw/utlz","0.01%");
+ this->createResource("/nw/macaddr","00:00:00:00:00");
}
void EmulatedResourceFactory::createResource(char *name,char *value) { ResourceFactory::createResource(name,value); }