CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


hardware:cflink:rules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hardware:cflink:rules [2012/09/28 06:34]
jarrod [Rules Protocol]
hardware:cflink:rules [2014/01/13 05:04] (current)
jarrod
Line 1: Line 1:
-====== Rules (Event Triggering) ======+====== Rules CFLink Protocol ​(Event Triggering) ======
  
-===== Overview =====+===== Rules Overview =====
  
 Rules allow each device on the CFLink network to perform actions based on string matching of outgoing data on the CFLink bus.\\ Rules allow each device on the CFLink network to perform actions based on string matching of outgoing data on the CFLink bus.\\
 For example, you can create a rule that when a specific dry contact on a SW16 is closed, a custom macro is triggered. For example, you can create a rule that when a specific dry contact on a SW16 is closed, a custom macro is triggered.
  
-Rules are stored ​on the device that sends the commands. So if you want to perform a rule when a SW16 dry contact closesyou store the rule on the SW16.\\ +For more details ​on how to configure rulesplease see our [[hardware:​rules|general rules tab entry]] ​on our wiki.
-If you wanted to perform a rule when data arrived on a TCP socket in the LAN Bridge, you would store the rule on the LAN Bridge.\\ +
-If you wanted to perform a rule when the resistance input of a MOD-IO8 changed, you would store the rule in the unit housing the module (DIN-MOD4 for example).+
  
-===== Rule Properties ===== +===== Rules CFLink ​Protocol =====
- +
-A rule is defined with a name, search string and a macro to trigger. +
- +
-  * **Name** = A name given to the rule for your records. The name has no effect on anything, it's just a way to remember what a rule was created for. +
-  * **Search String** = A search pattern to match an outgoing CFLink message (as well as incoming TCP/UDP packets for LAN Bridge rules). When this search pattern matches any the message, the rule is triggered.\\ Search strings can contain wildcard match characters as follows: +
-    * * (asterisk) means match any character zero or more times, until the next defined character in the search string is found, or until the end of the message. +
-    * . (period) means match any character a single time. +
-  * **Macro Name** = The name of a macro to perform when the rule is triggered (when the search string matches any outgoing data) +
- +
-===== Macro Properties ===== +
- +
-A Macro is defined with a name and a series of actions and delays. +
- +
-  * **Name** = The name of the macro. This is used by Rule definitions to call the macro to be performed. +
-  * **List Of Commands & Delays** = One or more actions with a delay +
-    * **Command Data** = The command data to send as part of the macro. +
-    * **Delay** = The delay before the command data for this action is sent. This delay is sequential, meaning its the delay from the action above it, NOT a delay from the start of the macro. The delay occurs BEFORE the command is sent. Use a delay of 0 (zero) to instantly send the command data. +
- +
-===== Rules Protocol =====+
  
 Due to the storage requirements on CFLink devices, all rules on a device must be transfered in one process. Single rules cannot be added/​edited/​removed without sending all other rule information stored on the device at the same time. This means there are only three CFLink messages used to manipulate rules on a device, Write, Read and Delete. Due to the storage requirements on CFLink devices, all rules on a device must be transfered in one process. Single rules cannot be added/​edited/​removed without sending all other rule information stored on the device at the same time. This means there are only three CFLink messages used to manipulate rules on a device, Write, Read and Delete.
Line 39: Line 18:
  
 Full documentation for the rules file format and transmission protocol is available with diagrams and sample data in the following PDF:\\ Full documentation for the rules file format and transmission protocol is available with diagrams and sample data in the following PDF:\\
-[[Rules Protocol Document]]+[[https://​github.com/​downloads/​CommandFusion/​Downloads/​RulesProtocol_v0.8.pdf|Rules Protocol Document]]
  
 ===== Queries ===== ===== Queries =====
Line 45: Line 24:
 ==== RLR - Rules Read ==== ==== RLR - Rules Read ====
  
-The `RLRquery is used to read all the rules stored a specific CFLink device.+The ''​RLR'' ​query is used to read all the rules stored a specific CFLink device.
  
 === Data === === Data ===
  
-The `RLRquery does not have any associated data.+The ''​RLR'' ​query does not have any associated data.
  
 === Reply === === Reply ===
Line 91: Line 70:
 ==== RLW - Rules Write ==== ==== RLW - Rules Write ====
  
-The `RLWcommand is used to write rules to the on-board memory of a CFLink device. All rules must be included in the transmition,​ as partial rule writing is not possible.+The ''​RLW'' ​command is used to write rules to the on-board memory of a CFLink device. All rules must be included in the transmition,​ as partial rule writing is not possible.
  
 === Data === === Data ===
  
-The `RLWcommand requires sending the rule records as the command data, split into packets of 264 bytes, padding with \xFF bytes if the final record does not reach 264 bytes in length.+The ''​RLW'' ​command requires sending the rule records as the command data, split into packets of 264 bytes, padding with \xFF bytes if the final record does not reach 264 bytes in length.
  
 === Reply === === Reply ===
Line 130: Line 109:
 ==== RLD - Rules Delete ==== ==== RLD - Rules Delete ====
  
-The `RLDcommand is used to delete rules stored in the on-board memory of a CFLink device. All rules will be deleted when this command is sent.+The ''​RLD'' ​command is used to delete rules stored in the on-board memory of a CFLink device. All rules will be deleted when this command is sent.
  
 === Data === === Data ===
  
-The `RLDcommand does not have any associated data.+The ''​RLD'' ​command does not have any associated data.
  
 === Reply === === Reply ===
hardware/cflink/rules.1348814080.txt.gz · Last modified: 2012/09/28 06:34 by jarrod