-
Notifications
You must be signed in to change notification settings - Fork 4
ModbusPressureSensorDriver
Dario Bonino edited this page May 30, 2013
·
1 revision
Handles all the PressureSensor
devices connected to a Modbus network.
See below for a sample configuration (in the environment XML configuration file)
<dhc:device domoticSystem="Modbus" name="pressure-sensor-name"
class="PressureSensor" gateway="modbus-gateway-name">
<dhc:description>Sensor description</dhc:description>
<dhc:isIn>Sensor location</dhc:isIn>
<dhc:controlFunctionality class="PressureMeasurementFunctionality">
<dhc:commands>
<dhc:command id="GetPressureCommand_m1_ai1" name="GetPressureCommand_m1_ai1" class="GetPressureCommand">
<dhc:param value="getPressure" name="realCommandName" />
<dhc:param value="Measure" name="returnType" />
</dhc:command>
</dhc:commands>
</dhc:controlFunctionality>
<dhc:notificationFunctionality class="StateChangeNotificationFunctionality">
<dhc:notifications>
<dhc:notification name="StateChangeNotification_m1_ai1"
class="StateChangeNotification">
<dhc:param value="stateChanged" name="notificationName" />
<dhc:param type="State" value="newState" name="notificationParamName" />
</dhc:notification>
</dhc:notifications>
</dhc:notificationFunctionality>
<dhc:notificationFunctionality
class="PressureMeasurementNotificationFunctionality">
<dhc:notifications>
<dhc:notification name="PressureMeasurementNotification_m1_ai1"
class="PressureMeasurementNotification">
<dhc:param value="2" name="nParams" />
<dhc:param value="newPressureValue" name="notificationName" />
<dhc:param name="registerAddress" value="8" />
<dhc:param name="registerType" value="6" />
<dhc:param name="slaveId" value="1" />
<dhc:param name="scaleFactor" value="1" />
<dhc:param name="unitOfMeasure" value="Pa" />
<dhc:param type="Measure" value="pressureValue" name="notificationParamName" />
</dhc:notification>
</dhc:notifications>
</dhc:notificationFunctionality>
<dhc:state class="PressureState">
<dhc:statevalues>
<dhc:statevalue name="" class="PressureStateValue" />
</dhc:statevalues>
</dhc:state>
</dhc:device>