曝光台 注意防骗
网曝天猫店富美金盛家居专营店坑蒙拐骗欺诈消费者
•! IBM contributed SODA to Eclipse OHF in March
2007:
•! Device Kit.
•! Service Activator Toolkit (SAT).
10
What is the Device Kit?
•! Enabling technology for Data Capture.
•! It provides a framework for developing
device agents.
•! Eclipse tooling for generating the
components required to interface with a
hardware device.
•! Generated code is “built out” to provide a
fully functional device agent.
•! Provides a uniform method of interfacing
to hardware devices.
•! A set of runtime components.
•! Installed as an Eclipse feature.
Pub / Sub
commands measurements signals
reader, printer,
controller, sensor, etc.
Device
Device
Agent
Connection Layer
Device Layer
Transport Layer
Profiles
GPIO Control Inventory More…
Application Agents
11
Component interaction
Device
Application
Pub / Sub
1
11
6 7
2
12
Device I/O
Connection
Transport
Profile
Device
Command Measurement Signal
Message Value Message
3 10
4 9
5 Byte stream 8
Messages
Invocations 3 10 Callbacks
Profile
12
Layers are loosely coupled and can be used
independently
Pub / Sub
Profile P1
device
Connection C1
Device D1
Transport T1
Application Agents
device
Connection C2
Device D2
Transport T2
device
Connection C3
Transport T3
device
Connection C3
Connection Service
Transport Service
Device Service
Notification Service
13
Distributed messaging in the Device Kit
•! Device Kit provides a publish/subscribe notification service.
•! An application registers itself specifying the topics in which it is interested
and publishes.
•! Micro Broker bridges messages between Data Capture and Premises
OSGi runtimes.
OSGi Event Service
Agent
Devic
e
or
Profile
OSGi Event Service
Agent
Micro Agent
Broker
Micro
MQ Telemetry Transport Broker
Notification
Service
publish subscribe
14
The Device Kit Markup Language (DKML)
•! XML markup language that defines the device controls, messages
and configuration settings used by the device agent to
communicate with and control the hardware device.
•! Transports, devices, adapters and profiles all have associated
DKML files.
•! Device Kit tooling generates transport, device, adapter and profile
code from their respective DKML files.
DKML Bundle
Projects
DKML to Java
Generator
15
Adding a temperature sensor to a tag read
location
•! Example: USB dongle from EclipseCon Device Kit tutorial:
•! Temperature sensor.
•! 2 LEDs.
•! Push-button.
•! Access via serial port.
•! Command specification:
•! Send ‘i’,device will reply ‘id: usb-gpio-v1’.
•! Send ‘t’, device will reply with ‘temp: 25.23’.
•! Send ‘b’, device will reply with button state: ‘button: 0’ or ‘button: 1’.
•! Button will send asynchronous button: messages above.
•! etc.
16
Using the Device Kit tooling to develop a new
adapter
1.! Generate skeleton bundle projects using Device Kit
wizards.
2.! Write DKML device and profile specification.
3.! Regenerate and complete transport and profile
implementation.
•! Generated transport and profile require manual coding, device
code does not.
4.! Test the new adapter for profile compliance.
5.! Export, publish and then deploy feature on Premises
Server for provisioning to Data Capture.
17
Step 1: Generate skeleton bundle projects using
Device Kit wizards
18
Step 2: Write DKML device and profile specification
<dkml>
<device id="GpioDongleDevice" packagebase="org.eclipse.soda.dk">
<command id="ReadTemperature">
<message>
<ascii>t</ascii>
</message>
</command>
<signal id="TemperatureCelciusReport">
<message>
<ascii>temp: </ascii>
<tokens>\r\n</tokens>
<parameter type="string">
<key>DegreesCelcius</key>
<index>6</index>
</parameter>
<filter>
<bytes format="hex">FF, FF, FF, FF, FF</bytes>
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:
航空资料21(4)