BWP Architecture
From Grigbertz
m |
m |
||
Line 35: | Line 35: | ||
==== To Do ==== | ==== To Do ==== | ||
- | * How best to specify sender and recever? | + | * How best to specify sender and recever? Should there be a standardized item identifier? |
+ | ** <item name>|<script name> might be good. | ||
* Fields for handling of e-mail info | * Fields for handling of e-mail info | ||
* Adapt this for efficient handling of menus | * Adapt this for efficient handling of menus | ||
==== Example ==== | ==== Example ==== | ||
- | + | Techno Cuffs ankle chains. In this example the chain scripts listen on the Set Channel and communicate directly with each other. The names 'rankle' and 'lankle' should identify a specific item within the set. | |
+ | # BWP::1::Techno Cuffs::rankle::ChainsMenu|id=<menu clicker id>::addchain|lankle | ||
+ | ## Sent on the setChannel when selecting menu item "Options..." -> "Chains..." -> "Add" | ||
+ | ## Picked up by the comm script and relayed by link message. | ||
+ | ## Received by the chains script "Chains T-1.4::rankle" in the inner chain ring prim of the Right Ankle Cuff. | ||
+ | ## The sender field is not used in this exchange. | ||
+ | # BWP::2::Techno Cuffs::lankle::rankle::connectchain | ||
+ | ## Sent on the setChannel by the receiving chains script. The '2' in the second field makes the comm script ignore this. | ||
+ | ## Received on the Set Channel by the chains script "Chains T-1.4::lankle" in the inner chain ring prim of the Left Ankle Cuff. | ||
+ | # BWP::2::Techno Cuffs::rankle::lankle::connectchainok|<UUID of the lankle prim> | ||
+ | ## Sent on the setChannel by the receiving chains script. The '2' in the second field makes the comm script ignore this. | ||
+ | ## Received on the Set Channel by the chains script "Chains T-1.4::rankle" in the inner chain ring prim of the Right Ankle Cuff. | ||
+ | ## The chains script can now start the Particle chain with the received target key (i.e. <UUID of the lankle prim>) | ||
=== Main Comm module === | === Main Comm module === | ||
Line 60: | Line 73: | ||
=== Examples of status (Magic Cuffs) === | === Examples of status (Magic Cuffs) === | ||
==== Set Constants ==== | ==== Set Constants ==== | ||
- | * Set name | + | * <b>Set name</b> |
- | * Basic Channel | + | * <b>Basic Channel</b> |
- | * Basic key channel | + | * <b>Basic key channel</b> |
- | * Dialog strings | + | * <b>Dialog strings</b> |
==== Set Properties ==== | ==== Set Properties ==== | ||
- | * Owner id | + | * <b>Owner id</b> |
- | * Owner name | + | * <b>Owner name</b> |
- | * Owner initials | + | * <b>Owner initials</b> |
* <b>Set Channel</b> | * <b>Set Channel</b> | ||
* <b>Operators</b> Anybody / Just me / Operator list | * <b>Operators</b> Anybody / Just me / Operator list | ||
Line 96: | Line 109: | ||
* <b>Leash state</b> Leashed / Unleashed | * <b>Leash state</b> Leashed / Unleashed | ||
* <b>Leash anchor</b> Agent key / Object Key / NULL_KEY | * <b>Leash anchor</b> Agent key / Object Key / NULL_KEY | ||
+ | |||
+ | ==== Item Constants ==== | ||
+ | * <b>Set name</b> | ||
+ | * <b>Item Name</b> - Not implemented in current version | ||
+ | * <b>Basic Channel</b> | ||
+ | * <b>Basic key channel</b> | ||
==== Item Properties ==== | ==== Item Properties ==== | ||
+ | * <b>Item Attachment position</b> - Not implemented in current version | ||
* <b>Set Channel</b> | * <b>Set Channel</b> | ||
* <b>Item color:</b> Steel / Gold / Iron / etc.... | * <b>Item color:</b> Steel / Gold / Iron / etc.... | ||
Line 106: | Line 126: | ||
* <b>Part of current bound anim:</b> Cuffed / Not Cuffed | * <b>Part of current bound anim:</b> Cuffed / Not Cuffed | ||
* <b>Cuff state:</b> Red / Yellow / Green | * <b>Cuff state:</b> Red / Yellow / Green | ||
- | |||
== Menu Module == | == Menu Module == |
Revision as of 11:13, 6 September 2008
Contents |
Comm Module
This script listens on the Set Channel and relays incoming commands as Link Messages.
The command string looks the same sent by chat, link or e-mail.
BWP Communications Protocol
<command> = BWP::<relay info>::<set name>::<receiver>::<sender>::<action>
<action> = <action name>[|id=<key>][|<arg1>|<arg2>...|<argN>]
<receiver> = <sender> = <name>[|id=<key>][|num=<number>][|<arg1>|<arg2>...|<argN>]
Fields
- BWP The Magic Word
- <relay info> Values:
- 0 - handled by any receiver
- 1 - handled by Comm module only. Ignored by others.
- 2 - ignored by Comm module.
- set name Common name of all objects using the set channel
- receiver An identifier telling the receiving end this is the action for me
- num Optional. Script number for initial filtering of link messages. Sent as the num argument in the link message.
- id Optional. Is this useful?
- sender Identifies the original source of the command
- num Optional. Sent as the sender_num argument in the link message.
- id Optional. Is this useful?
- action The info handled by the receiver.
The Relayed Link Message
- sender_num = sender->num (default: 0)
- num = receiver->num (default: 0)
- msg = the command string
- id = original chat message id (default: NULL_KEY)
To Do
- How best to specify sender and recever? Should there be a standardized item identifier?
- <item name>|<script name> might be good.
- Fields for handling of e-mail info
- Adapt this for efficient handling of menus
Example
Techno Cuffs ankle chains. In this example the chain scripts listen on the Set Channel and communicate directly with each other. The names 'rankle' and 'lankle' should identify a specific item within the set.
- BWP::1::Techno Cuffs::rankle::ChainsMenu|id=<menu clicker id>::addchain|lankle
- Sent on the setChannel when selecting menu item "Options..." -> "Chains..." -> "Add"
- Picked up by the comm script and relayed by link message.
- Received by the chains script "Chains T-1.4::rankle" in the inner chain ring prim of the Right Ankle Cuff.
- The sender field is not used in this exchange.
- BWP::2::Techno Cuffs::lankle::rankle::connectchain
- Sent on the setChannel by the receiving chains script. The '2' in the second field makes the comm script ignore this.
- Received on the Set Channel by the chains script "Chains T-1.4::lankle" in the inner chain ring prim of the Left Ankle Cuff.
- BWP::2::Techno Cuffs::rankle::lankle::connectchainok|<UUID of the lankle prim>
- Sent on the setChannel by the receiving chains script. The '2' in the second field makes the comm script ignore this.
- Received on the Set Channel by the chains script "Chains T-1.4::rankle" in the inner chain ring prim of the Right Ankle Cuff.
- The chains script can now start the Particle chain with the received target key (i.e. <UUID of the lankle prim>)
Main Comm module
- All Comm modules listen to Basic Channel (set class specific) and Set Channel (set instance specific)
- The Main Comm module handles requests on the Basic Channel for Set Channel number, if set owner matches.
- The Main Comm module broadcasts Set Channel number on the Basic Channel when rezzed.
- Other Comm modules request Set Channel number on the Basic Channel when rezzed.
Status Module
Handles Item status and Set status.
Any change in status is relayed to other Status Modules of the set through the set channel.
(Anti-loop exeption: A status change from a set channel message is not relayed again).
A status update is also sent to the link set.
Status should be properly applied on re-log.
Examples of status (Magic Cuffs)
Set Constants
- Set name
- Basic Channel
- Basic key channel
- Dialog strings
Set Properties
- Owner id
- Owner name
- Owner initials
- Set Channel
- Operators Anybody / Just me / Operator list
- Operator list list of names (or Groups (level 2))
- Item color: Steel / Gold / Iron / etc....
- Sparkles: Sparkles On / Sparkles Off
- Sparkle color: White / Green / etc...
Set State
- Key state: Key Activated / Key Not Activated
- Cuffed state: Not Cuffed/ Cuffed
- Cufflocked state: Not Cufflocked / Cufflocked
- Locked state Unlocked / Locked
- Freedom state: Free (Not Cufflocked and Unlocked )/ Locked Free (Not Cuffed and Locked) / Not Free ((Cuffed and Locked) or Cufflocked)
- Derived State
- Free: All menu choices available.
- Locked Free: You can make some menu choices like "Leash..." or "Poses..."
- Not Free: Severely restricted menu choices
- Sit state Sitting / Not Sitting
- Sit pose Sit Pose / Cuff Pose
- Cuff pose Showing cuff pose / Not showing cuff pose
- Derived state. A function of Sit State, Sit pose, Cuffed state
- Current animation Animation name / NULL_STR
- Current squirm animation Animation name / NULL_STR
- Current playing animation Animation name / NULL_STR
- Derived state. A function of Sit State, Sit pose, Current animation, Current squirm animation
- Leash state Leashed / Unleashed
- Leash anchor Agent key / Object Key / NULL_KEY
Item Constants
- Set name
- Item Name - Not implemented in current version
- Basic Channel
- Basic key channel
Item Properties
- Item Attachment position - Not implemented in current version
- Set Channel
- Item color: Steel / Gold / Iron / etc....
- Sparkles: Sparkles On / Sparkles Off
- Sparkle color: White / Green / etc...
Item State
- Part of current bound anim: Cuffed / Not Cuffed
- Cuff state: Red / Yellow / Green