grandMA3 User Manual Publication
CheckDMXCollision(handle, string[, integer[, integer]])
grandMA3 User Manual » Plugins » Lua Functions - Object-Free API » CheckDMXCollision(handle, string[, integer[, integer]])
|
Version 2.1
|
Description
The CheckDMXCollision Lua function checks if a specific DMX address range is available or already used.
It uses the number of DMX channels in a specific "DMX mode" of a fixture type to calculate the number of DMX channels that should be available from a specified DMX start address.
All fixture types have at least one defined DMX mode. But fixtures often have more than one mode. This Lua function uses a specific DMX mode of a fixture type.
Arguments
-
Handle:
The handle must be for a "DMX mode". This is used to calculate how many DMX channels should be available in the range. - String:
This must be a DMX address expressed as a string. This defines the start of the range to be checked. -
Integer (optional)|nil:
This optional integer is a count of subsequent "DMX Modes" that should also be checked. The default value is 1.
For instance, if the provided "DMX Mode" uses 10 DMX channels and the count is set to 5, then there must be 50 unpatched DMX channels from the start address for a positive result. -
Integer (optional):
This optional integer indicates the break_index. The default value is 0, which is the first "DMX break" defined for the "DMX mode". All fixture types have at least one defined "DMX break".
Return
-
Boolean:
The function returns a boolean.-
True:
The DMX address is available as a start address. -
False:
The DMX address is unavailable as a start address for the calculated number of DMX channels.
-
True:
Example
This example prints feedback to the DMX collision check based on a DMX address of "1.001" and the DMX mode of the first fixture in the current selection:
Lua |
return function() |