Plugins

Quick links.
  1. Introduction
  2. Currently available plugins
  3. Want more ?

Introduction

The Java version of the emulator uses a plugin architecture.
The emulator can run without any plugin and will just reply to head unit commands enough to make the SPDIF input available.
The active plugins are defined in the TLCDCEmu.properties file (text file). The syntax is :
Plugins=[plugin1Class, [plugin2Class[, ...]]]
All events coming from HU are dispatched to all plugins in turn.
All plugins are given the opportunity to store a reference to the current PlayingStatus object, that they are allowed to read and modify. Warning though, if multiple Plugins are modifying that object, result is undefined

Currently available plugins

Logical Plugin 

Class

org.tlcdcemu.plugin.logical.LogicalPlugin

Status

Obsolete

Purpose

This plugins simulates an actual 20-track CDs of 60 minutes (20 x 3 minutes) is playing, taking passing time into account, and responds in a logical manner to HU commands (change tracks, ffwd, etc.). So if you let your HU connected to the emulator with the Logical Plugin, you'll see track increment every 3 minutes. If you press FFWD, time passes 5 times faster. If you press NEXT, the emulator skips to start of next track, etc.

Changes the playing status ?

Yes

GUI Plugin 

Class

org.tlcdcemu.plugin.gui.GUIPlugin

Status

For debugging only

Purpose

This plugin opens a debug window showing received messages and allowing to fetch and display the current playing status, and modify it as well.

Changes the playing status ?

Yes

Executor Plugin

Class

org.tlcdcemu.plugin.executor.ExecutorPlugin

Status

OK

Purpose

This plugin executes external programs (optionally with arguments) for each HU event. All commands are defined by default in the file ExecutorPlugin.properties and have the following syntax :
<HU_EVENT>=<program> [<arguments>]
e.g.
EVENT_NEXT=C:\\Windows\\notepad.exe C:\\Windows\\system.ini
(Note that backslash characters must be escaped by doubling them)
An event can be explicitely ignored by defining it as follows :
<HU_EVENT>=/

Changes the playing status ?

No

RoadRunner Plugin

Class

org.tlcdcemu.plugin.roadrunner.RRPlugin

Status

OK

Purpose

This plugin is specifically targetted at RoadRunner, an excellent carPC front-end developed by Guino.
First, each HU event can be associated to a RoadRuner command tto be executed. All commands are defined in the file RRPlugin.properties and have the following syntax :
<HU_EVENT>=<rrcommand>
e.g.
EVENT_NEXT=NEXT
Possible values for <rrcommand> are defined at the end of file "Skin Commands.txt" included with RoadRunner.
An event can be explicitely ignored by defining it as follows :
<HU_EVENT>=/
Second, the plugin also refreshes the track number of the playing status according to the position of the currently played song in Winamp.

Changes the playing status ?

Yes

Want more ?

Well, more plugins are on their way, but you can write yours too.
Simply extend the org.tlcdcemu.plugin.Plugin class and override methods as you like. The most useful one is onCommand() of course.


Support This Project if you feel it deserves it... This project is hosted by SourceForge.net Logo

Document made with Nvu