Set up BeoLink Gateway - Macros - Resource Command
37
Actions on macros
A macro can contain delays between commands, and therefore take some time to complete. What happens if, that during the macro execution,
another related macro is called? Several commands act on macros:
- FIRE: Call the macro, as if an event for that macro had happened. This is the default action.
- CANCEL: Will stop executing an on going macro.
- COLLAPSE: Will execute remaining commands in a on-going macro, but with no delays between commands.
Firing another macro makes it possibly to take advantage of existing functionality without having to maintain several copies inside different
macros. Although not recommenden, it is possible to make a loop where a macro calls itself as the last command, e.g. switching Off growth light
for plants; night and day temperature control etc. It is required to make a macro that stops such loops.
Macro-considerations
As a macro execution can take some time due to delays between commands, it is important to take care of what could happen if another macro is
triggered during the execution - for instance if a macro called ‘THEATER ON’ (for setting- up a home theatre) takes more than one minute to
execute.
What will happen if this macro is called repeatedly? Will all commands start to overlap each other?
What will happen if the THEATER OFF macro is called to switch the home theatre off during the set-up?
It is important to understand that a possible messy overlap of command executions from different macros may occur.
The possibility to cancel or collapse a macro being executed ensures that the ongoing macro will end immediately.
In the above mentioned example, the macro to switch the home theatre Off should first cancel the macro for setting-up the home theatre:
THEATER OFF macro commands:
1. Cancel THEATER ON macro.
2. Raise screen.
3. Shut down projector.
4. Switch BeoVision to STAND-BY.
5. Etc.
Orphan commands and events
If commands and events are defined for a resource, and the resource is deleted or modified to another address, events and commands will become
orphan (without an associated resource).
Orphan events and commands will still be available, and refer to the original addressing of the resource.
The macro screen will signal the presence of orphan commands or events by colour coding and text in the macro header.