Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Kura Configurable Example Problem
Kura Configurable Example Problem [message #1769796] Thu, 03 August 2017 13:22 Go to next message
Erdem Tuna is currently offline Erdem TunaFriend
Messages: 9
Registered: August 2017
Junior Member
Hi,

I have applied the steps written in Eclipse Kura Examples page. When I upload the bundle to Kura, I can see the values in the kura.log but can see a new "Tab" under Services of Kura Web UI. I have re-done the example and refreshed the page several page but result is the same. Any help is appreciated.

Re: Kura Configurable Example Problem [message #1769824 is a reply to message #1769796] Thu, 03 August 2017 17:27 Go to previous messageGo to next message
Erdem Tuna is currently offline Erdem TunaFriend
Messages: 9
Registered: August 2017
Junior Member
My files are as such:
Component.xml
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
    activate="activate"
    configuration-policy="require"
    deactivate="deactivate"
    enabled="true"
    immediate="true"
    modified="updated"
    name="org.eclipse.kura.example.configurable.ConfigurableExample">

    <implementation class="org.eclipse.kura.example.configurable.ConfigurableExample"/>
    <service>
        <provide interface="org.eclipse.kura.example.configurable.ConfigurableExample"/>
    </service>
    <property name="service.pid" type="String" value="org.eclipse.kura.example.configurable.ConfigurableExample"/>
</scr:component>

org.eclipse.kura.example.configurable.ConfigurableExample.xml File
<?xml version="1.0" encoding="UTF-8"?>
<MetaData xmlns="http://www.osgi.org/xmlns/metatype/v1.2.0" localization="en_us">
    <OCD id="org.eclipse.kura.example.configurable.ConfigurableExample"
        name="ConfigurableExample"
        description="This is a sample metatype file for a simple configurable component">

        <AD id="param1.string"
            name="param1.string"
            type="String"
            cardinality="0"
            required="true"
            default="Some Text"
            description="String configuration parameter"/>

        <AD id="param2.float"
            name="param2.float"
            type="Float"
            cardinality="0"
            required="false"
            default="20.5"
            min="5.0"
            max="40.0"
            description="Float configuration parameter"/>

        <AD id="param3.integer"
            name="param3.integer"
            type="Integer"
            cardinality="0"
            required="true"
            default="2"
            min="1"
            description="Integer configuration parameter"/>
    </OCD>

    <Designate pid="org.eclipse.kura.example.configurable.ConfigurableExample">
        <Object ocdref="org.eclipse.kura.example.configurable.ConfigurableExample"/>
    </Designate>
</MetaData>

MANIFEST.MF File
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Configurable Componenet Example
Bundle-SymbolicName: org.eclipse.kura.example.configurable
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.eclipse.kura.configuration;version="1.1.2",
 org.osgi.service.component;version="1.2.0",
 org.slf4j;version="1.7.21"
Service-Component: OSGI-INF/component.xml

build.properties File 
output.. = bin/
bin.includes = META-INF/,\
               .,\
               OSGI-INF/
source.. = src/
additional.bundles = org.eclipse.osgi.services,\
                     slf4j.api,\
                     org.eclipse.kura.api

kura.log File after installation of Bundle
2017-08-03 13:02:24,749 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - Bundle org.eclipse.kura.configurable.ConfigurableExample has started!
2017-08-03 13:02:24,762 [mToolkit Worker #0] INFO  o.e.k.c.c.ConfigurationServiceImpl - Registering metatype pid: org.eclipse.kura.example.configurable.ConfigurableExample ...
2017-08-03 13:02:24,777 [mToolkit Worker #0] INFO  o.e.k.c.c.ConfigurationServiceImpl - Seeding updated configuration for pid: org.eclipse.kura.example.configurable.ConfigurableExample
2017-08-03 13:02:24,779 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - New property - objectClass = [Ljava.lang.String;@124db3f of type class [Ljava.lang.String;
2017-08-03 13:02:24,780 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - New property - param1.string = Some Text of type class java.lang.String
2017-08-03 13:02:24,781 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - New property - kura.service.pid = org.eclipse.kura.example.configurable.ConfigurableExample of type class java.lang.String
2017-08-03 13:02:24,781 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - New property - service.pid = org.eclipse.kura.example.configurable.ConfigurableExample of type class java.lang.String
2017-08-03 13:02:24,781 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - New property - param3.integer = 2 of type class java.lang.Integer
2017-08-03 13:02:24,781 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - New property - component.name = org.eclipse.kura.example.configurable.ConfigurableExample of type class java.lang.String
2017-08-03 13:02:24,781 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - New property - param2.float = 20.5 of type class java.lang.Float
2017-08-03 13:02:24,781 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.e.c.ConfigurableExample - New property - component.id = 43 of type class java.lang.Long

OSGi "ls" command output
osgi> ls
All Components:
ID    State            Component Name            Located in bundle
1    Active        org.eclipse.equinox.event            org.eclipse.equinox.event(bid=8)
2    Active        org.eclipse.kura.data.DataService            org.eclipse.kura.core(bid=53)
3    Active        org.eclipse.kura.db.DbService            org.eclipse.kura.core(bid=53)
4    Active        org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport            org.eclipse.kura.core(bid=53)
5    Active        org.eclipse.kura.ssl.SslManagerService            org.eclipse.kura.core(bid=53)
6    Active        org.eclipse.kura.system.SystemService            org.eclipse.kura.core(bid=53)
7    Active        org.eclipse.kura.system.SystemAdminService            org.eclipse.kura.core(bid=53)
8    Active        org.eclipse.kura.certificate.CertificatesService            org.eclipse.kura.core.certificates(bid=54)
9    Active        org.eclipse.kura.cloud.CloudService            org.eclipse.kura.core.cloud(bid=55)
10    Registered        org.eclipse.kura.cloud.CloudCallService            org.eclipse.kura.core.cloud(bid=55)
11    Active        org.eclipse.kura.core.cloud.factory.DefaultCloudServiceFactory            org.eclipse.kura.core.cloud(bid=55)
12    Active        org.eclipse.kura.cloud.app.command.CommandCloudApp            org.eclipse.kura.core.cloud(bid=55)
13    Active        org.eclipse.kura.core.comm.CommConnectionFactory            org.eclipse.kura.core.comm(bid=56)
14    Active        org.eclipse.kura.core.configuration.CloudConfigurationHandler            org.eclipse.kura.core.configuration(bid=57)
15    Active        org.eclipse.kura.configuration.ConfigurationService            org.eclipse.kura.core.configuration(bid=57)
16    Active        org.eclipse.kura.crypto.CryptoService            org.eclipse.kura.core.crypto(bid=58)
17    Active        org.eclipse.kura.core.deployment.CloudDeploymentHandlerV2            org.eclipse.kura.core.deployment(bid=59)
18    Active        org.eclipse.kura.log.LoggerService            org.eclipse.kura.core.log(bid=60)
19    Active        org.eclipse.kura.status.CloudConnectionStatusService            org.eclipse.kura.core.status(bid=62)
20    Active        org.eclipse.kura.deployment.agent            org.eclipse.kura.deployment.agent(bid=63)
21    Active        org.eclipse.kura.clock.ClockService            org.eclipse.kura.linux.clock(bid=64)
22    Registered        org.eclipse.kura.command.CommandService            org.eclipse.kura.linux.command(bid=65)
23    Active        org.eclipse.kura.position.PositionService            org.eclipse.kura.linux.position(bid=66)
24    Active        org.eclipse.kura.usb.UsbService            org.eclipse.kura.linux.usb(bid=68)
25    Active        org.eclipse.kura.bluetooth.BluetoothService            org.eclipse.kura.linux.bluetooth(bid=69)
26    Active        org.eclipse.kura.watchdog.WatchdogService            org.eclipse.kura.linux.watchdog(bid=70)
27    Active        org.eclipse.kura.camel.KuraCloudComponentResolver            org.eclipse.kura.camel(bid=76)
28    Unsatisfied        org.eclipse.kura.camel.cloud.factory.CamelFactory            org.eclipse.kura.camel.cloud.factory(bid=77)
29    Active        org.eclipse.kura.camel.cloud.factory.CamelCloudServiceFactory            org.eclipse.kura.camel.cloud.factory(bid=77)
30    Active        org.eclipse.kura.camel.xml.XmlRouterComponent            org.eclipse.kura.camel.xml(bid=78)
31    Unsatisfied        org.eclipse.kura.asset            org.eclipse.kura.asset.provider(bid=79)
32    Active        org.eclipse.kura.asset.cloudlet            org.eclipse.kura.asset.cloudlet.provider(bid=80)
33    Active        org.eclipse.kura.asset.AssetService            org.eclipse.kura.asset.helper.provider(bid=81)
34    Active        org.eclipse.kura.driver.DriverService            org.eclipse.kura.driver.helper.provider(bid=82)
35    Unsatisfied        org.eclipse.kura.wire.CloudPublisher            org.eclipse.kura.wire.component.provider(bid=86)
36    Unsatisfied        org.eclipse.kura.wire.CloudSubscriber            org.eclipse.kura.wire.component.provider(bid=86)
37    Unsatisfied        org.eclipse.kura.wire.DbWireRecordFilter            org.eclipse.kura.wire.component.provider(bid=86)
38    Unsatisfied        org.eclipse.kura.wire.DbWireRecordStore            org.eclipse.kura.wire.component.provider(bid=86)
39    Unsatisfied        org.eclipse.kura.wire.Fifo            org.eclipse.kura.wire.component.provider(bid=86)
40    Unsatisfied        org.eclipse.kura.wire.Logger            org.eclipse.kura.wire.component.provider(bid=86)
41    Unsatisfied        org.eclipse.kura.wire.RegexFilter            org.eclipse.kura.wire.component.provider(bid=86)
42    Unsatisfied        org.eclipse.kura.wire.Timer            org.eclipse.kura.wire.component.provider(bid=86)
43    Unsatisfied        org.eclipse.kura.wire.WireAsset            org.eclipse.kura.wire.component.provider(bid=86)
44    Active        org.eclipse.kura.wire.WireHelperService            org.eclipse.kura.wire.helper.provider(bid=87)
45    Registered        org.eclipse.kura.wire.WireServiceCommand            org.eclipse.kura.wire.provider(bid=88)
46    Active        org.eclipse.kura.wire.WireService            org.eclipse.kura.wire.provider(bid=88)
47    Active        org.eclipse.kura.web.Console            org.eclipse.kura.web2(bid=90)
48    Active        org.eclipse.kura.gpio.GPIOService            org.eclipse.kura.linux.gpio(bid=91)
49    Active        org.eclipse.kura.emulator.Emulator            org.eclipse.kura.emulator(bid=92)
50    Active        org.eclipse.kura.net.NetworkService            org.eclipse.kura.emulator.net(bid=93)
51    Active        org.eclipse.kura.example.configurable.ConfigurableExample            org.eclipse.kura.example.configurable(bid=95)
52    Active        org.eclipse.kura.example.subscriber.Subscriber            org.eclipse.kura.example.subscriber(bid=96)

Re: Kura Configurable Example Problem [message #1770011 is a reply to message #1769824] Mon, 07 August 2017 13:53 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi,
the component should provide:

<service>
    <provide interface="org.eclipse.kura.configuration.ConfigurableComponent"/>
</service>


to be displayed in the web UI.
Re: Kura Configurable Example Problem [message #1770092 is a reply to message #1770011] Tue, 08 August 2017 09:17 Go to previous message
Erdem Tuna is currently offline Erdem TunaFriend
Messages: 9
Registered: August 2017
Junior Member
Thanks, helped a lot.
Previous Topic:ClouddeploymentHandlerV2 in unsatisfied state
Next Topic:How to see the kura run state log?
Goto Forum:
  


Current Time: Fri Apr 19 04:06:01 GMT 2024

Powered by FUDForum. Page generated in 0.23270 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top