Changes between Version 7 and Version 8 of Proposal
- Timestamp:
- May 27, 2013, 12:56:44 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Proposal
v7 v8 29 29 30 30 # Datapoints (= Communication objects) definition 31 DP_01 = dict(name="temperature", dptId="9.001", flags=" crt", priority="low", initValue=0.)32 DP_02 = dict(name="humidity", dptId="9.007", flags=" crt", priority="low", initValue=0.)33 DP_03 = dict(name="wind_speed", dptId="9.005", flags=" crt", priority="low", initValue=0.)34 DP_04 = dict(name="wind_alarm", dptId="1.005", flags=" crt", priority="high", initValue=""No alarm")35 DP_05 = dict(name="wind_ limit", dptId="9.005", flags="cwtu", priority="low", initValue=15.)36 DP_06 = dict(name="wind_alarm_enable", dptId="1.003", flags=" cwtu", priority="low", initValue="Disable")31 DP_01 = dict(name="temperature", dptId="9.001", flags="CRT", priority="low", initValue=0.) 32 DP_02 = dict(name="humidity", dptId="9.007", flags="CRT", priority="low", initValue=0.) 33 DP_03 = dict(name="wind_speed", dptId="9.005", flags="CRT", priority="low", initValue=0.) 34 DP_04 = dict(name="wind_alarm", dptId="1.005", flags="CRT", priority="high", initValue=""No alarm") 35 DP_05 = dict(name="wind_speed_limit", dptId="9.005", flags="CWTU", priority="low", initValue=15.) 36 DP_06 = dict(name="wind_alarm_enable", dptId="1.003", flags="CWTU", priority="low", initValue="Disable") 37 37 38 38 # Instanciation of the weather station device object … … 44 44 ETS.link(device=station, dp="wind_speed", gad="1/1/3") 45 45 ETS.link(device=station, dp="wind_alarm", gad="1/1/4") 46 ETS.link(device=station, dp="wind_ limit", gad="1/1/5")46 ETS.link(device=station, dp="wind_speed_limit", gad="1/1/5") 47 47 ETS.link(device=station, dp="wind_alarm_enable", gad="1/1/6") 48 48 49 49 }}} 50 50 51 That's it! Ok, that device does not do much things... 51 That's it! As you can see, concepts used here are not new... This device can be then used from any other real device of your installation, through GADs {{{1/1/1}}} to {{{1/1/6}}}. All you have to do, is to link the Communication Objects of your real devices to these GADs, using the '''ETS''' application. For example, the DP Nr 4 will send the {{{"Alarm"}}} value over the bus when the wind speed will reach the value stored in DP Nr 5, but only if the value of the DP Nr 6 as been set to {{{"Enable"}}}. 52 53 54 55 56