C
ONFIGURATION
C
OMMAND
S
ET
- F
IRMWARE
R
EVISION
2.4.0_
BETA
-
V
ERSION
1.0.0
4.3 Test your MAMBOII by creating a simple configuration
As explained in this document above events are a key part of your application logic.
Events correspond to the activities in your system MAMBOII.
For example, MAMBOII device contains
IO.BTN<index>=<time>
button events that can
be programmed to respond when the user presses a button.
If the incoming event is a button-press event, the system wants to know both which
button the user pressed and how long. In these cases, you need the number of the
button and the type of the press as additional information.
MAMBOII’s internal firmware knows the following button actions:
short-press, long-press
and double-press
.
A short-press event
occurs when a button is
pressed and released within 2
seconds
.
A long-press event
occurs when a button is
pressed and after 2 seconds
released
.
A double-press event
occurs when a button is
double pressed within 500 msec
.
When a button is pressed, the following event occurs.
IO.BTN.e<
index
>=<
time
>
<
index
>
- Identifies which button the user pressed (see figure 8):
0,1
=
MAMBOII’s button
(left, right accordingly)
2, 3 and 4 =
Keyfob
5 =
Bluetooth Headset
<
time
>
- Identifies the type of press [
short, long, double
].
Additionally, you need to know the sender of the event. Therefore, the software
provides a state which identifies the device that caused a button event.
IO.BTN.sID=<
ID
>
<
ID
> - Identifies which device caused a specific button event.
0 .. 99
= The sender of the event was Keyfob 0,1, 2 ... and so on.
100
= The sender of the event was MAMBOII device
200
= The sender of the event was Bluetooth Audio Headset.
In the following example, an application accepts a short-press event occurred from the
ON/OFF
button.
IO.BTN.e0=short
To handle button events on different devices, attach the sender of the event to the
event of the button using "
&
" conjunction.
In the following example, an application accepts a short-press event occurred from the
button 1 only if it comes from the first Keyfob (0).
IO.BTN.e1=short&IO.BTN.sID=0
The configuration you write to respond to an event is called Alarm. Each alarm MUST
include at least one event within the condition field as its source and one command
within the action field as its target. An alarm awaits the occurrence of one event and
then performs the action attached to the event that occurred. When an event occurs,
and it is available in more than one alarm, then the selection of the activity to perform
depends on the index of the alarm (
AL<
index
>
)
. The low index is selected and
executed first. In most cases, the action for an event you define yourself can be simple
notification.
IO.Beep=hpulse,1000
IEEE.Keyfob0.LED1=High,1000
The following procedure shows the steps you must take to test a simple configuration on
the MAMBOII device.
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 235 of 271