CAL-methods => CAM-rules: ( CAL-table for EPR-eDevice products )
Operation on IV’s Data Types
Hex Method Argument Boolean Numeric Character Data Description:
40 nop none No operation
41 setOFF IV • o o o Set a Boolean IV to 0 (FALSE)
42 setON IV • o o o Set a Boolean IV to 1 (TRUE)
43 getValue IV • • • o Returns the contents of the IV in a response message
44 getArray IV [│[<offset>][│<count>]] o o o • Returns count number of bytes of the data IV starting at
the offset byte. The default offset is 0 (beginning of
the data); the default count is all of the data
45 setValue IV [│<value>] • • • o Set the IV to <value>. If no value is given, then the
IV is set to the object’s default_value IV
46 setArray IV │[<offset>]│<data o o o • Stores <data> bytes into a data IV starting at an
<offset> number of bytes. The default <offset> is 0
(beginning of the IV).
47 add IV1 │IV2 [│IV3] o • o o If only IV1 and IV2 is given, then IV2=IV2+IV1. If IV3 is
given , then IV3=IV1+IV2
48 increment IV [│<number>] o • o o Increments IV by <number>. If number omitted, IV
increments by step_size IV
49 subtract IV1 │IV2 [│IV3] o • o o If only IV1 and IV2 is given, then IV2=IV2-IV1. If IV3 is
given , then IV3=IV2-IV1
4A decrement IV [│<number>] o • o o Decrements IV by <number>. If number omitted, IV
decrements by step_size IV
4B compare IV │<argument> • • • • Used to compare the magnitude of IV with <argument>
<argument> can be an IV label or a value. The Data type of IV and <argument> must be the same. Returns 1 (31 hex) if IV GT <argument>, 2 if IV LT <argument>, or 3 if IV EQ to <argument>
4E swap IV1 │IV2 • • • • Exchange the contents of IV1 and IV2. Data Types of
both arguments must be the same
4F report IV Initiates a reporting message from an Object regardless
of any predefined reporting_condition in the object.
The value reported is IV. The reporting IVs must be set
up correctly.
52 exit [<value>] Ends the current level of execution. If used within a loop
(do, while, repeat), the loop is terminated and execution
continues after the <END> token. If <value> is given ,
all parsing terminates and <value> is returned in a
response packet
53 alias <alias ID> [<string>] Used to equate a commonly used character string to a
1-byte alias ID. <alias ID> must be in the range 80-CE.
If no <string>, then the alias ID is canceled.
54 inherit IV │<value> o • o • Used to assign a <value> to a resource IV (system
address , node address, group address, data channel
number). The CAL Interpreter must hail for the resource
( except for the group address)
55 disinherit IV │<value> o • o • Used to disinherit a <value> from a resource IV.
IV must be the group address IV or a data channel IV.
<value> is a group address or data channel number that
previously been inherited.
56 if <Boolean-expr> BEGINmessage list [ELSE <message list>]END Used for condition execution of <message list> based on
the result of <Boolean-expr>. <message list> can
contain any message that is valid for the object.
<Boolean-expr> may contain any IV that is used in the
object.
57 do <Boolean-expr> BEGINmessage list END Used to perform a do-while style loop. One execution of
message list> will occur prior to testing <Boolean-
expr>. Execution of <message list> will terminate when
<Boolean-expr> evaluates false.
58 while <Boolean-expr> BEGINmessage list END Used to perform a do-while style loop. <Boolean-expr> is
tested prior to executing <message list>. Execution of
messages will terminate when <Boolean-expr>
evaluates false.
59 repeat <value> BEGINmessage list END Will repeat the execution of messages for <value>
number of times.
5A build <macro ID> BEGINmessage list END Used to create a macro identifier for one or more
messages frequently sent to an object .
< macro ID> must be in the range 80-CE.
5B copyValue argument> │IV [│<context ID<object#>] Allows copying an IV from one object to another object in
the same product. Copies <argument> to IV in the same
object or in <context ID<object#> productin the product (eDevice). <argument> is usually an IV in the object receiving this method , but can be a value.
Symbols:
GT Greather Than IV Instant variable in eDevice Object
LT Less Than ● Methods operates on this IV Data Type
EQ Equal o Methods does not support this Data Type
│ Delimiter(F5). A CAL method identifier is a 1-byte (40-7E Hex) that is followed by one or more arguments separated by <DELIMITER>token.
4C, 4D, 50, 51 and 5C-7E is spare for new possible methods
Symbols:
IV Instant variable in eDevice Object
● Methods operates on this IV Data Type
o Methods does not support this Data Type
│ Delimiter(F5). A CAL method identifier is a 1-byte (40-7E Hex) that is followed by one or more arguments separated by <DELIMITER>token.
GT Greather Than
LT Less Than
EQ Equal
The challenge is to create CAM-rules according to these defined CAL-commands for the EPR-eDevice standard ( ANSI/CEA-721 ).
CAL methods operate on Values(IV) in EPR-eDevice Objects (eDeviceOB)
Basically the CAM-rules are using XPath and we need to them to the CAL-methods.
David has given these slide decks with XPath examples for CAM-rules:
Better link to CAM-rules:
http://drrw.net/CAM/presentations/XML%20Validation%20Test%20Suite%20with%20CAMV.pptx
See also:
http://www.slideshare.net/drrwebber/xml-validation-test-suite-with-camv
The later slides have specific examples - Business Rules -> CAM rules syntax.