Research Article
A Sensor Network with Embedded Data Processing and Data-to-Cloud Capabilities for Vibration-Based Real-Time SHM
Algorithm 1
Data collection algorithm.
1: procedure startSensor(address: int) | 2: command ← new AlwaysRunCommand | 3: send(address,command) | 4: waitForAck(address,TIMEOUT) | 5: Init loop: | 6: for all sensor address do | 7: startSensor(address) | 8: Main loop: | 9: for all sensor address do | 10: command ← new GetAccCommand | 11: send(address,command) | 12: data ← read(TIMEOUT) | 13: ifvalid(data) then | 14: send(address,ACK) | 15: acc ← decode(data) | 16: timestamp ← decode(data) | 17: sendToDB(address,acc,timestamp) | 18: startSensor(address) | 19: gotoMain loop. |
|