| 9 | SpanCharacteristic *power; // reference to the On Characteristic |
| 10 | |
| 11 | DEV_LED(int ledPin) : Service::LightBulb(){ // constructor() method |
| 12 | |
| 13 | power=new Characteristic::On(); |
| 14 | this->ledPin=ledPin; |
| 15 | pinMode(ledPin,OUTPUT); |
| 16 | |
| 17 | // Here we output log messages when the constructor is initially called. |
| 18 | // We use LOG0() to ensure the message is always output regardless of the |
| 19 | // LOG Level setting. Note this uses the single-argument form of LOG(), so |
| 20 | // multiple calls are needed to create a complete message |
| 21 | |
| 22 | LOG0("Configuring On/Off LED: Pin="); // initialization message |
| 23 | LOG0(ledPin); |
| 24 | LOG0("\n"); |
| 25 | |
| 26 | } // end constructor |
| 27 | |
| 28 | boolean update(){ // update() method |
| 29 |
nothing calls this directly
no outgoing calls
no test coverage detected