Mais conteúdo relacionado
Semelhante a EclipseCon 2009: TmL Tutorial (20)
EclipseCon 2009: TmL Tutorial
- 2. brought to you by
© 2009 Motorola, Inc. and Eldorado Research Institute. 2
Made available under the EPL v1.0.
- 3. presented by
Mauren Brenner (project committer)
Fabio Rigo (project contributor)
Eric Cloninger (project leader)
© 2009 Motorola, Inc. and Eldorado Research Institute. 3
Made available under the EPL v1.0.
- 4. Setting Up the
Environment for the
Hands-on Sessions
© 2009 Motorola, Inc. and Eldorado Research Institute. 4
Made available under the EPL v1.0.
- 5. Setting Up the Environment
• URL
http://www.filedropper.com/eclipsecontmltutorial
• USB drive
– TmLTutorial_Instructions.pdf (requires PDF viewer), or
– TmLTutorial_Instructions.txt (plain text)
• We’ll have a few minutes to finish
setup prior to the hands-on sessions
© 2009 Motorola, Inc. and Eldorado Research Institute. 5
Made available under the EPL v1.0.
- 6. Agenda
• TmL scope and objectives
• Overview of TmL components
• Hands-on sessions
• Feedback and discussion
© 2009 Motorola, Inc. and Eldorado Research Institute. 6
Made available under the EPL v1.0.
- 7. Hands-on Sessions
• Using the Device Framework to integrate an
emulator into Eclipse
• Using the VNC Viewer to visualize the
emulator display
• Using the Protocol Framework to implement
an echo protocol
• Using the /proc Tools to get system
information
© 2009 Motorola, Inc. and Eldorado Research Institute. 7
Made available under the EPL v1.0.
- 8. Audience
• Developers of Eclipse-based IDEs for
mobile Linux application development
• All those otherwise interested in Eclipse
for mobile, embedded or Linux
development
© 2009 Motorola, Inc. and Eldorado Research Institute. 8
Made available under the EPL v1.0.
- 9. Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute. 9
Made available under the EPL v1.0.
- 10. TmL Scope
and Objectives
© 2009 Motorola, Inc. and Eldorado Research Institute. 10
Made available under the EPL v1.0.
- 11. © 2009 Motorola, Inc. and Eldorado Research Institute. 11
Made available under the EPL v1.0.
- 12. © 2009 Motorola, Inc. and Eldorado Research Institute. 12
Made available under the EPL v1.0.
- 13. Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute. 13
Made available under the EPL v1.0.
- 14. Overview of
TmL Components
© 2009 Motorola, Inc. and Eldorado Research Institute. 14
Made available under the EPL v1.0.
- 16. What we’re going to do
© 2009 Motorola, Inc. and Eldorado Research Institute. 16
Made available under the EPL v1.0.
- 17. VNC Viewer
© 2009 Motorola, Inc. and Eldorado Research Institute. 17
Made available under the EPL v1.0.
- 18. What we’re going to do
© 2009 Motorola, Inc. and Eldorado Research Institute. 18
Made available under the EPL v1.0.
- 20. What we’re going to do
© 2009 Motorola, Inc. and Eldorado Research Institute. 20
Made available under the EPL v1.0.
- 21. /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute. 21
Made available under the EPL v1.0.
- 22. What we’re going to do
© 2009 Motorola, Inc. and Eldorado Research Institute. 22
Made available under the EPL v1.0.
- 23. QEMU Puppy Linux Emulator
• A small Linux distro we’ll use for the
exercises
• http://www.puppylinux.org/
• http://www.erikveen.dds.nl/qemupuppy/
© 2009 Motorola, Inc. and Eldorado Research Institute. 23
Made available under the EPL v1.0.
- 24. Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute. 24
Made available under the EPL v1.0.
- 25. Setting Up the Environment
• USB drive
– TmLTutorial_Instructions.pdf (requires PDF viewer), or
– TmLTutorial_Instructions.txt (plain text)
• Import project
– org.eclipsecon.tml.puppy
© 2009 Motorola, Inc. and Eldorado Research Institute. 25
Made available under the EPL v1.0.
- 26. Hands-on Session 1:
Using the Device Framework
to Integrate an Emulator
into Eclipse
© 2009 Motorola, Inc. and Eldorado Research Institute. 26
Made available under the EPL v1.0.
- 27. Session 1: Device Framework
• Objective
– Explore the device framework to create a
device to represent a QEMU emulator
running Linux puppy
• Exercise
– Create a device plug-in to represent a Linux
puppy emulator
– Define services to start and stop this emulator
– Define a wizard to create instances
© 2009 Motorola, Inc. and Eldorado Research Institute. 27
Made available under the EPL v1.0.
- 28. Session 1: Device Framework
• Exercise Steps
– Step 1: Create the Device Type extension
– Step 2: Define device handler and launcher
– Step 3: Define state machine (start service)
– Step 4: Define state machine (stop service)
– Step 5: Wizard
– Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 28
Made available under the EPL v1.0.
- 29. Session 1: Device Framework
Step 1: Create the Device Type extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 29
Made available under the EPL v1.0.
- 30. Session 1: Device Framework
Step 1: Create the Device Type extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 30
Made available under the EPL v1.0.
- 31. Session 1: Device Framework
Step 1: Create the Device Type extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 31
Made available under the EPL v1.0.
- 32. Session 1: Device Framework
Step 1: Create the Device Type extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 32
Made available under the EPL v1.0.
- 33. Session 1: Device Framework
Step 2: Define device handler and launcher
© 2009 Motorola, Inc. and Eldorado Research Institute. 33
Made available under the EPL v1.0.
- 34. Session 1: Device Framework
Step 2: Define device handler and launcher
© 2009 Motorola, Inc. and Eldorado Research Institute. 34
Made available under the EPL v1.0.
- 35. Session 1: Device Framework
Step 2: Define device handler and launcher
© 2009 Motorola, Inc. and Eldorado Research Institute. 35
Made available under the EPL v1.0.
- 36. Session 1: Device Framework
Step 3: Define state machine (start service)
© 2009 Motorola, Inc. and Eldorado Research Institute. 36
Made available under the EPL v1.0.
- 37. Session 1: Device Framework
Step 3: Define state machine (start service)
© 2009 Motorola, Inc. and Eldorado Research Institute. 37
Made available under the EPL v1.0.
- 38. Session 1: Device Framework
Step 3: Define state machine (start service)
© 2009 Motorola, Inc. and Eldorado Research Institute. 38
Made available under the EPL v1.0.
- 39. Session 1: Device Framework
Step 3: Define state machine (start service)
© 2009 Motorola, Inc. and Eldorado Research Institute. 39
Made available under the EPL v1.0.
- 40. Session 1: Device Framework
Step 4: Define state machine (stop service)
© 2009 Motorola, Inc. and Eldorado Research Institute. 40
Made available under the EPL v1.0.
- 41. Session 1: Device Framework
Step 4: Define state machine (stop service)
© 2009 Motorola, Inc. and Eldorado Research Institute. 41
Made available under the EPL v1.0.
- 42. Session 1: Device Framework
Step 4: Define state machine (stop service)
© 2009 Motorola, Inc. and Eldorado Research Institute. 42
Made available under the EPL v1.0.
- 43. Session 1: Device Framework
Step 4: Define state machine (stop service)
© 2009 Motorola, Inc. and Eldorado Research Institute. 43
Made available under the EPL v1.0.
- 44. Session 1: Device Framework
Step 5: Wizard
© 2009 Motorola, Inc. and Eldorado Research Institute. 44
Made available under the EPL v1.0.
- 45. Session 1: Device Framework
Step 5: Wizard
© 2009 Motorola, Inc. and Eldorado Research Institute. 45
Made available under the EPL v1.0.
- 46. Session 1: Device Framework
Step 5: Wizard
© 2009 Motorola, Inc. and Eldorado Research Institute. 46
Made available under the EPL v1.0.
- 47. Session 1: Device Framework
Step 5: Wizard
© 2009 Motorola, Inc. and Eldorado Research Institute. 47
Made available under the EPL v1.0.
- 48. Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 48
Made available under the EPL v1.0.
- 49. Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 49
Made available under the EPL v1.0.
- 50. Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 50
Made available under the EPL v1.0.
- 51. Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 51
Made available under the EPL v1.0.
- 52. Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 52
Made available under the EPL v1.0.
- 53. Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute. 53
Made available under the EPL v1.0.
- 54. Hands-on Session 2:
Using the VNC Viewer
to Visualize
the Emulator Display
© 2009 Motorola, Inc. and Eldorado Research Institute. 54
Made available under the EPL v1.0.
- 55. Session 2: VNC Viewer
• Objective
– Integrate Puppy Emulator with VNC Viewer
• Exercise
– Connect the Puppy Emulator created in Session 1
into VNC view
© 2009 Motorola, Inc. and Eldorado Research Institute. 55
Made available under the EPL v1.0.
- 56. Session 2: VNC Viewer
• Exercise Steps
– Step 1: Update state machine (connect)
– Step 2: Update state machine (disconnect)
– Step 3: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 56
Made available under the EPL v1.0.
- 57. Session 2: VNC Viewer
Step 1: Update state machine (connect)
© 2009 Motorola, Inc. and Eldorado Research Institute. 57
Made available under the EPL v1.0.
- 58. Session 2: VNC Viewer
Step 1: Update state machine (connect)
© 2009 Motorola, Inc. and Eldorado Research Institute. 58
Made available under the EPL v1.0.
- 59. Session 2: VNC Viewer
Step 1: Update state machine (connect)
© 2009 Motorola, Inc. and Eldorado Research Institute. 59
Made available under the EPL v1.0.
- 60. Session 2: VNC Viewer
Step 1: Update state machine (connect)
© 2009 Motorola, Inc. and Eldorado Research Institute. 60
Made available under the EPL v1.0.
- 61. Session 2: VNC Viewer
Step 2: Update state machine (disconnect)
• Follow the same steps to define an operation to
disconnect the VNC client from the emulator, using:
– Service
org.eclipse.tml.service.vncviewer.unplugVncViewerService
– States
• startId : IDLE-VNC
• endId : IDLE
• haltId : IDLE-VNC
© 2009 Motorola, Inc. and Eldorado Research Institute. 61
Made available under the EPL v1.0.
- 62. Session 2: VNC Viewer
Step 3: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 62
Made available under the EPL v1.0.
- 63. Session 2: VNC Viewer
Step 3: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 63
Made available under the EPL v1.0.
- 64. Session 2: VNC Viewer
Step 3: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 64
Made available under the EPL v1.0.
- 65. Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute. 65
Made available under the EPL v1.0.
- 66. Hands-on Session 3:
Using the Protocol Framework
to Implement a Simple
Echo Protocol
© 2009 Motorola, Inc. and Eldorado Research Institute. 66
Made available under the EPL v1.0.
- 67. Session 3: Protocol Framework
• Objective
– Explore the protocol framework to create a
service to implement the client side of a
communication protocol
• Exercise
– Implement an echo protocol client using TmL
protocol framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 67
Made available under the EPL v1.0.
- 68. Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 68
Made available under the EPL v1.0.
- 69. Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 69
Made available under the EPL v1.0.
- 70. Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 70
Made available under the EPL v1.0.
- 71. Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 71
Made available under the EPL v1.0.
- 72. Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 72
Made available under the EPL v1.0.
- 73. Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 73
Made available under the EPL v1.0.
- 74. Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 74
Made available under the EPL v1.0.
- 75. Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute. 75
Made available under the EPL v1.0.
- 76. Session 3: Protocol Framework
• Exercise Steps
– Step 1: Create a Protocol Definition extension
– Step 2: Create the Message extensions
– Step 3: Create a Message Direction extension
– Step 4: Create a toolbar action
– Step 5: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 76
Made available under the EPL v1.0.
- 77. Session 3: Protocol Framework
Step 1: Create a Protocol Definition extension
org.eclipse.tml.protocol.protocolDefinition
© 2009 Motorola, Inc. and Eldorado Research Institute. 77
Made available under the EPL v1.0.
- 78. Session 3: Protocol Framework
Step 1: Create a Protocol Definition extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 78
Made available under the EPL v1.0.
- 79. Session 3: Protocol Framework
Step 1: Create a Protocol Definition extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 79
Made available under the EPL v1.0.
- 80. Session 3: Protocol Framework
Step 1: Create a Protocol Definition extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 80
Made available under the EPL v1.0.
- 81. Session 3: Protocol Framework
Step 2: Create the Message extensions
org.eclipse.tml.protocol.protocolMessage
© 2009 Motorola, Inc. and Eldorado Research Institute. 81
Made available under the EPL v1.0.
- 82. Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute. 82
Made available under the EPL v1.0.
- 83. Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute. 83
Made available under the EPL v1.0.
- 84. Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute. 84
Made available under the EPL v1.0.
- 85. Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute. 85
Made available under the EPL v1.0.
- 86. Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute. 86
Made available under the EPL v1.0.
- 87. Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute. 87
Made available under the EPL v1.0.
- 88. Session 3: Protocol Framework
Step 3: Create a Message Direction extension
org.eclipse.tml.protocol.protocolMessageDirection
© 2009 Motorola, Inc. and Eldorado Research Institute. 88
Made available under the EPL v1.0.
- 89. Session 3: Protocol Framework
Step 3: Create a Message Direction extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 89
Made available under the EPL v1.0.
- 90. Session 3: Protocol Framework
Step 3: Create a Message Direction extension
© 2009 Motorola, Inc. and Eldorado Research Institute. 90
Made available under the EPL v1.0.
- 91. Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute. 91
Made available under the EPL v1.0.
- 92. Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute. 92
Made available under the EPL v1.0.
- 93. Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute. 93
Made available under the EPL v1.0.
- 94. Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute. 94
Made available under the EPL v1.0.
- 95. Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute. 95
Made available under the EPL v1.0.
- 96. Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute. 96
Made available under the EPL v1.0.
- 97. Session 3: Protocol Framework
Step 5: Run the exercise
• Run the plug-in as an Eclipse application
• Start the emulator instance and connect it
to the VNC Viewer
• Launch the Echo Server available at the
emulator
– Open the console
– cd /root
– ./echoServer 10000
© 2009 Motorola, Inc. and Eldorado Research Institute. 97
Made available under the EPL v1.0.
- 98. Session 3: Protocol Framework
Step 5: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 98
Made available under the EPL v1.0.
- 99. Session 3: Protocol Framework
Step 5: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute. 99
Made available under the EPL v1.0.
- 100. Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute. 100
Made available under the EPL v1.0.
- 101. Hands-on Session 4:
Using the /proc Tools to
Get System Information
© 2009 Motorola, Inc. and Eldorado Research Institute. 101
Made available under the EPL v1.0.
- 102. Session 4: /proc Tools
• Objective
– Explore the /proc tools views on Eclipse
• Exercise
– Connect to an emulator running Linux using
/proc tools and TCF agent
© 2009 Motorola, Inc. and Eldorado Research Institute. 102
Made available under the EPL v1.0.
- 103. Session 4: /proc Tools
• Run the org.eclipsecon.tml.puppy
plug-in as an Eclipse application and
start the emulator
• Start the /proc tools server on the
emulator (/root/tcf_Debug/agent)
© 2009 Motorola, Inc. and Eldorado Research Institute. 103
Made available under the EPL v1.0.
- 104. Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute. 104
Made available under the EPL v1.0.
- 105. Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute. 105
Made available under the EPL v1.0.
- 106. Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute. 106
Made available under the EPL v1.0.
- 107. Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute. 107
Made available under the EPL v1.0.
- 108. Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute. 108
Made available under the EPL v1.0.
- 109. Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute. 109
Made available under the EPL v1.0.
- 110. Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute. 110
Made available under the EPL v1.0.
- 111. Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute. 111
Made available under the EPL v1.0.
- 112. Feedback
and
Discussion
© 2009 Motorola, Inc. and Eldorado Research Institute. 112
Made available under the EPL v1.0.
- 113. © 2009 Motorola, Inc. and Eldorado Research Institute. 113
Made available under the EPL v1.0.