Zhoulan Zhang (zzl@cs.pitt.edu)
I.
IC Card
1.1 IC Card and IC Card Editor
Structure
The IC Card Editor
enables efficient editing of IC cards (Figure 1). It is also a good tool to
organize and manage IC cards. As shown in Figure 2, under the IC Card Editor
environment, an icCardList maintains
a list of icCardEntry, each with a
unique id, along with a group id indicating which group it belongs to.
For each icCard, it includes the following
attributes:
l
icName—
IC name.
l
icDescription—
Description for the IC
l
icIntPattern—
Interaction Pattern, can be one of the six patterns (grey, green, yellow,
orange, red, and purple)
l
icMyTask—
Task of current IC
l
icTimeCriticalCondition—
Time Critical Condition
l
icOtherName—
Name of Other IC which current IC will communicate with
l
icOtherMessage—
Message sent to Other IC
l
icOtherTask—
Other IC’s Task
l
icNumberCurrent—
i, the ith IC card (if use n IC cards to describe current IC)
l
icNumberTotal—
n, the total number of IC cards to describe current IC
Figure1. IC Card
Figure2. IC Card
Structure
1.2 IC Card XML schema
The following is an example of IC Card XML schema used
by IC Card Editor. All attributes mentioned above are set to certain values.
<icCard>
<icName content="Patient Emergenc Alert" />
<icDescription content="Patient alerts network/database of emergency" />
<icIntPattern content="myselfwith" />
<icMyTask content="Alert network/database of emergency" />
<icTimeCriticalCondition content="Tc+Talarm > Ts > Tc+Tnormal: Talarm=2*smallest
system granularity, Tnormal=smallest system granularity" />
<icOtherName content="Network/Database" />
<icOtherMessage content="Emergency Alert" />
<icOtherTask content="None" />
<icNumberCurrent content="1" />
<icNumberTotal content="1" />
</icCard>
II.
IC System Structure
2.1 IC System in MKEE
In MKEE
(Multimedia Knowledge Eclipse Environment), the Index Cell is a little
different from the IC depicted by IC Card. It can give more details than IC
Card does (Figure 3 is an example of Index Cell and its specifications). The details
for attributes are explained below:
Figure3. Index Cell in MKEE
Each Index Cell has
such properties:
n
n
Id
n
Max
Life time (cell life time, if you want a cell to be always active, set it to
“inf”)
n
Name
n
Type
An Index Cell may
have different states. To transform from one state to another state inside of an
index cell, a transition will be used. The transition properties include:
n
Id
n
Source:
initial state
n
Target:
final state
n
Type (
can be “Boundary” or “Internal”)
A transition can
include input message, output message, and actions.
The Input message has
such properties:
n
Id
n
Name
n
Predicate
(it’s the condition that establishes the state change)
Output message
properties include:
n
Id
n
Name
n
Target
IC
Both input message
and output message can carry parameters. A parameter should state:
n
Name
n
Data
Type
n
Data
Value
Besides input
message and output message, a transition involves action. The action properties
are:
n
Id
n
Name (
the name of output message name)
n
Body (
action associated to the transition)
n
Target
( it could be either “external” or “source”)
-
external:
the action doesn’t directly work on multimedia system, but it shows itself
through computations
-
source:
the action works on multimedia system without any computation
2.2 IC System XML Schema
In MEKK, there is an XML file corresponding to each IC
diagram. The following is an example of the XML schema used by MKEE IC diagram:
<?xml version="1.0"
encoding="UTF-8"?>
<ic:icSystem
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ic="http://www.mke.org/ic/">
<indexCell currentState="//@icSystem/@indexCell.0/@state.0"
id="ic1" maxLifeTime="infinity" name="Camera">
<state
name="state1-1"/>
<state
name="state1-2"/>
<transition
id="trans1" source="//@icSystem/@indexCell.0/@state.0"
target="//@icSystem/@indexCell.0/@state.1">
<message
xsi:type="ic:OutputMessage" id="msg1" name="patient's
image">
<targetIC>ic3</targetIC>
<parameter dataType="time" dataValue="Tc"
name="Tc"/>
</message>
<action
body="collect image info periodically" id="act1"
name="msg1" target="source"/>
</transition>
</indexCell>
……
</ic:icSystem>
III.
Matching between IC Card and MKEE IC System
Although there are
some differences between IC Card and IC System designed using the MKEE tool,
there are many similarities. Especially both of them can be represented by XML,
which is human-legible and facilitates
the sharing of data across different information systems.
Matching can be summarized as the following (also shown in Figure 4)
Entries in IC Card Editor |
Attributes in IC System by MKEE |
icCardEntry.id |
id |
icCard.icName |
name |
icCard.icTimeCriticalCondition |
time parameter
in messages |
icCard.icOtherName |
the target Index
Cell of output message |
icCard.icOtherMessage
|
message sent to
other Index Cell (target IC) |
icCard.icMyTask/icCard.icOtherTask |
action in
transition (internal/external) |
n
icCardEntry.id
= id;
Every icCardEntry has a unique id, since in IC System each Index Cell
should also has a unique identification (id), these two can be simply regarded
as the same.
n
icCard.icName
= name;
To make it
compatible, the IC name used in IC card is the same as in IC System.
n
icCard.icTimeCriticalCondition
= time parameter in messages
In an IC Card,
users can add timing constraints, indicating the time during which a task
should be done. In IC System, similar timing constraints can be imposed,
however, through the parameter in messages. As mentioned earlier, both an input
and output message can carry parameters, time is one type of the parameters and
can meet the just-in-time requirement.
n
icCard.icOtherName
= the target Index Cell of output message
In an IC card, if
a message will be sent to other ICs, the entry “icOtherName” should be the name
of the IC which the current IC wants to communicate with. In IC System, it is
just the target index cell of output message.
n
icCard.icOtherMessage
= message sent to other Index Cell (target index cell)
Note that there
are two message types in IC System: input message and output message. Since the
message mentioned here is sent to another Index Cell, it is of the output
message type.
n
icCard.icMyTask/icCard.icOtherTask
= action in transition (internal/boundary)
q
icMyTask
à internal
If the current IC needs to do some task all by itself,
the target of action in transition is internal, meaning the transition just
associates with its own states, having nothing to do with other ICs.
q
icOtherTask
à boundary
If the current IC needs other IC to accomplish some
task, then the target of action in transition is of boundary type.
q
icCard.icIntPattern
is also associated with action in transition.
For example, for a purple IC card, both internal and
external actions will be shown in the Index Cell in IC System.
Figure4. Matching between IC Card and IC System in MKEE
IV.
Conclusions
The XML matching
between IC Card (in IC Card Editor) and IC System (in MKEE) suggests that these
two tools are compatible.
Appendix
IC System Design for Non-Able Patient & the XML
Presentation
<?xml version="1.0" encoding="UTF-8"?>
<ic:icSystem
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ic="http://www.mke.org/ic/">
<indexCell currentState="//@icSystem/@indexCell.0/@state.0"
id="ic1" maxLifeTime="infinity"
name="Camera">
<state
name="state1-1"/>
<state
name="state1-2"/>
<transition
id="trans1" source="//@icSystem/@indexCell.0/@state.0"
target="//@icSystem/@indexCell.0/@state.1">
<message xsi:type="ic:OutputMessage"
id="msg1" name="patient's image">
<targetIC>ic3</targetIC>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<action
body="collect image info periodically" id="act1"
name="msg1" target="source"/>
</transition>
</indexCell>
<indexCell name="Sensor">
<state
name="state2-1"/>
<state
name="state2-2"/>
<transition
id="trans2" source="//@icSystem/@indexCell.1/@state.0"
target="//@icSystem/@indexCell.1/@state.1">
<message xsi:type="ic:OutputMessage"
id="msg2" name="patient's condition">
<targetIC>ic3</targetIC>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<action
body="collect info about locatioin and condition
periodically" id="act2" name="msg2, msg3"
target="source"/>
</transition>
</indexCell>
<indexCell currentState="//@icSystem/@indexCell.2/@state.0"
id="ic3" maxLifeTime="infinity"
name="Sensor Emergency Alert" type="">
<state
name="state3-1"/>
<state
name="state3-2"/>
<transition
id="trans3" source="//@icSystem/@indexCell.2/@state.0"
target="//@icSystem/@indexCell.2/@state.1">
<message xsi:type="ic:OutputMessage"
id="msg4" name="threshold reached and patient's current
info">
<targetIC>ic4</targetIC>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<message xsi:type="ic:InputMessage"
id="input1" name="msg1,msg2,msg3">
<predicate>threshold reached</predicate>
</message>
<action
body="when certain threshold is reached, send alert"
id="act3" name="msg4" target="source"/>
</transition>
</indexCell>
<indexCell currentState="//@icSystem/@indexCell.3/@state.0"
id="ic4" maxLifeTime="infinity"
name="Hospital Response">
<state
name="state4-1"/>
<state
name="state4-2"/>
<transition
id="trans5" source="//@icSystem/@indexCell.3/@state.0"
target="//@icSystem/@indexCell.3/@state.1">
<message xsi:type="ic:InputMessage"
id="input2" name="msg4">
<predicate>alert msg
received</predicate>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<message xsi:type="ic:OutputMessage"
id="msg5" name="dispatch request">
<targetIC>ic6</targetIC>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<message xsi:type="ic:OutputMessage"
id="msg7" name="inform expert">
<targetIC>ic5</targetIC>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<action
body="dispatch nurse" id="act4" name="msg5"
target="external"/>
<action
body="inform expert" id="act5" name="msg7"
target="source"/>
</transition>
</indexCell>
<indexCell currentState="//@icSystem/@indexCell.4/@state.0"
id="ic5" maxLifeTime="infinity"
name="Expert">
<state
name="state5-1"/>
<state
name="state5-2"/>
<transition
id="trans6" source="//@icSystem/@indexCell.4/@state.0"
target="//@icSystem/@indexCell.4/@state.1">
<message xsi:type="ic:InputMessage"
id="input3" name="msg7">
<predicate>patient's alert and current condition
received</predicate>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<message xsi:type="ic:OutputMessage"
id="msg9" name="instructions from expert">
<targetIC>ic6</targetIC>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<action
body="give instructions to nurse" id="act6"
name="msg9" target="external"/>
</transition>
</indexCell>
<indexCell currentState="//@icSystem/@indexCell.5/@state.0"
id="ic6" maxLifeTime="infinity"
name="Nurse" type="">
<state
name="state6-1"/>
<state
name="state6-2"/>
<transition
id="trans7" source="//@icSystem/@indexCell.5/@state.0"
target="//@icSystem/@indexCell.5/@state.1">
<message xsi:type="ic:InputMessage"
id="input4" name="msg5">
<predicate>dispatch request received</predicate>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<message xsi:type="ic:OutputMessage"
id="msg6" name="ack to
dispatch">
<targetIC>ic4</targetIC>
<parameter dataType="time" dataValue="Tc" name="Tc"/>
</message>
<action
body="ack to dispatch request"
id="act7" name="msg6" target="external"/>
<action
body="ask for expert advice" id="act8"
name="msg8" target="source"/>
</transition>
</indexCell>
</ic:icSystem>