Patent Document

CROSS-REFERENCE TO RELATED APPLICATIONS  
       [0001]    The present application claims the benefits of U.S. provisional patent application No. 60/425,121 filed Nov. 8, 2002, which is hereby incorporated by reference. 
     
    
     
       TECHNICAL FIELD  
         [0002]    The present invention relates generally to configuring and controlling electronic devices connected to a network.  
         BACKGROUND  
         [0003]    With the advent of computer technology, the heart of any computer is the microprocessor or microcontroller. The addition of these key parts to any device or appliance can convert them into small computers. Software code integrated into the microprocessors enables a device or appliance to perform automated tasks without external control. These components that are integrated into pre-existing machines are often referred to as “embedded systems”. Along with microprocessors, other hardware components such as memory can add further robustness to otherwise simple machines. Physical space available in these pre-existing machines is often limited however, so whatever storage is available must be used efficiently.  
           [0004]    Connecting many embedded systems on a network allows for communication between the embedded systems. Computer networking focuses on having a number of processors communicate and share information with one another, as well as the utilization of such systems by remote devices. Taking it a step further, embedded systems in communication with other systems may be thought of as a distributed data processing system. In such a distributed system, the results of embedded system networking lead to the design of applications systems. Information gathered from one system on the network could affect the states of other systems. For example, the closing of a light switch may initiate the lowering of a television set&#39;s volume. The software in the microprocessor of one embedded system often relies on knowledge of other system&#39;s states to perform certain tasks.  
           [0005]    The software embedded in each embedded system or device must be structured in such a way to facilitate inter-network communication. Current network programming structures use compiler based languages for the source program and compilers to convert the source program into machine code. While these programming structures allow for communicating and controlling information, the format is complex and requires additional memory. Storage space is already limited so the requirement for extra storage space can increase costs. In the field, compiler based programming languages are generally difficult to configure and are not readily adaptable device or network changes.  
           [0006]    Accordingly, it is an object of the present application to obviate or mitigate some or all of the above disadvantages.  
         SUMMARY  
         [0007]    In one aspect of the present invention, there is provided a method for configuring and controlling a plurality of interconnected electronic devices defining a network, said method comprising:  
           [0008]    selecting at least one of said plurality of electronic devices as a local node;  
           [0009]    defining at least one local virtual variable having a value representative of a state of said local node;  
           [0010]    defining the non-selected devices as remote nodes; each remote node having at least one remote virtual variable having a value representative of a state thereof, each said remote virtual variable being reported on said network in response to a change in said value of said remote virtual variable;  
           [0011]    providing said local node with at least one action using said local virtual variable and said remote virtual variable;  
           [0012]    executing said action in response to said reporting of said remote virtual variable, said action changing said value of said local virtual variable; and  
           [0013]    modifying said state of said local node according to said value of said local virtual variable.  
           [0014]    In another aspect of the present invention, there is further provided a network interconnecting a plurality of electronic devices for their configuration and control, said network comprising:  
           [0015]    at least one of said plurality of electronic devices being a local node including a controller, a memory and at least one local virtual variable having a value representative of a state of said local node; said local virtual variable being stored in said memory of said local node;  
           [0016]    the non-selected electronic devices being remote nodes including a controller and a memory, the memory having stored therein at least one remote virtual variable having a value representative of a state of said remote node, said remote virtual variable being reported by said controller of said remote node on said network in response to a change in said value of said remote virtual variable; and  
           [0017]    at least one action being stored in said memory of said local node for execution by said controller of said local node, the action using said local virtual variable and said remote virtual variable;  
           [0018]    wherein said controller of said local node is so configured as to execute said action stored in said memory of said local node in response to the reporting of said remote virtual variable, said action changing said value of said local virtual variable and modifying said state of said local node according to said value of said local virtual variable. 
       
    
    
     BRIEF DESCRIPTION OF THE FIGURES  
       [0019]    Embodiments of the invention will be described by way of example only with the help of the accompanying figures.  
         [0020]    [0020]FIGS. 1 a  and  1   b  are the virtual variable general characteristics property parameters.  
         [0021]    [0021]FIGS. 2 a ,  2   b  and  2   c  are the virtual variable reporting type property parameters.  
         [0022]    [0022]FIGS. 3 a  to  3   f  are the virtual variable default value/value range property parameters.  
         [0023]    [0023]FIG. 4 is a flowchart illustrating the method of creating a virtual variable.  
         [0024]    [0024]FIGS. 5 a  and  5   b  show respectively simplified illustrations of the communication between two nodes having two different data variable types of a prior art system and the system in accordance with an embodiment of the present invention.  
         [0025]    [0025]FIG. 6 shows the parameters of the remote virtual variable descriptor.  
         [0026]    [0026]FIGS. 7 a  and  7   b  show the differences between compiled languages and interpreted languages.  
         [0027]    [0027]FIG. 8 shows a simplified schematic of a system of two nodes, a switch and a lamp and their respective data variables.  
         [0028]    [0028]FIGS. 9 a  and  9   b  show the virtual variable general characteristics property parameters of the virtual variables for the system of FIG. 8.  
         [0029]    [0029]FIGS. 10 a  and  10   b  show the virtual variable reporting type property parameters of the virtual variables for the system of FIG. 8.  
         [0030]    [0030]FIGS. 11 a  to  11   e  show the virtual variable default value/value range property parameters of the virtual variables for the system for FIG. 8.  
         [0031]    [0031]FIG. 12 shows the parameters of the remote virtual variable descriptor for the system of FIG. 8.  
         [0032]    [0032]FIGS. 13 a  and  13   b  show respectively the pseudocode and the actual code of an example program for the system of FIG. 8. 
     
    
       [0033]    Table 1 is a listing of the virtual variable value types.  
         [0034]    Table 2 is a listing of measurement units.  
         [0035]    Table 3 is a listing of the token values.  
       DETAILED DESCRIPTION  
       [0036]    In standard programming structures, actions are performed on data variables. Before describing the structure of the program, the data variables will be defined. These data variables represent states and conditions of features relevant to the type of node. Examples of features include a temperature sensor of a thermostat, a state of a light switch or the volume of a television set. These data variables will from herein be defined as virtual variables.  
         [0037]    Virtual Variable Properties  
         [0038]    As mentioned earlier, virtual variables (V 2) represent states or conditions of a node. They may be created by the manufacturer of the node or by the system installer. On a network, nodes have access to read the information provided by the V   2  of every node and may use this information to control node parameters. The structure of the variables comprises several properties: general characteristics, V 2  reporting type, default value/value range and other properties. These will be described in more details.  
         [0039]    Virtual Variable (V 2) General Characteristics    
         [0040]    The general characteristics of a V 2  are stored within two bytes. FIG. 1 a  shows the most significant byte of the general characteristics ( 10 ) and FIG. 1 b  shows the least significant byte of the general characteristics ( 11 ). Byte ( 10 ) contains information relating to volatility ( 12 ), manufacturer ( 13 ), output ( 14 ) and V 2  type ( 15 ). Byte ( 11 ) includes the following fields: Normal Read ( 16 ), Normal Write ( 17 ), Manufacturer Read Secured ( 18 ), Manufacturer Write Secured ( 19 ), Visible V 2  bit ( 20 ) and Reserved bits ( 21 ).  
         [0041]    Bit  7  of byte ( 10 ) describes the volatility ( 12 ) of the V 2  value. If set to one, the V 2  is initialized to a default value or to 0 depending on the configuration of the default value/value range property. If set to zero, the V 2  is initialized to the value stored in the node&#39;s flash memory. The exception is data V 2  that are always directly stored in flash memory. Bit 6 is the Manufacturer bit ( 13 ) and an indication of the source of the V 2 . If set to one, the manufacturer has created the V 2 . Otherwise, it indicates that it has been created in the field. Bit  5  is the Output bit ( 14 ) and describes where the V 2  is mapped. If it is set, the V 2  may be mapped to an output peripheral. Otherwise, the V 2  is mapped to an input peripheral. If mapped to an input peripheral, the V 2 &#39;s value cannot be changed by the system software. Bits  0 - 4  describe the V 2  type ( 15 ). This property is discussed later.  
         [0042]    Bits  4  to  7  of byte ( 11 ) deal with security and encryption. Bit  7  ( 16 ) of byte ( 11 ) is the Normal Read ( 16 ) property. If bit  7  ( 16 ) is set, the V 2  may be read without using any specific encryption key when the network is not encrypted, otherwise the Public Key is required. If bit ( 16 ) is not set, the V 2  cannot be read. Bit  6  is the Normal Write ( 17 ) property. If this bit is set, the V 2  may be written to without using any specific encryption key in the case the network is not encrypted, otherwise the Public Key is required. If this bit is not set, the V 2  cannot be written to. Bit  5  is the Manufacturer Read Secured bit ( 18 ). If this bit is set, the V 2  value may be read using the manufacturer key. This key is a manufacturer-defined encryption key and is used to protect secured properties and V 2  that are specific to the manufacturer. If neither the Manufacturer Read Secured bit ( 18 ) nor the Normal Read bit ( 16 ) is set, the V 2  value cannot be read from the communication medium. Bit  4  is the Manufacturer Write Secured bit ( 19 ). If this bit is set, the V 2  value may be written to using the manufacturer key. If neither the Manufacturer Write Secured bit ( 19 ) nor the Normal Write bit ( 17 ) is set, the V 2  value cannot be read from the communication medium. Bit  3  is the Visible V 2  ( 20 ) bit. When this bit is not set, an external application may hide the V 2  from the user&#39;s view. Otherwise, the V 2  may be shown. This is to avoid showing basic V 2  calculations used by the manufacturer in its manufacturer logic. This bit is for information purposes only, thus its value is not processed by the device&#39;s protocol. Bits  0  to  2  are Reserved bits ( 21 ) and are set to 0. They are available for use for future applications.  
         [0043]    Earlier it was mentioned that bits  0  to  4  of byte ( 10 ) described the V 2  type ( 15 ). Table 1 lists possible V 2  types. These types include a boolean type (represents either true or false values), an unsigned character, a signed integer, a signed long integer, a floating-point number, a data variable and a string variable. The boolean and unsigned character are both one byte long; the signed integer is two bytes long; and the signed long integer and the floating number are both four bytes long. The length of the data and string V 2  value types varies from 0 to 246 bytes.  
         [0044]    V 2  Reporting  
         [0045]    The V 2  reporting property is used to define how V 2 &#39;s values are reported. FIG. 2 a  shows the five-byte property definition ( 40 ) and its contents including byte  0 , the First Byte Field ( 41 ), bytes  1  and  2 , Report_Parameter_ 1  ( 42 ) and bytes  3  and  4 , Report_Parmeter_ 2  ( 43 ).  
         [0046]    [0046]FIG. 2 b  shows the First Byte Field ( 41 ) definition including bit  7 , which is an unused field ( 44 ), bit  6  that indicates Serial Peripheral Interface (SPI) Reporting ( 45 ), bit  5  that indicates Universal Asynchronous Receiver-Transmitter (UART) Reporting ( 46 ) and bits  0  to  4  that indicate the Medium Reporting Type ( 47 ). In this embodiment, two standard serial ports are used: an SPI and a UART.  
         [0047]    If bit  6 , the SPI Reporting ( 45 ) field is set, then the V 2  value is reported on the SPI port every time its value changes. If this bit is cleared, the V 2  value is never reported on the SPI port. If bit  5 , the UART Reporting ( 46 ) field is set, then the V 2  value is reported on the UART interface every time its value changes. If this bit is cleared, the V 2  value is never reported on the UART interface. Bits  0  to  4  correspond to the Medium Reporting Type ( 47 ) field. This value determines how the V 2  value is reported to the medium so that other devices on the network receive its value when required. The Medium Reporting Type ( 47 ) field and the Report Parameter_ 1  ( 42 ) and the Report_Parameter_ 2  ( 43 ) fields (bytes  1  to  4  of the V 2  Reporting property) are set according to the table shown in FIG. 2 c . There are four different Medium Reporting Types: None ( 51 ), Heartbeat ( 52 ), Delta ( 53 ) and Percentage ( 54 ). When the V 2  is never reported, None ( 51 ) is selected and the value in the Medium Reporting Type ( 47 ) field is 00 (hexadecimal notation). When Heartbeat ( 52 ) is selected, the device reports the V 2  value at a fixed rate or period. The value in the Medium Reporting Type ( 47 ) field is 01. When Delta ( 53 ) is selected, the device will report the V 2  value every time it changes by a specific value (delta). Delta 0 indicates that the V 2  value is reported every time its value changes. The value in the Medium Reporting Type ( 47 ) field is 0 2 . When Percentage ( 54 ) is selected, the device will report the V 2  value only if it has changed by at least a specified percentage of its current value. A percentage of 0 means that the V 2  is reported every time its value changes.  
         [0048]    V 2  Default Value/Value Range  
         [0049]    This property specifies a V 2 &#39;s default value and its value range including minimum and maximum values. The default value is loaded at power-up for V 2  stored in volatile memory. FIGS. 3 a  and  3   b  show this twelve-byte property. FIG. 3 a  shows the V 2  default value/value range property ( 60 ) for the data V 2 . Bytes  0 ,  2 - 12  are Not used fields ( 61 ). Byte  1  specifies the physical length of the data V 2 . This physical length corresponds to the flash memory space reserved for the V 2 &#39;s if its value type is data. This V 2  type does not have a default value. FIG. 3 b  shows the V 2  default value/value range property for all other V 2 &#39;s ( 63 ). Byte  0  contains the First Byte Field ( 64 ), bytes  1  to  4  contain the Default value ( 65 ), bytes  5  to  8  contain the Minimum Value ( 66 ) and bytes  9  to  12  contain the Maximum Value ( 67 ).  
         [0050]    [0050]FIG. 3 c  gives the breakdown of First Byte Field ( 64 ). Bit ( 68 ) is the Default Specified ( 68 ) field, bit  6  is the Min/Max Specified ( 69 ) field and bits  0 - 5  are not used. To specify a default value, the Default Specified ( 68 ) bit must be set, and the Default ( 65 ) field must be filled with a proper default value. The default value must be consistent with the V 2 &#39;s value type. This same principle also applies for the Min/Max Specified ( 69 ) field. To specify a value range for the V 2 &#39;s value, the Min/Max Specified ( 69 ) bit must be set and the Minimum Value and Maximum Value fields must be filled with the proper minimum and maximum values for the V 2 . The minimum and maximum values must be consistent with the V 2 &#39;s value type.  
         [0051]    [0051]FIGS. 3 d ,  3   e  and  3   f  specify the Default Value ( 65 ), Minimum Value ( 66 ) and Maximum Value ( 67 ) fields for the various V 2  types including boolean, unsigned character, signed integer, signed long integer and floating-point number. The value formats for each type correspond to their lengths. Both boolean and unsigned character are one-byte long; the signed integer is two bytes long; and the signed long integer and floating-point number are four bytes long. These lengths are constant for the Default Value ( 65 ), Minimum Value ( 66 ) and the Maximum Value ( 67 ).  
         [0052]    Other Properties  
         [0053]    Along with the properties described earlier, the following properties are also associated with V 2 &#39;s.  
         [0054]    The V 2  Hardware Mapping property maps a V 2  to a hardware peripheral. Each element in this property is a one byte field that corresponds to a particular input or output peripheral.  
         [0055]    The Units of Measure property specifies the V 2 &#39;s measurement unit in relation to mass, area, temperature, electrical parameters, etc. These units are for information purposes only, thus its value is not processed by the device&#39;s protocol. Table  2  gives a detailed list of the various units.  
         [0056]    The Name property stores personalized descriptors for the V 2 &#39;s, i.e. fan speed, volume level, light switch status, etc. The Name property is used to describe each V 2 , not to identify it.  
         [0057]    Identification is done using a V 2  identification (ID) number. Each of the properties discussed so far is grouped in multi-element, two-dimensional arrays. The ID is given by the element index of the V 2  in the array, where the first ID has an ID of zero. For example, the V 2  whose configuration details are stored in the fifth element of the above properties has a V 2  ID of  4 . This ID is used to refer to a particular V 2  in the programming logic scenarios.  
         [0058]    Creating and Deleting V 2 &#39;s  
         [0059]    It is possible to create a V 2  on either a local device or a remote one. The process is outlined in FIG. 4 and involves the definition of the V 2  properties described earlier. The first step is to choose a V 2  ID ( 75 ). As described earlier, the first V 2  must have an ID of 0 and all subsequent V 2 &#39;s must follow numerically (ID  1  for the second V 2 , ID  2  for the third V 2 , etc). This is important since, in the present embodiment, the chosen ID matches the corresponding element index of the two-dimensional array of V 2  properties. If an ID is skipped, by the device&#39;s controller ignores all V 2 &#39;s having an ID greater than the skipped one. The second step involves defining a name ( 76 ) for the V 2 . This name is only a descriptor for the V 2  and is not used in the programming logic. The third step involves defining the reporting characteristics ( 77 ). Details on the reporting characteristics were given in FIG. 2. The fourth step involves defining the mapping characteristics ( 78 ). As described earlier, each V 2  is mapped to a particular input or output peripheral. Each input and output peripheral has a property ID similar to a V 2 . This ID is given in the one byte V 2  Hardware Mapping field. The fifth step involves defining the default value and range (minimum and maximum values) ( 79 ). Details of this were given in FIG. 3. The sixth step defines the unit of measure ( 80 ) relating to the particular V 2 . The units are chosen among those defined in Table  2 . The seventh and last step involves defining the V 2  General Characteristics property ( 81 ). These were outlined and described earlier in FIG. 1. They include, the V 2  type and security/encryption features. It is important to configure the V 2  General Characteristics property ( 81 ) after configuring the other six properties. If this does not happen, the V 2 &#39;s behavior may be erroneous until all properties are correctly configured.  
         [0060]    To delete a V 2 , the corresponding element in the V 2  General Characteristics should be set to FFFFh. If a V 2  is deleted however, the node&#39;s controller ignores all V 2 &#39;s having an ID greater than the deleted one. This is due to the way the controller scans the V 2 &#39;s: it checks all elements in the V 2 &#39;s General Characteristics starting from element  0 , and increments until it finds an element having the FFFFh value.  
         [0061]    Remote Virtual Variable Descriptor  
         [0062]    [0062]FIGS. 5 a  and  5   b  demonstrate an example system of two nodes, a switch and a lamp that each have one data variable. Each of these data variables use two different data variable value types. FIG. 5 a  shows a prior art system. This system consists of two nodes, switch A ( 85 ) and lamp A ( 87 ). Switch A&#39;s ( 85 ) data variable ( 86 ) is based on the boolean value type. It is in communication with lamp A ( 87 ) whose data variable is based on the unsigned character value type ( 90 ). To enable communication between the two nodes, the manufacturer of lamp A ( 87 ) must add the capability of receiving boolean value types. This data variable must be designed into the product. Therefore, the manufacturer must add a boolean value type receiver ( 88 ) to lamp A ( 87 ). The manufacturer must also add the necessary hardware logic complying to the system manufacturer&#39;s programming structure. For any product that has to communicate with different value types, corresponding value type receivers must be added by the product manufacturer. The product manufacturer must have advance knowledge of the devices and more specifically the remote data variables to which its product will be bound. It is difficult, therefore, for the end-user or system installer to make changes to the program specifications at a later time.  
         [0063]    [0063]FIG. 5 b  shows a system similar to the system of FIG. 5 a  in accordance with an embodiment of the present invention. This system consists of two nodes, switch B ( 91 ) and lamp B ( 93 ). Switch B&#39;s ( 91 ) data variable ( 92 ) is based on a boolean value type. It is in communication with lamp B ( 93 ) whose V 2  is based on the unsigned character value type. A remote V 2  descriptor ( 94 ), that is part of the network programming language structure of the present invention, may accept a V 2  of any value type. It is possible to include more than one remote V 2  descriptor ( 94 ) to support a plurality of remote V 2 .  
         [0064]    [0064]FIG. 6 shows the format of the Remote V 2  Descriptor ( 94 ). Bytes  0  and  1  contain the node address ( 97 ), byte  2  contains the V 2  ID ( 98 ) and byte  3  contains the V 2  value type ( 99 ). Value types were described in FIG. 2. The V-Logic may be set up by the system installer or the end-user, therefore it may be written in the field and the product manufacturer does not need to know details about the system that installs its product. Any V 2  may bind to other V 2 &#39;s of a plurality of devices without these devices having prior knowledge of the remote devices and their V 2 &#39;s.  
         [0065]    Programming L gic Language  
         [0066]    The properties of V 2 &#39;s have been described in detail. These variables contain information related to the features of each node. To have a user or other nodes access and control this information, the network requires a communication process. Machine code will execute instructions based on user requirements. This code however requires explicit knowledge of the machine processes. A programming language that may be understood and executed by an end user is required. For machine understanding, the programming language needs to be converted to a form that is readable to their processors. The methods of program conversion and execution of a user&#39;s program may be classified into two basic techniques: 1) compilation and execution, or 2 interpretation. These two techniques are shown in simplified form in FIGS. 7 a  and  7   b , respectively. FIG. 7 a  demonstrates the case of compilation and execution ( 100 ). Here the source program A ( 101 ) represents a programming language that requires compilation to translate it into machine code. This source program A ( 101 ) is converted to a compiled code using a compiler ( 102 ). The machine processor A ( 103 ), may then execute the instructions of the source program since the compiled code is machine readable. The compiler takes the source program ( 101 ) and translates it into executable files of binary machine code by the compiler ( 102 ). Once the binary code has been generated, it is stored in memory and the machine processor A ( 103 ) may execute it directly without looking at the source program ( 101 ) again. This method improves efficiency and saves time, but it is difficult to create code such as source program A ( 101 ). Knowledge of programming fundamentals is necessary since compiled languages may be difficult to program in. FIG. 7 b  shows the case of interpretation ( 104 ). Due to the programming structure of source program B ( 105 ), no compiling is needed. The source program B ( 105 ) is interpreted directly by the machine processor ( 106 ). The interpreter within machine processor B ( 106 ) translates and executes each statement of the source program B ( 105 ) before translating and executing the next one. As a result, no memory is required to store intermediate code, making it cost-effective. The execution time may be relatively slower, but with the current range of available high-speed controllers, delays are not an issue. Also, creating code for source program B ( 105 ) is usually simpler than using a compilation language.  
         [0067]    The programming language used for reading and controlling the V 2 &#39;s is an interpreted language. This language facilitates the creation of operational scenarios or logic between devices. All the devices in the network contain variable logic (V-Logic) as well as an interpreter to execute operations defined in the language.  
         [0068]    Since all V-Logic scenarios are stored in flash memory, they may be reprogrammed in the field to enhance or update device functionality. The manufacturer may define it (mainly to define a device&#39;s local behavior), or the installer and end-user (to define the interaction between devices in a network). This gives more flexibility for the system installer or end-user to configure and program their devices according to their requirements as opposed to the manufacturers. To implement a V-Logic scenario, the Manufacturer Variable Logic or the Field Variable Logic property must be filled with a data string following the language format described below. It describes the syntax of the variable logic language following a BNF (Backus-Naur Form) format.  
         [0069]    The format of a variable logic script contains a list of actions followed by an ‘END’ token to indicate the end of the script.  
                                                   &lt;V-Logic&gt;::= &lt;Action List&gt;&lt;END Token&gt;                      
 
         [0070]    The Action List is defined as a list of zero, one or several actions. There are different types of actions including IF and Conditional Statements, Timer, Computational, and Miscellaneous Actions. Each action corresponds to a particular token and each token has a hexadecimal value associated with it.  
         [0071]    The following information provides the formats of the various actions attributed to the V-Logic language. Prior to describing these actions, it is necessary to introduce some common V-Logic elements.  
         [0072]    Common Elements  
         [0073]    &lt;V 2 &gt; 
         [0074]    Some actions can use both local or remote V 2 &#39;s while some other actions use only local V 2 &#39;s.  
         [0075]    &lt;Local V 2 &gt; 
         [0076]    A local V 2  is a V 2  present in the local device. Its corresponding ID identifies it. The format is:  
                                                   &lt;Local V 2 &gt; ::= &lt;Local V 2  Token&gt;&lt;Local V 2  ID&gt;           &lt;Local V 2  ID&gt; ::= &lt;00h...2Fh&gt;           &lt;Remote V 2 &gt;                      
 
         [0077]    A remote V 2  is a V 2  present in a remote device. Its ID corresponds to the index of the element where the information about this V 2  is stored in the Remote V 2  descriptor property array.  
                                                   &lt;Remote V 2 &gt; ::= &lt;Remote V 2  Token&gt;&lt;Remote V 2  cID&gt;           &lt;Remote V 2  ID&gt;::= &lt;00h...2Fh&gt;           &lt;Const&gt;                      
 
         [0078]    Constant values are used in most V-Logic actions.  
                                                   &lt;Const&gt; ::= &lt;Const Token&gt;&lt;Const Type&gt;&lt;Data&gt;           &lt;Const Type&gt; ::= &lt;Boolean Token&gt;| &lt;Unsigned Char           Token&gt;|&lt;Signed Integer Token&gt;|&lt;Signed Long Token&gt;|&lt;Float           Token&gt;|(&lt;Data Token&gt;&lt;Data Length&gt;)           &lt;Data Length&gt; ::= &lt;00h...F6h&gt;           &lt;Data&gt; ::= Constant value according to the specified data type.           &lt;Value&gt;                      
 
         [0079]    A value is a V 2  value or a constant.  
         [0080]    &lt;Timer&gt; 
         [0081]    A V-Logic scenario can use up to 8 timers that are identified by &lt;Timer&gt; when using timer-related actions or flags.  
                                                   &lt;Timer&gt; ::=&lt;00h...07h&gt;           &lt;Timer Value&gt;                      
 
         [0082]    Since a timer decrements from an initial value loaded by a Start Timer action, the timer value can be loaded in a V2 to retrieve the value of a timer, running or not, or be used to trigger actions or events.  
         [0083]    The timer value can be used in several V-Logic actions:.  
                                                   &lt;Timer Value&gt; ::= &lt;Timer Value Token&gt; &lt;Timer ID&gt;           &lt;Timer Value Token&gt; ::= &lt;16h&gt;           &lt;Timer ID&gt; ::= &lt;00h...07h&gt;           &lt;IF&gt; Statement, Conditions and Arguments           &lt;IF&gt; Statement                      
 
         [0084]    A variable logic IF statement contains the condition description and the actions and the actions to be executed if this conditions&#39; value is greater than zero. An IF can contain an Action List, which can contain other IF&#39;s (as can be seen in the definition of the &lt;Action List&gt; element). This recursive concept gives the possibility to express interwoven IFs. It is also possible to associate ELSEIF and ELSE statements to an IF statement:  
                                                             &lt;IF&gt;::= &lt;IF Token&gt;&lt;Condition&gt;&lt;Action List&gt;                (&lt;ELSEIF Token&gt;&lt;Condition&gt;&lt;Action List&gt;)           [&lt;ELSE Token&gt;&lt;Action List&gt;]           &lt;END Token&gt;                      
 
         [0085]    Conditions  
         [0086]    A condition is defined as a relational expression, a logical expression or an argument:  
         &lt;Condition&gt;::=[&lt;NOT Token&gt; ](&lt;Logical Expression&gt; |&lt;Relational Expression&gt;)  
         [0087]    A logical expression contains a logical operator and multiple conditions:  
                                             &lt;Logical Expression&gt; ::= (&lt;AND Token&gt;&lt;Relational Expression&gt; +                (&lt;Relational Expression&gt;)&lt;END Token&gt;)|           (&lt;OR Token&gt;&lt;Relational Expression&gt; +           (&lt;Relational Expression&gt;)&lt;END Token&gt;)|           (&lt;XOR Token&gt;&lt;Relational Expression&gt; +           (&lt;Relational Expression&gt;)&lt;END Token&gt;)                      
 
         [0088]    A relational expression contains a logical operator and multiple conditions. These include Greater Than Equal (GTE), Greater Than (GT), Less Than. Equal (LTE), Less Than (LT), Equal (EQ), Not Equal (NEQ). The format for this is as follows:  
                                                             &lt;Relational Expression&gt; ::= (&lt;GTE Token&gt;&lt;Value&gt;&lt;Value&gt;)|                (&lt;GT Token&gt;&lt;Value&gt;&lt;Value&gt;)|           (&lt;LTE Token&gt;&lt;Value&gt;&lt;Value&gt;)|           (&lt;LT Token&gt;&lt;Value&gt;&lt;Value&gt;)|           (&lt;EQ Token&gt;&lt;Value&gt;&lt;Value&gt;)|           (&lt;NEQ Token&gt;&lt;Value&gt;&lt;Value&gt;)|           &lt;Argument&gt;                      
 
         [0089]    The &lt;Value&gt; token can be any V 2  type except for the data V 2 .  
         [0090]    Arguments  
         [0091]    An &lt;Argument&gt; can be defined by a Timer&#39;s Status, a V 2 &#39;s value status, a boolean V 2 &#39;s value, a boolean constant or the TRUE and FALSE tokens:  
                                                   &lt;Argument&gt; ::=           &lt;OnTimerRunning&gt;|&lt;OnTimerExpired&gt;|&lt;OnValueChanged&gt;|           &lt;50msPassed&gt;|&lt;TRUE Token&gt;|&lt;FALSE Token&gt;|&lt;Value&gt;                      
 
         [0092]    The &lt;OnValueChanged&gt; flag is set to TRUE when a V 2 &#39;s value is written to (either by a variable-logic action, a message from a local host or from a remote device, or a change in a hardware peripheral state). The flag is reset to FALSE at the end of the Manufacturer variable-logic&#39;s execution. The format for this argument is:  
                                                   &lt;OnValueChanged&gt; ::= &lt;Value Changed Token&gt;&lt;V 2 &gt;                      
 
         [0093]    If the V 2 &#39;s value is set by a variable logic action, the flag is set to TRUE even if the new value is equal to the previous one.  
         [0094]    The &lt;OnTimerRunning&gt; flag is TRUE if the specified timer is currently running. It is set to FALSE when the timer expires and when it is stopped. The format for this argument is:  
                                                   &lt;OnTimerRunning&gt; ::= &lt;Timer Running Token&gt;&lt;Timer&gt;                      
 
         [0095]    The &lt;OnTimerExpired&gt; flag is set to TRUE when the specified timer expires. The format is:  
                                                   &lt;OnTimerExpired&gt; ::= &lt;Timer Expired Token&gt;&lt;Timer&gt;                      
 
         [0096]    The &lt;50 msPassed flag is set every 50 ms. The flag is reset to FALSE at the end of the Manufacturer variable logic&#39;s execution. The format is:  
                                                   &lt;50msPassed&gt; ::= &lt;50ms Token&gt;                      
 
         [0097]    Timer Actions  
         [0098]    The variable logic language supports up to eight software timers, which can be used to control the duration of an action or the persistence of an input, to debounce a logic state, etc. The state of a timer can be read using the &lt;OnTimerExpired&gt; and &lt;OnTimerRunning&gt; flags. By default at startup, both flags are false for all timers.  
         [0099]    &lt;Start Timer&gt; 
         [0100]    The &lt;Start Timer&gt; action loads a timer with the &lt;Timer Duration&gt; value and starts the timer. After this action is called, the &lt;OnTimerRunning&gt; flag is set to TRUE and the &lt;OnTimerExpired&gt; flag is set to false. The format is:  
                                                   &lt;Start Timer&gt; ::= &lt;Start Timer Token&gt;&lt;Timer&gt;&lt;Timer Duration&gt;           &lt;Timer Duration&gt; ::= &lt;Value&gt;                      
 
         [0101]    The &lt;Timer&gt; parameter represents the ID of the timer to be started. The &lt;TimerDuration&gt; is in increments of 50 ms and it supports the signed integer value type.  
         [0102]    &lt;Disable Timer&gt; 
         [0103]    The &lt;Disable Timer&gt; action stops the timer and the &lt;OnTimerRunning&gt; and &lt;OnTimerExpired&gt; flags are set to FALSE. The format is:  
                                                   &lt;Disable Timer&gt; ::= &lt;Disable Timer Token&gt;&lt;Timer&gt;                      
 
         [0104]    The &lt;Timer&gt; parameter represents the ID of the timer to be stopped.  
         [0105]    Computational Actions  
         [0106]    &lt;Assign&gt; 
         [0107]    The &lt;Assign&gt; action copies the contents of a source V 2  or constant, into a destination V 2 . If different V 2  types are used, the values are typecasted as in C code. The format is:  
                                                   &lt;Assign&gt; ::= &lt;Assign Token&gt;&lt;V 2 &gt;&lt;Value&gt;                      
 
         [0108]    In C language, the action would be represented as follows: V 2 =Value;  
         [0109]    The &lt;V 2 &gt; parameter represents V 2 &#39;s to which a value is assigned. The &lt;Value&gt; parameter represents values assigned to the V 2 &#39;s. All value types are supported by these two parameters.  
         [0110]    &lt;Add&gt; 
         [0111]    The &lt;Add&gt; action adds one or more values directly to a destination V 2 . If different V 2  types are used, the values are typecasted as in C code. The format is:  
                                                   &lt;Add&gt; ::= &lt;Add Token&gt;&lt;V 2 &gt;(&lt;Value&gt;)+ &lt;End Token&gt;                      
 
         [0112]    In C language, the action would be represented as follows:  
                                                   V 2  = V 2  + Value_1 + Value_2 + ...+ Value_N;                      
 
         [0113]    The &lt;V 2 &gt; parameter represents V 2 &#39;s to which values are added. The &lt;Value&gt; parameter represents value(s) added to the V 2 &#39;s. The value types are supported by these two parameters are the unsigned char, signed integer, signed long integer and floating point.  
         [0114]    &lt;Subtract&gt; 
         [0115]    The &lt;Subtract&gt; action subtracts one or more values directly from a target V 2 . If different V 2  types are used, the values are typecasted as in C code. The format is:  
                                                   &lt;Subtract&gt; ::= &lt;Subtract Token&gt;&lt;V 2 &gt;(&lt;Value&gt;)+ &lt;End Token&gt;                      
 
         [0116]    In C language, the action would be represented as follows:  
                                                   V 2  = V 2  − Value_1 − Value_2 − ...− Value_N;                      
 
         [0117]    The &lt;V 2 &gt; parameter represents V 2 &#39;s from which values are subtracted. The &lt;Value&gt; parameter represents value(s) subtracted to the V 2 &#39;s. The value types are supported by these two parameters are the unsigned char, signed integer, signed long integer and floating point.  
         [0118]    &lt;Multiply&gt; 
         [0119]    The &lt;Multiply&gt; action multiplies the content of a V 2  by one or several values. If different V 2  types are used, the values are typecasted as in C code. The format is:  
                                                   &lt;Multiply&gt; ::= &lt;Multiply Token&gt;&lt;V 2 &gt;(&lt;Value&gt;)+ &lt;End Token&gt;                      
 
         [0120]    In C language, the action would be represented as follows:  
                                                   V 2  = V 2  * Value_1 * Value_2 * ...* Value_N;                      
 
         [0121]    The &lt;V 2 &gt; parameter represents V 2 &#39;s multiplied by the values. The &lt;Value&gt; parameter represents value(s) used to multiply the V 2 &#39;s value. The value types are supported by these two parameters are the unsigned character, signed integer, signed long integer and floating point.  
         [0122]    &lt;Divide&gt; 
         [0123]    The &lt;Divide&gt; action divides the content of a V 2  by one or several values. If different V 2  types are used, the values are typecasted as in C code. The format is:  
                                                   &lt;Divide&gt; ::= &lt;Divide Token&gt;&lt;V 2 &gt;(&lt;Value&gt;)+ &lt;End Token&gt;                      
 
         [0124]    In C language, the action would be represented as follows:  
                                                   V 2  = V 2 /(Value_1 * Value_2 * ...* Value_N);                      
 
         [0125]    The V 2 &gt; parameter represents V 2 &#39;s divided by the values. The &lt;Value&gt; parameter represents values used to divide the V 2 &#39;s value. The value types are supported by these two parameters are the unsigned char, signed integer, signed long integer and floating point.  
         [0126]    Miscellaneous Actions  
         [0127]    &lt;Force Report&gt; 
         [0128]    The &lt;Force Report&gt; action forces the device to report a V 2 &#39;s value on the medium. If the SPI Reporting bit is set in the V 2  Reporting property, the V 2  is also reported on the SPI interface. If the UART Reporting bit is set in the V 2  Reporting property, the V 2  is also reported on the UART interface. The format is:  
                                                   &lt;Force Report&gt; ::= &lt;Force Report Token&gt;&lt;Local V 2 &gt;                      
 
       EXAMPLES  
       [0129]    The following example illustrates, in detail, the format of the V-Logic programming structure.  
         [0130]    [0130]FIG. 8 shows an example of a network of two nodes: node A ( 110 ) and node B ( 112 ). Node A ( 110 ) has a network address of ‘00 01h’ and node B ( 112 ) has a network address of ‘00 02h’. Node A ( 110 ) contains a dimmer circuit ( 111 ) provided with a controller ( 111   a ) and a memory ( 111   b ). The state of node A ( 110 ) is represented by the V 2 &#39;s of dimmer ( 111 ). The V 2 &#39;s, named Raise Intensity and Lower Intensity, are defined as Remote V 2 &#39;s who&#39;s values indicate if the intensity is to be raised or lowered, and have V 2  IDs of 00h and 01h, respectively. The values of the Raise Intensity and Lower Intensity V 2 &#39;s may be set, for example, by corresponding buttons or switches. Node B ( 112 ) contains a lamp ( 113 ) provided with a controller ( 113   a ) and a memory ( 113   b ). The state of node B ( 112 ) is represented by the V 2  of lamp ( 113 ). The V 2 , named Lamp Intensity, is defined as a Local V 2  who&#39;s value indicates the intensity level of lamp ( 113 ), and has V 2  ID of 00h. In one embodiment of this example, the controller ( 113   a ) is so configured that the lamp&#39;s ( 113 ) intensity increases from 0 to a maximum intensity of 100% at a rate of 1% every 50 milliseconds (ms), by raising the value of Local V 2  Lamp Intensity, when the Remote V 2  Raise Intensity is on. If the Remote V 2  Raise Intensity is off, the lamp&#39;s ( 113 ) intensity will stay at the last known state before the Remote V 2  Raise Intensity was turned off. Similarly, turning Remote V 2  Lower Intensity on or off will have the reverse effects.  
         [0131]    Before proceeding further, it may be useful to examine the properties of the V 2 &#39;s of FIG. 8. For concision purposes, for dimmer ( 113 ) we will only examine the Raise Intensity V 2 . FIG. 9 a  shows the most significant byte of the general characteristics ( 10 ) applied to this example. The format of this property follows that as shown in FIGS. 1 a  and  1   b . The V 2  properties of each node are shown including the dimmer&#39;s ( 111 ) Raise Intensity V 2  and the lamp&#39;s ( 113 ) Lamp Intensity V 2 . The Volatility ( 12 ) property is set to 1 for both dimmer&#39;s ( 111 ) Raise Intensity V 2  and the lamp&#39;s ( 113 ) Lamp Intensity V 2  meaning that the default values are stored in each of the V 2 &#39;s respective default value property ( 60 ). The Manufacturer ( 13 ) property is set to 1 for the dimmer&#39;s ( 111 ) Raise Intensity V 2  as the manufacturer of the dimmer&#39;s ( 111 ) created the dimmer&#39;s ( 111 ) V 2 &#39;s. The lamp&#39;s ( 113 ) Lamp Intensity V 2  however was created in the field and is a field V 2 . The output property ( 14 ) for both the dimmer&#39;s ( 111 ) Raise Intensity V 2  and the lamp&#39;s ( 113 ) Lamp Intensity V 2  are set to one. This indicates that both of these V2&#39;s are mapped to output peripherals such as a bus or cable. This is necessary for communicating the value of the V 2 s. The value type of the dimmer&#39;s ( 111 ) Raise Intensity V 2  is boolean and is represented as such according to the value types table of Table 1. The value in the value type ( 15 ) property of byte ( 10 ) is given as ‘00000′. The value type of the lamp&#39;s ( 113 ) Lamp Intensity V 2  is unsigned character and its representation in the value type ( 15 ) property of byte ( 10 ) is ‘00001′.  
         [0132]    [0132]FIG. 9 b  shows the least significant byte of the general characteristics ( 11 ). The first property of this byte ( 11 ) is the Normal Read ( 16 ) property. This property is set to one for both V 2 s. If it is not set, then the V 2  cannot be read. The Normal Write ( 17 ) property is also set for both V 2 s. If it is not set, then the V 2  cannot be written to. Both the Manufacturer Read Secured ( 18 ) property and the Manufacturer Write Secured property ( 19 ) must also. be set for all V 2 s, otherwise the V 2  cannot be read or written to. The Visible V 2  property ( 20 ) is set to one for both V 2 s. It is unnecessary to hide the V 2 s to the user. Reserved bits ( 21 ) are for future used and not used, therefore these bits are set to ‘000′ for both V 2 s.  
         [0133]    [0133]FIGS. 10 a  and  10   b  show the V 2  reporting property for both the dimmer&#39;s ( 111 ) and the lamp&#39;s ( 113 ) V 2 s. The format of this property follows that is shown in FIGS. 2 a  and  2   b . FIG. 10 a  shows the five-byte property definition ( 40 ). The first byte field of the V 2  Reporting property ( 41 ) is ‘62h’ in hexadecimal notation for both of the V 2 s. FIG. 10 b  gives an explanation of this value. The Report_Parameter_ 1  field ( 42 ) and the Report._Parameter_ 2  field ( 43 ) are both set to zero. Further explanations are given below.  
         [0134]    Bit 7 of the first byte field ( 44 ) is not used, and is therefore set to zero. Bit 6 is the SPI Reporting field ( 45 ) and bit 5 is the UART Reporting field ( 46 ). These fields are both set to one for both V 2 s since it was explained. in the output property ( 14 ) of the general characteristics that both of the V 2 s are coupled to output peripherals including the two standard serial ports. The Medium Reporting Type property ( 47 ) is set to ‘00010′ for both V 2 s. FIG. 3 c  gives a detailed explanation of the Medium Reporting Type property ( 47 ). The Medium Reporting Type for this example is Delta ( 50 ) for both of the V 2 s. In the case of the dimmer&#39;s ( 111 ) Raise Intensity V 2 , because it is a boolean value type, it&#39;s Report_Parameter_ 1  ( 42 ) and Report_Parameter_ 2  ( 43 ) fields are always interpreted as Delta 0. This indicates that the dimmer&#39;s ( 111 ) Raise Intensity V 2  is reported every time its value changes. These fields are then set to zero. In the case of the lamp&#39;s ( 113 ) Lamp Intensity V 2 , its value must also be reported every time it changes to ensure that is has not reached its maximum value. Once it does reach its maximum value, it is not necessary to increment it any further. Fields ( 42 ) and ( 43 ) are both set to zero.  
         [0135]    [0135]FIG. 11 a  is the V 2  default value/value range property ( 63 ). The format of this property follows that as shown in FIGS. 3 b  to  3   f . The First Byte field of both V 2 s is set to ‘C0h’ for both V 2 s. The Default field ( 65 ) for the dimmer&#39;s ( 111 ) Raise Intensity V 2  is given as ‘01 00 00 00h’. The Default field ( 65 ) for the lamp&#39;s ( 113 ) Lamp Intensity V 2  is given as ‘32 00 00 00h’. The Details on the values of the First Byte field of the V 2  default value/value range property ( 64 ), Default field ( 65 ), Minimum Value field ( 66 ) and Maximum Value field ( 67 ) are given in FIGS. 11 b ,  11   c ,  11   d  and  11   e  respectively.  
         [0136]    The Default Specified field ( 68 ) and the Min/Max Specified field ( 69 ) must both be set to one to indicate that default, minimum and maximum fields are given. The remaining bits in this field are not used and therefore set to zero. The resulting byte is ‘11000000’ or ‘C0’ in hexadecimal notation. Both V 2 s have the same First Byte field ( 64 ).  
         [0137]    The Default field ( 65 ). specifies the exact default value. The dimmer&#39;s ( 111 ) Raise Intensity V 2  has two states: on or off. If the default is the ‘on’ state, the default value is ‘01h’. The lamp&#39;s ( 113 ) Lamp Intensity V 2  has fully on, fully off and different levels of intensity states in between. If the default is 50% intensity, then the default is ‘32h’. Bytes  2 ,  3  and  4  of the Default Value Format are not used and therefore set to zero.  
         [0138]    The Minimum Value field ( 66 ) specifies the minimum value in the range of values of the particular V 2 . The minimum value of the dimmer&#39;s ( 111 ) Raise Intensity V 2  is off or ‘00h’. The minimum value of the lamp&#39;s ( 113 ) Lamp Intensity V 2  is off or ‘00h’. Bytes  2 ,  3  and  4  of the Default Value Format are not used and therefore set to zero.  
         [0139]    The Maximum Value field ( 67 ) specifies the maximum value in the range of values of the particular V 2 . The maximum value of the dimmer&#39;s ( 111 ) Raise Intensity V 2  is on or ‘01h’. The maximum value of the lamp&#39;s ( 113 ) Lamp Intensity V 2  is on or ‘64h’. Bytes  2 ,  3  and  4  of the Default Value Format are not used and therefore set to zero.  
         [0140]    [0140]FIG. 12 shows the Remote V 2  Descriptor ( 94 ) of the dimmer&#39;s ( 111 ) Raise Intensity V 2  since it is a remote V 2 . This Remote V 2  Descriptor ( 94 ) is contained within node B ( 112 ). The format of this property was described in FIG. 6. The dimmer&#39;s ( 111 ) Raise Intensity V 2  is a V 2  belonging to node A ( 110 ) and its two-byte node address ( 97 ) is given as ‘00 01h’ from FIG. 8. The V 2  ID ( 98 ) is ‘00h’ and the V 2  Value Type ( 99 ) is boolean. In hexadecimal notation, 00h represents the boolean value type.  
         [0141]    [0141]FIG. 13 a  gives the associative program in pseudocode for the raising of the lamp&#39;s ( 113 ) intensity, again for simplicity, the program for the lowering of the lamp&#39;s ( 113 ) intensity being similar. Lines ( 115 ) to ( 120 ) detect the transition of dimmer&#39;s ( 111 ) Raise Intensity V 2  and initiate the timer. Lines ( 121 ) to ( 124 ) deal with incrementing the lamp&#39;s ( 113 ) intensity. The first line of this code ( 115 ) determines if there is a change in the dimmer&#39;s ( 111 ) Raise Intensity V 2  status, i.e. the dimmer&#39;s ( 111 ) Raise Intensity V 2  is turned from on to off or off to on. The second line ( 116 ) is a nested IF statement and assuming there is a change in the dimmer&#39;s ( 111 ) Raise Intensity V 2  status, it determines if the transition of dimmer&#39;s ( 111 ) Raise Intensity V 2  is from off to on. The third line ( 117 ) initiates the ramp timer to 50 ms assuming that there was a dimmer&#39;s ( 111 ) Raise Intensity V 2  transition and it was from off to on. The fourth line ( 118 ) initializes the lamp ( 113 ) intensity to 0%. Line ( 119 ) closes the IF block started by line ( 116 ). Line ( 120 ) closes the IF block started by line ( 115 ). Line ( 121 ) determines if the dimmer&#39;s ( 111 ) Raise Intensity V 2  is still on, if the timer has expired and if the lamp&#39;s ( 113 ) Lamp Intensity V 2  is still less than the maximum intensity. If all these conditions are true, then line ( 122 ) goes on to increment the lamp&#39;s ( 113 ) Lamp Intensity V 2  by 1%. Line ( 123 ) restarts the ramp timer to count for 50 ms. Line ( 124 ) ends the IF block started by line ( 121 ).  
         [0142]    [0142]FIG. 13 b  gives the actual V-logic program listing for node B ( 112 ). Node B ( 112 ) is the local node and node A ( 110 ) is the remote node. The lamp&#39;s ( 113 ) Lamp Intensity V 2  represents the local V 2  and the dimmer&#39;s ( 111 ) Raise Intensity V 2  is a remote V 2 . Line ( 135 ) is the V-Logic code representing line ( 115 ). Line ( 135 ) begins with the &lt;IF Token&gt; ( 136 ), followed by the action statement &lt;Value Changed Token&gt; ( 137 ) and the V 2  information. The &lt;Remote V 2  Token&gt; ( 138 ) identifies the switch state as a remote V 2  and the &lt;V 2  ID&gt; ( 139 ) identifies the particular V 2  of the remote node. Line ( 140 ) represents line ( 116 ). By writing the code using only an &lt;IF Token&gt; ( 136 ) and a V 2  token, it is implied that the V 2  is in its default state (in this case true or on). This is only true in the case of boolean value types. Line ( 141 ) represents line ( 117 ).  
         [0143]    The &lt;Start Timer Token&gt; ( 142 ) initiates the timer action. The &lt;Timer&gt; ( 143 ) token specifies the identification of the particular timer. The &lt;Timer Duration&gt; ( 144 ) token, as the name implies, specifies the duration of the timer. As stated in Table 2, the &lt;Timer Duration&gt; token is in increments of 50 ms. Line ( 145 ) represents line ( 118 ). This line initializes the lamp&#39;s ( 113 ) Lamp Intensity V 2  to a value of zero. The &lt;Assign Token&gt; ( 146 ) is an action statement that assigns a value to a V 2 . The value is being assigned to the lamp&#39;s ( 113 ) Lamp Intensity V 2  that is a local V 2 , thus the &lt;Local V 2 &gt; token is used ( 147 ) as well as its corresponding V 2  ID ( 148 ). The type of value is a constant and the format of this is described further in Table 2. It includes the &lt;Const Token&gt; ( 149 ), the constant type and the value. The &lt;Unsigned Char Type Token&gt; ( 150 ) identifies the type of constant as an unsigned character and &lt;Value&gt; ( 151 ) gives the value of the constant. Line ( 152 ) ends the IF block started by line ( 135 ) by using an &lt;End Token&gt; ( 153 ) and line ( 154 ) ends the IF block started by line ( 140 ) by also using &lt;End Token&gt; ( 153 ). Lines ( 155 ), ( 156 ), ( 157 ), ( 159 ) and ( 162 ) represent line ( 121 ). Line ( 155 ) consists of &lt;IF Token&gt; ( 136 ) and the &lt;AND Token&gt; ( 156 ). According to the structure of the programming language, the relational expressions that follow a logical expression are all bound by the logical expression. An &lt;END Token&gt; ( 153 ) signifies the end of the group of relational expressions. In this case, there are three relational expressions that must be satisfied in order to proceed: the dimmer&#39;s ( 111 ) Raise Intensity V 2  should be on, the timer ( 143 ) should be expired and the lamp&#39;s ( 113 ) Lamp Intensity V 2  should be less than 100%. Line ( 157 ) examines the state of the dimmer&#39;s ( 111 ) Raise Intensity V 2  as seen by the lamp ( 113 ), thus justifying the use of the &lt;Remote V 2  Token&gt; ( 138 ).  
         [0144]    As described earlier, Line ( 158 ) checks for timer expiration by using the &lt;Timer Expired Token&gt; ( 159 ) along with the ID of the appropriate timer with the &lt;Timer&gt; ( 143 ) token. Line ( 160 ) is a relational expression that examines if the local V 2 , the lamp&#39;s ( 113 ) Lamp Intensity V 2  is less than a given value, in this case, one hundred. This line ( 160 ) begins with the Less Than logical operator, &lt;LT Token&gt; ( 161 ), followed by the subject of the operation. The lamp ( 113 ) is the local node, so the &lt;Local V 2  Token&gt; ( 147 ) and its corresponding ID ( 148 ) are used. The value in question is a constant value. As explained for line ( 145 ), the format for a constant expression includes the &lt;Const Token&gt; ( 149 ), the constant type and the value. Again the &lt;Unsigned Char Type Token&gt; is selected and the &lt;Value&gt; ( 162 ) represents one hundred in hexadecimal notation. Line ( 163 ) ends the block of relational expressions started by the &lt;AND Token&gt; ( 156 ) of line ( 155 ) with an &lt;END Token&gt; ( 153 ).  
         [0145]    Assuming that all of the conditions of the &lt;AND&gt; block are met, the lamp&#39;s ( 113 ) intensity increments by one. Line ( 164 ) is similar in construct to line ( 160 ). The computational action statement for addition is represented by the &lt;Add Token&gt; ( 165 ). This statement is followed by the relational expression that is the subject of the addition and the amount to be added. The lamp&#39;s ( 113 ) Lamp Intensity V 2  is a local V 2 , so the &lt;Local V 2  Token&gt; ( 147 ) and its corresponding ID ( 148 ) represents this. The number one is represented in the same way as the number one hundred through the use of the &lt;Const Token&gt; ( 149 ), the &lt;Unsigned Char Type Token&gt; ( 150 ) and the &lt;Value&gt; ( 166 ) represents one in hexadecimal notation. After the incrementing of the lamp&#39;s ( 113 ) Lamp Intensity V 2 , the timer must be started up again for another 50 ms. Line ( 167 ) is the same as line ( 141 ). The &lt;Start Timer Token&gt; ( 142 ) initiates the timer. The ID of the particular timer is given by the &lt;Timer&gt; ( 143 ) token and the duration of the timer, in increments of 50 ms, is given with the &lt;Timer Duration&gt; ( 144 ) token. Line ( 168 ) ends the IF block started by line ( 155 ) with an &lt;END Token&gt; ( 153 ) and line ( 169 ) ends the entire block of V-Logic code for this example with another &lt;END Token&gt; ( 153 ).  
         [0146]    Further examples of configurations and control scenarios, which may be addressed using the V-Logic programming structure, are illustrated by FIGS. 14 a ,  15   a  and  16   a.    
         [0147]    [0147]FIG. 14 a  shows an example of a network of two nodes: node A ( 210 ) and node B ( 212 ). Node A ( 210 ) has a network address of ‘00 01h’ and node B ( 212 ) has a network address of ‘00 02h’. Node A ( 210 ) contains a remote control ( 211 ) provided with a controller ( 211   a ) and a memory ( 211   b ) for controlling Node B ( 212 ), which contains a television ( 213 ) provided with a controller ( 213   a ) and a memory ( 213   b ). The state of node A ( 210 ) is represented by the V 2 &#39;s of the remote control ( 111 ). The V 2 &#39;s, named Pwr_Button, Vol_Up, Vol_Down, Ch_Up and Ch_Down are defined, as shown in FIG. 14 b , as Remote V 2 &#39;s who&#39;s values indicate power on/off (TRUE/FALSE), raising of the volume, lowering of the volume, selecting the next channel and selecting the previous channel, respectively, and have V 2  IDs of 00h to 04h, respectively. The values of the remote control ( 211 ) V 2 &#39;s may be set, for example, by corresponding buttons or pressure sensors. The state of node B ( 212 ) is represented by the V 2 &#39;s of television ( 213 ). The V 2 &#39;s, named Power, Volume and Channel, are defined, as shown in FIG. 14 b , as Local V 2 &#39;s who&#39;s values indicates power on/off, volume level and channel, respectively, of television ( 213 ), and have V 2  ID of 00h to O 2 h, respectively. In one embodiment of this example, the controller ( 213   a ) is configured as illustrated by the pseudocode shown in FIG. 14 c.    
         [0148]    When the television&#39;s ( 213 ) Local V 2  Power value is FALSE and the remote control&#39;s ( 211 ) Remote V 2  Pwr_Button value is TRUE (Pwr_Button is activated), then the Local V 2  Power value is set to TRUE, changing the state of television ( 213 ) so that it is turned on. Conversely, when the television&#39;s ( 213 ) Local V 2  Power value is TRUE and the Remote V 2  Pwr_Button value is TRUE (Pwr_Button is activated), then the Local V 2  Power value is set to FALSE, changing the state of television ( 213 ) so that it is turned off.  
         [0149]    Each time the remote control&#39;s ( 211 ) Remote V 2  Vol_Up value is TRUE (Vol_Up is activated), the television&#39;s ( 213 ) volume level increases by 5, up to a maximum level of 95, by raising the value of Local V 2  Volume. Conversely, each time the remote control&#39;s ( 211 ) Remote V 2  Vol_Down value is TRUE (Vol_Down is activated), the television&#39;s ( 213 ) volume level decreases by 5, down to a minimum level of 0, by lowering the value of Local V 2  Volume.  
         [0150]    Similarly, each time the remote control&#39;s ( 211 ) Remote V 2  Ch_Up value is TRUE (Ch_Up is activated), the television&#39;s ( 213 ) channel increases by 1, up to a maximum channel of 255 after which the channel is set to 1, by raising the value of Local V 2  Channel. Conversely, each time the remote control&#39;s ( 211 ) Remote V 2  Ch_Down value is TRUE (Ch_Down is activated), the television&#39;s ( 213 ) channel decreases by 1, down to a minimum channel of 1 after which the channel is set to 255, by lowering the value of Local V 2  Channel.  
         [0151]    [0151]FIG. 15 a  shows an example of a network with five nodes, of which node A ( 310 ), node D ( 312 ) and node E ( 314 ) are represented for concision purposes as node B and node C are similar to node A and node D. Node A ( 310 ) has a network address of ‘00 01h’, node D ( 312 ) has a network address of ‘00 04h’ and node E ( 314 ) has a network address of ‘00 05h’. Node A ( 310 ) and node D ( 312 ) contain light switches ( 311 ) and ( 313 ), provided with controllers ( 311   a ) and ( 313   a ) and memories ( 31  lb) and ( 313   b ), respectively, as do node B and node C (not represented), and are monitored by node E ( 314 ), which contains a heater ( 315 ) provided with controller ( 315   a ) and memory ( 315   b ). The state of node A ( 310 ) is represented by the V 2 &#39;s of light switch ( 311 ). The V 2 &#39;s, named Switch_State, Button_Up and Button_Down are defined, as shown in FIG. 15 b , as a Remote and two Local V 2 &#39;s, respectively, who&#39;s values indicate power on/off, activating the switch and deactivating the switch, respectively, and have V 2  IDs of 00h to O 2 h, respectively. The same structure applies to node B, node C and node D ( 312 ). The values of the light switch&#39;s ( 311 ) Local V 2 &#39;s may be set, for example, by corresponding buttons or pressure sensors. In one embodiment of this example, the controller ( 313   a ) is configured as illustrated by the pseudocode shown in FIG. 15 c.    
         [0152]    When the light switch&#39;s ( 311 ) Local V 2  Button_Up value is TRUE (Button_Up is activated), then the light switch&#39;s ( 311 ) Remote V 2  Switch_State value is set to TRUE, indicating to a remote node that the light switch ( 311 ) has been activated. Conversely, when the light switch&#39;s ( 311 ) Local V 2  Button_Down value is TRUE (Button_Down is activated), then the light switch&#39;s ( 311 ) Remote V 2  Switch_State value is set to False, indicating to a remote node that the light switch ( 311 ) has been deactivated.  
         [0153]    The state of node E ( 314 ) is represented by the V 2 &#39;s of heater ( 315 ). The V 2 &#39;s, named Heater_State, Zone_ 1 , Zone_ 2 , Zone_ 3  and Zone_ 4 , are defined, as shown in FIG. 15 b , as a Local V 2  who&#39;s values indicate if the heater ( 315 ) is on/off, and the states of the monitored light switches contained in nodes A, B, C and D, respectively, and have V 2  ID of 00h to 04h, respectively. In one embodiment of this example, the controller ( 315   a ) is configured as illustrated by the pseudocode shown in FIG. 15 c.    
         [0154]    The heater ( 315 ) sets the values of its Local V 2 &#39;s Zone_ 1 , Zone_ 2 , Zone_ 3  and Zone_ 4  to the state of each of the corresponding monitored light switches contained in nodes A, B, C and D, respectively. When the value of the Local V 2 &#39;s Zone_ 1 , Zone_ 2 , Zone_ 3  and Zone_ 4  are all FALSE, meaning all the light switches have been turned off, the heater&#39;s ( 315 ) Local V 2  Heater_State value is set to FALSE, shutting off heater ( 315 ). This simplified scenario may be used to conserve energy by supposing that having all of the light switches turned off indicates that all the inhabitants of a household have gone to bed, of course other variables may be monitored by heater ( 315 ) and may be used in the determination of when to effectively shut it off.  
         [0155]    [0155]FIG. 16 a  shows an example of a network of five nodes, of which node A ( 410 ), node B ( 412 ) and node E ( 414 ) are represented for concision purposes as node C and node D are similar to node B and node E. Node A ( 410 ) has a network address of ‘00 01h’, node B ( 412 ) has a network address of ‘00 02h’ and node E ( 414 ) has a network address of ‘00 05h’. Node A ( 410 ) contains a light switch ( 411 ) provided with controller ( 411   a ) and memory ( 411   b ), for controlling node B ( 412 ) and node D ( 414 ), which contain light fixtures ( 413 ) and ( 415 ), provided with controllers ( 413   a ) and ( 415   a ) and memories ( 413   b ) and ( 415   b ), respectively, as well as node C and node D (not represented). The state of node A ( 410 ) is represented by the V 2 &#39;s of light switch ( 411 ). The V 2 &#39;s, named Switch_State, Button_Up and Button_Down are defined, as shown in FIG. 16 b , as a Remote and two Local V 2 &#39;s, respectively, who&#39;s values indicate power on/off, activating the switch and deactivating the switch, respectively, and have V 2  IDs of 00h to 0 2 h, respectively. The values of the light switch&#39;s ( 411 ) Local V 2 &#39;s may be set, for example, by corresponding buttons or pressure sensors. In one embodiment of this example, the controller ( 411   a ) is configured as illustrated by the pseudocode shown in FIG. 16 c.    
         [0156]    When the light switch&#39;s ( 411 ) Local V 2  Button_Up value is TRUE (Button_Up is activated), then the light switch&#39;s ( 411 ) Remote V 2  Switch_State value is set to TRUE, indicating to remote nodes that the light switch ( 411 ) has been activated. Conversely, when the light switch&#39;s ( 411 ) Local V 2  Button_Down value is TRUE (Button_Down is activated), then the light switch&#39;s ( 411 ) Remote V 2  Switch_State value is set to False, indicating to remote nodes that the light switch ( 411 ) has been deactivated.  
         [0157]    The state of node B ( 412 ) is represented by the V 2  of light fixture ( 413 ). The V 2 , named Fixture_State is defined, as shown in FIG. 16 b , as a Local V 2  who&#39;s value indicates if the light fixture ( 413 ) is on or off, and has V 2  ID of 00h. The same structure applies to node C, node D and node E ( 414 ). In one embodiment of this example, the controller ( 413   a ) is configured as illustrated by the pseudocode shown in FIG. 16 c.    
         [0158]    Each of the light fixtures ( 413 ) and ( 415 ), as well as those of node B and node D, set the value of their respective Local V 2  Fixture_State to the value of the light switch&#39;s ( 411 ) Remote V 2  Switch_State. Thus, by activating or deactivating a single light switch ( 411 ), four different light fixtures ( 413 ), ( 415 ) and those of node B and node D, are turned on or off simultaneously. Of course, the number of light switches and light fixtures may be different that that illustrated by the previous example.  
         [0159]    Although the present invention has been described by way of particular embodiments and examples thereof, it should be noted that it will be apparent to persons skilled in the art that modifications may be applied to the present particular embodiment without departing from the scope of the present invention.  
                                                             Value Type   Value Type               Name   (hexadecimal)   Length (Bytes)   Range                                Boolean   00h   1   00h . . . 01h       Unsigned   01h   1   00h . . . FFh       Char           Signed   02h   2   0000h . . . FFFFh (where MSB is the       Integer           sign bit)       Signed   03h   4   00000000h . . . FFFFFFFFh (where       Long           MSB is the sign bit)       Float   04h   4   00000000h . . . FFFFFFFFh following                   IEEE Big Endian format       Data   05h   0 . . . 246. The length is on   Any hexadecimal string               one byte (unsigned char).       String   06h   0 . . . 246. The length is on   Any ASCII string               one byte (unsigned char).                  
 
         [0160]    [0160]                                                                                                                                                                                                                                                                                                                                                                                                                         TABLE 2                               V 2  Units of Measure           Measurement   Property Value            Type   MSB   LSB   Unit of Measure   Symbol                    No Specified Unit            No Unit   00h   00h   N/A   N/A            Length            Length   10h   08h   kilometer   km               0Bh   meter   m               0Dh   centimeter   cm               0Eh   millimeter   mm               0Fh   micrometer   μm               10h   nanometer   nm               16h   mile   mi               19h   yard   yd               1Ah   toot   ft               1Bh   inch   in               1Dh   mil (thou)   —               21h   angstrom   A               22h   nautical mile   nmi               30h   picas (computer)   pi               31h   picas (printer)   pi               32h   point (computer)   pt               33h   point (printer)   pt            Area            Area   12h   08h   square kilometer   km 2                 09h   hectare   ha (hm 2 )                   (square hectometer)               0Bh   square meter   m 2                 0Eh   square millimeter   mm 2                 0Fh   square micrometer   μm 2                 10h   square nanometer   nm 2                 16h   square mile   mi 2                 17h   acre   N/A               19h   square yard   yd 2                 1Ah   square foot   ft 2                 1Bh   square inch   in 2              Volume            Volume   14h   08h   cubic kilometer   km 3         (capacity)       0Bh   cubic meter   m 3                 0Dh   cubic centimeter   cm 3                 0Eh   cubic millimeter   mm 3                 16h   cubic mile   mi 3                 19h   cubic yard   yd 3                 1Ah   cubic foot   ft 3                 1Bh   cubic inch   in 3                 29h   hectoliter   hl               2Ah   decaliter   dal               2Bh   liter   l               2Ch   deciliter   dl               2Dh   centiliter   cl               2Eh   milliliter   ml               42h   barrel of oil   bo               49h   gallon (US)   gal               4Ah   quart (US)   qt               4Bh   pint (US)   pt               4Dh   fluid ounce (US)   fl. oz.               59h   imperial gallon   gal                   (UK)               5Ah   quart (UK)   qt               5Bh   pint (UK)   pt               5Dh   fluid ounce (UK)   fl. oz.               69h   dry gallon   gal               6Ah   dry quart   quart               6Bh   dry pint   pt            Mass            Mass   18h   07h   megagram (tonne)   Mg (t)               08h   kilogram   kg               0Bh   gram   g               0Dh   centrigram   cg               0Eh   milligram   mg               0Fh   microgram   μg               21h   long ton (UK)   t               22h   short ton (UK)   t               23h   pound   lb               24h   ounce   oz            Time            Time   2Fh   0Bh   second   s               0Dh   centisecond   cs               0Eh   millisecond   ms               0Fh   microsecond   μs               10h   nanosecond   ns               11h   picosecond   pS               12h   femtosecond   fs               1B   year   yr               1A   month   mo               19   day   d               18   hour   h               17   minute   min            Frequency            Frequency   34   04h   petahertz   PHz               05h   terahertz   THz               06h   gigahertz   GHz               07h   megahertz   MHz               08h   kilohertz   kHz               0Bh   hertz   Hz            Energy &amp; Power            Energy   58   6Bh   gigajoule   GJ               07h   megajoule   MJ               08h   kilojoule   kJ               0Bh   joule   J               21h   kilocalorie   kcal               22h   calorie   cal               45h   terawatt hour   TWh               46h   gigawatt hour   GWh               47h   megawatt hour   MWh               48h   kilowatt hour   kWh               4Bh   watt hour   Wh               4Eh   milliwatt hour   mWh       Power   5A   06h   gigawatt   GW               07h   megawatt   MW               08h   kilowatt   kW               0Bh   watt   W               0Eh   milliwatt   mW               0Fh   microwatt   pW               31h   metric horsepower   hp               32h   horsepower   hp               33B   electric horsepower   hp            Pressure &amp; Stress            Pressure &amp;   50   07h   megapascal   Mpa       Stress       08h   kilopascal   kPa               09h   hectopascal   hPa               0Bh   pascal   Pa               27h   megabar   Mbar               28h   kilobar   kb               2Bh   bar   b               2Eh   millibar   mb               48h   kilonewton per   kN/m 2                     square meter               4Bh   newton per   N/m 2                     square meter               60h   atmosphere   atm               61h   pound per   psi                   square inch            Electric Parameters            Electric   68   07h   megaohm   mΩ       Resistance       08h   kiloohm   kΩ               0Bh   ohm   Ω               0Eh   calorie   mΩ       Electric   69   0Bh   farad   F       Capacity       0Eh   millifarad   mF               0Fh   microfarad   μF               10h   nanofarad   nF               11h   picofarad   pF       Electric   6A   0Bh   ampere   A       Current       0Eh   milliampere   mA               0Fh   microampere   μA       Electric   6B   06h   kilowatt   kW       Potential       07h   watt   W               08h   milliwatt   mW               0Bh   microwatt   μW               0Eh   metric horsepower   hp               0Fh   horsepower   hp            Luminous Intensity            Luminous   74   0Bh   candela   cd       Intensity            Temperature            Temperature   78   0Bh   kelvin   K               2Bh   celsius   ° C.               2Dh   centicelsius   c° C.               4Bh   fahrenheit   oF            Miscellaneous            User-Defined   80-BF   00h . . . FFh   N/A   N/A       Reserved   C0-FF   00h . . . FFh   N/A   N/A                    
         [0161]    [0161]                                                                                                                                                                                                               TABLE 3                                   Token Name   Value                                    General Tokens                &lt;END Token&gt;   FFh           &lt;Local V 2  Token&gt;   10h           &lt;Remote V 2  Token&gt;   11h           &lt;Const Token&gt;   15h            IF Statement                &lt;IF Token&gt;   7Fh           &lt;ELSEIF Token&gt;   FAh           &lt;ELSE Token&gt;   FBh            Logical Expressions                &lt;NOT Token&gt;   F9h           &lt;AND Token&gt;   F0h           &lt;OR Token&gt;   F1h           &lt;XOR Token&gt;   F2h            Relational Expressions                &lt;GTE Token&gt;   F3h           &lt;GT Token&gt;   F4h           &lt;LTE Token&gt;   F5h           &lt;LT Token&gt;   F6h           &lt;EQ Token&gt;   F7h           &lt;NEQ Token&gt;   F8h            TRUE, FALSE                &lt;TRUE Token&gt;   01h           &lt;FALSE Token&gt;   00h            Timers                &lt;Timer Running Token&gt;   C5h           &lt;Timer Expired Token&gt;   C6h           &lt;Disable Timer Token&gt;   C0h           &lt;Start Timer Token&gt;   C1h            V 2  Actions                &lt;Assign Token&gt;   20h           &lt;Add Token&gt;   21h           &lt;Subtract Token&gt;   22h           &lt;Multiply Token&gt;   23h           &lt;Divide Token&gt;   24h           &lt;Force Report Token&gt;   26h            Value Types                &lt;Boolean Token&gt;   00h           &lt;Unsigned Char Token&gt;   01h           &lt;Signed Integer Token&gt;   02h           &lt;Signed Long Token&gt;   03h           &lt;Float Token&gt;   F4h           &lt;Data Token&gt;   F5h            Miscellaneous                &lt;Value Changed Token&gt;   B0h           &lt;50 ms Token&gt;   C7h           &lt;Clear Settings Token&gt;   25h

Technology Category: 5