Hardware Reference
In-Depth Information
Marple
Marple stands for the Minerva Appliance Routing and ProtocoL Engine. This is a mechanism whereby you can control
a device, such as a TV card, from a command on one machine while using the command and resources of another.
This allows you to spread the hardware load between machines or to distribute commands to remote servers that
service peripherals that are ineffective in other locations—X10 gateways, notably. The low cost of the Raspberry Pi
now makes this a very real possibility.
You can use the same mechanism to invoke software-only devices, such as WiFi-enabled media players and speech
synthesis units, allowing music to be streamed into locations where physical speaker cabling is not possible. The system
is bidirectional, so you can also get a remote machine to send any commands it gets to the main server for processing.
Marple was introduced in version 2.2.0 of Minerva and is now supported by all the current Bearskin commands
and used transparently to the user.
The Workings
There are two files necessary to enable Marple's full range of functionality, both are called devlist and exist for each
of the Bearskin commands that have been enabled. They are formatted thusly:
localhost dev /dev/dsp - -
default dev /dev/dsp - -
bedroom soap 192.168.1.123 19781 localhost
The columns are as follows, in order:
The device name : This is always the first argument to any of the Bearskin commands, such
as the bedroom in cdplayer bedroom play 1 .
Protocol type : This currently may be dev or soap . If the protocol is dev , then the protocol
device represents a Linux-style device on the local machine. If it's soap , then the device
specifies the IP address of the machine to talk to.
Protocol device : This indicates which address is to be used for the device. It's usually
a device or IP address (see the previous item).
Protocol parameter : This is used in conjuncture with the protocol device. This is mostly
unused, but in the example earlier it represents the port number associated with the
IP address.
The remote device name : When the command is being executed on the remote device, this
name is used instead of the original one given. This parameter is unused for dev protocols.
Handling Protocols
When the user invokes the cdplayer command for example (from either the Web, command line, or Cosmic), the script
will examine the local devlist file located at $MINBASE/etc/devices/cdplayer/devlist for a matching device name
in the first column. If no matching device name can be found, it then reads the global devlist file (in the same format
but located at $MINBASE/house/marple/cdplayer/devlist ) and tries again. If a match still can't be found, then the
original device name is used by cdplayer in the hope that it is application-specific and the cdplayer application can
understand it.
Once a matching device name is found (regardless of which file contained it), the device is evaluated. In the case
of dev protocols, the protocol parameter (such as /dev/dsp ) is passed back to the application for immediate use.
Search WWH ::




Custom Search