OSGI-INF.blueprint.module.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of net.solarnetwork.node.datum.carrel.dts Show documentation
Show all versions of net.solarnetwork.node.datum.carrel.dts Show documentation
Collect consumption data from Carrel-Electrade watt meters.
The newest version!
<?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ctx="http://www.springframework.org/schema/context" xmlns:osgix="http://www.eclipse.org/gemini/blueprint/schema/blueprint-compendium" xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://www.eclipse.org/gemini/blueprint/schema/blueprint-compendium http://www.eclipse.org/gemini/blueprint/schema/blueprint-compendium/gemini-blueprint-compendium.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"> <bean id="datumMetadataService" class="net.solarnetwork.common.osgi.service.DynamicServiceTracker"> <argument ref="bundleContext"/> <property name="serviceClassName" value="net.solarnetwork.node.service.DatumMetadataService"/> <property name="sticky" value="true"/> </bean> <bean id="datumQueue" class="net.solarnetwork.common.osgi.service.DynamicServiceTracker"> <argument ref="bundleContext"/> <property name="serviceClassName" value="net.solarnetwork.node.service.DatumQueue"/> <property name="sticky" value="true"/> </bean> <bean id="placeholderService" class="net.solarnetwork.common.osgi.service.DynamicServiceTracker"> <argument ref="bundleContext"/> <property name="serviceClassName" value="net.solarnetwork.node.service.PlaceholderService"/> <property name="sticky" value="true"/> </bean> <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basenames"> <list> <value>net.solarnetwork.node.datum.carrel.dts.DTSConsumptionDatumDataSource</value> <value>net.solarnetwork.node.io.modbus.support.ModbusDataDatumDataSourceSupport</value> <value>net.solarnetwork.node.io.modbus.support.ModbusDeviceSupport</value> <value>net.solarnetwork.node.service.support.DatumDataSourceSupport</value> <value>net.solarnetwork.service.support.BasicIdentifiable</value> </list> </property> </bean> <bean id="jobMessageSource" class="net.solarnetwork.support.PrefixedMessageSource"> <property name="prefix" value="datumDataSource."/> <property name="delegate" ref="messageSource"/> </bean> <!-- Published Services --> <service interface="net.solarnetwork.settings.SettingSpecifierProviderFactory"> <bean class="net.solarnetwork.settings.support.BasicSettingSpecifierProviderFactory"> <property name="displayName" value="DTS series watt meter"/> <property name="factoryUid" value="net.solarnetwork.node.datum.carrel.dts"/> <property name="messageSource" ref="messageSource"/> </bean> </service> <osgix:managed-service-factory factory-pid="net.solarnetwork.node.datum.carrel.dts" autowire-on-update="true"> <osgix:interfaces> <beans:value>net.solarnetwork.node.job.ManagedJob</beans:value> </osgix:interfaces> <bean class="net.solarnetwork.node.job.SimpleManagedJob" init-method="serviceDidStartup" destroy-method="serviceDidShutdown"> <argument> <bean class="net.solarnetwork.node.job.DatumDataSourcePollManagedJob"> <property name="datumMetadataService" ref="datumMetadataService"/> <property name="datumQueue" ref="datumQueue"/> <property name="datumDataSource"> <bean class="net.solarnetwork.node.datum.carrel.dts.DTSConsumptionDatumDataSource"> <property name="messageSource" ref="jobMessageSource"/> <property name="placeholderService" ref="placeholderService"/> <property name="modbusNetwork"> <bean class="net.solarnetwork.common.osgi.service.DynamicServiceTracker"> <argument ref="bundleContext"/> <property name="serviceClassName" value="net.solarnetwork.node.io.modbus.ModbusNetwork"/> <property name="propertyFilters"> <map> <entry key="uid" value="Modbus Port"/> </map> </property> </bean> </property> </bean> </property> </bean> </argument> <argument value="0 * * * * ?"/> <property name="serviceProviderConfigurations"> <map> <entry key="datumDataSource"> <bean class="net.solarnetwork.node.job.SimpleServiceProviderConfiguration"> <property name="interfaces"> <list> <value>net.solarnetwork.node.service.DatumDataSource</value> </list> </property> </bean> </entry> </map> </property> </bean> </osgix:managed-service-factory> </blueprint>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy