Эта страница является
переводом страницы
AMX IRLB Commands. Перевод выполнен на 100%.
Dynamic lists in AMX (IRLB commands)
To display lists of music or films. The lists can change during project work.
iRidium dynamic list (List) is a project item on the basis of which you can form the scrolling list from one popup (template). The list items can be added or removed when working with the project.
The number of list items is set up by the controller command and is limited by settings of the graphic item - the list basis. The content of a list item can be changed with the help of special commands.
Preparing the list basis in AMX TPDesign4
Multistate-Bargraph is always use as a list basis:
In the Description field of the Multistate-Bargraph item indicate the popup which will be the list item template:
IridiumList=Template_1;
Template_1 - the popup name (the list item template)
In the Programming tab of the Multistate-Bargraph item set up processing of pressings on list items:
Address Code
it is used to control the list from the controller.
If you send value 10 to <Address Code> the list is positioned on the 10th item (if there is such item)
Level Code
it is used to monitor pressings on list items. Level Code sends information about which item/subitem is pressed to the controller.
If you set up Level Code: 401 and click on the 10th list item, the controller gets value 10 in Level Code: 401.
Information about the pressed list subitem comes to the next Level Code: 402.
If there are 3 subitems on the 10th item and we pressed the second subitem, then Level Code: 402 gets value 2 (counting from zero: 0 - item basis, 1 - the first subitem, ...)
When pressing on a list item it sends its identifier and the identifier of the pressed subitem to the АМХ controller. The controller processes these two values and activated the corresponding scene
The identifier of the first list item (ID of the first item) is indicated when creating a list with the help of the IRLB_ADD command.
The value selected on a level or joystick will NOT be sent to the controller as only the fact of pressing on the subitem is captured.
IRLB commands: control of lists
IRLB commands is a set of commands which can be sent only to iRidium client applications. They are not understood by standard AMX TouchPanels.
1. Adding the indicated number of items in the list
send_command dvTP, "'IRLB_ADD-<address,count,start_id>'"
- address - the item address (the list basis - Multistate-Bargraph)
- count - the number of list items you want to create
- start_id - the identifier of the first list item
Example: create a list of 25 items (the basis - the item with Code:400, the number of items - 25, ID of the first item - 0)
2. Removing the indicated item by its ID
send_command dvTP, "'IRLB_DELETE-<address,id>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item you want to remove
3. Removing all items
send_command dvTP, "'IRLB_CLEAR-<address>'"
- address - the item address (the list basis - Multistate-Bargraph)
4. Setting up list "resistance" to movement in percentage terms 0-100% (0 - no resistance, 100 - no movement)
send_command dvTP, "'IRLB_RESISTENCE-<address,value>'"
- address - the item address (the list basis - Multistate-Bargraph)
- value - the value of "resistance" in the range from 0 to 100
5. Setting up the list position
send_command dvTP, "'IRLB_POSITION-<address,id>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item you want to go to
6. Setting up the list color
send_command dvTP, "'IRLB_SCROLL_COLOR-<address,color>'"
- address - the item address (the list basis - Multistate-Bargraph)
- color - the color (HEX, RGB, the color name)
7. Setting up the horizontal coordinate of the list subitem
send_command dvTP, "'IRLB_ITEM_X-<address,id,subitem,value>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- value - the value of the item X coordinate in pixels
8. Setting up the vertical coordinate of the list subitem
send_command dvTP, "'IRLB_ITEM_Y-<address,id,subitem,value>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- value - the value of the item Y coordinate in pixels
9. Setting up the width of the list sibitem
send_command dvTP, "'IRLB_ITEM_WIDTH-<address,id,subitem,value>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- value - the item width in pixels
10. Setting up the height of the list sibitem
send_command dvTP, "'IRLB_ITEM_HEIGHT-<address,id,subitem,value>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- value - the item height in pixels
11. Setting up the subitem color
send_command dvTP, "'IRLB_ITEM_COLOR-<address,id,subitem,color>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- color - the color (HEX, RGB, the color name)
12. Setting up opacity of the list sibitem
send_command dvTP, "'IRLB_ITEM_OPACITY-<address,id,subitem,value>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- value - the opacity value in the range from 0 to 255
13. Setting up the text of the list subitem in the CP1251 format
send_command dvTP, "'IRLB_ITEM_TEXT-<address,id,subitem,string>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- string - the string in the CP1251 format
14. Setting up the text of the list subitem in the Unicode format
send_command dvTP, "'IRLB_ITEM_UNI-<address,id,subitem,string>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- string - the string in the Unicode format
To fill in the string, use the Unicode Edit tool of NetLinx Studio.
#Go to the following menu in a working project Edit -> Advanced ->Unicode Edit.
#Enter a value in the window that appears and copy a formed link in the Unicode format.
15. Setting up the color of the subitem text
send_command dvTP, "'IRLB_ITEM_TEXT_COLOR-<address,id,subitem,color>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- color - the color (HEX, RGB, the color name)
16. Setting up alligning of the subitem text
send_command dvTP, "'IRLB_ITEM_TEXT_ALIGN-<address,id,subitem,align>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- align - the way of alligning
17. Setting up the subitem image
send_command dvTP, "'IRLB_ITEM_IMAGE-<address,id,subitem,image name>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- image name - the name of the image added in the project gallery
18. Setting up alligning of the subitem image
send_command dvTP, "'IRLB_ITEM_IMAGE_ALIGN-<address,id,subitem,align>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- align - the way of alligning
19. Setting up the subitem icon
send_command dvTP, "'IRLB_ITEM_ICON-<address,id,subitem,slot_id>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- slot id - slot number in the Resource Manager
Example with the use of slot_id: IRLB_ITEM_ICON-400,0,1,3
20. Setting up alligning of the subitem icon
send_command dvTP, "'IRLB_ITEM_ICON_ALIGN-<address,id,subitem,align>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- align - the way of alligning
21. Setting up the subitem border by the identifier
send_command dvTP, "'IRLB_ITEM_BORDER-<address,id,subitem,border>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- border - the border type
22. Setting up the color of the subitem border
send_command dvTP, "'IRLB_ITEM_BORDER_COLOR-<address,id,subitem,color>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the identifier of the list item
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
- color - the color (HEX, RGB, the color name)
23. it sets Value to a subitem of a list item.
send_command dvTP, "'IRLB_ITEM_VALUE-<address,id,subitem,value>'"
- address - address of AMX list;
- id - identification of a list item, the basis of a list (Multistate-Bargraph);
- subitem - id of a subitem in a list (starts with zero, 0 - the basis, etc.);
- value - value
24. It connects a definite list with 3 levels where values come when subitem values change
send_command dvTP, "'IRLB_LINK_LEVEL-<address,port,item_code,subitem_code,value_code>'"
- address - address assigned to the list;
- port - port in AMX;
- item_code - AMX code where the ID of a list item will be sent;
- subitem_code - AMX code where the ID of list subitem will be sent;
- value_code - AMX code where the value of the list subitem will be sent.
Algorithm of work:
- A user changes level value on a list item.
- ID of the list itme where the change was made comes to item_code in AMX.
- ID of the subitem on the list items (ordinal number of the level in the template) comes to subitem_code in AMX.
- Level calue comes to В value_code in AMX.
25. It connects a definite list with two levels and one channel where values come when a subitem is pressed/released.
send_command dvTP, "'IRLB_LINK_CHANNEL-<address,port,item_code,subitem_code,value_code>'"
- address - address assigned to the list;
- port - port in AMX;
- item_code - AMX code where the ID of the list item will be sent;
- subitem_code - AMX code where the subitem of the list will be sent;
- value_code - AMX code where where 1 (push) is sent when a press occures and 0 (release) will be sent when a subitem of the list is released.
Algorithm of work:
- A user presses/releases an item
- ID of the list item that was pressed comes to item_code in AMX
- The ID of the subitem of the list item (ordinal number of the item in the template) comes to subitem_code in AMX.
- Push or release of a channel comes to value_code in AMX.
26. It assigns 1 value to the Visible list item Visible=1
send_command dvTP, "'IRLB_ITEM_SHOW-<address,id,subitem>'"
- address - the item address (the list basis - Multistate-Bargraph)
- id - the id of the list item
- subitem - the id of the list subitem (starts from zero, 0 - the basis and etc.)
27. It assigns value 0 to the Visible list item Visible=0
send_command dvTP, "'IRLB_ITEM_HIDE-<address,id,subitem>'"
- address - the item address (the list basis - Multistate-Bargraph) ;
- id - the identifier of the list item ;
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.).
28. It assigns 1 value to the Enable list item Enable=1
send_command dvTP, "'IRLB_ITEM_ENABLE-<address,id,subitem>'"
- address - the item address (the list basis - Multistate-Bargraph);
- id - the id of the list item ;
- subitem - the id of the list subitem (starts from zero, 0 - the basis and etc.).
29. It assigns 0 value to the Enable list item Enable=0
send_command dvTP, "'IRLB_ITEM_DISABLE-<address,id,subitem>'"
- address - the item address (the list basis - Multistate-Bargraph);
- id - the identifier of the list item;
- subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.).