Skip to content

zonemanaged Lua Interface


get

Get a pointer to the ZoneManaged object

Arguments:
any ptr Pointer to Module object
Returns:
zonemanaged ptr Pointer to casted ZoneManaged object

Example

ptr = zonemanaged:.get(ptr)


get

Get a pointer to the ZoneManaged object

Arguments:
any ptr Pointer to Module object
Returns:
zonemanaged ptr Pointer to casted ZoneManaged object

Example

ptr = zonemanaged:.get(ptr)


getConfig

Get the configuration object for the plugin

Arguments:

Returns:
table obj Map with configurations

Example

obj = zonemanaged:.getConfig()


processZones

Check what targets are entering/exiting zones

Arguments:
CheckTarget[] targets List of targets to check

Example

zonemanaged:.processZones(targets)


processZones

Check what targets are entering/exiting selected zones

Arguments:
CheckTarget[] targets List of targets to check
string[] zonesFilter List of zones to process

Example

zonemanaged:.processZones(targets,zonesFilter)


processZones

Check what targets are entering/exiting zones

Arguments:
CheckTarget[] targets List of targets to check
table options Options to use (not implemented yet)

Example

zonemanaged:.processZones(targets,options)


processZones

Check what targets are entering/exiting selected zones

Arguments:
CheckTarget[] targets List of targets to check
string[] zonesFilter List of zones to process
table options Options to use (not implemented yet)

Example

zonemanaged:.processZones(targets,zonesFilter,options)


processZones

Check what targets are entering/exiting selected zones

Arguments:
CheckTarget[] targets List of targets to check
string groupFilter Group of zones to process

Example

zonemanaged:.processZones(targets,groupFilter)


processZones

Check what targets are entering/exiting selected zones

Arguments:
CheckTarget[] targets List of targets to check
string groupFilter Group of zones to process
table options Options to use (not implemented yet)

Example

zonemanaged:.processZones(targets,groupFilter,options)


getZoneEvents

Get enters and exits for all zones

Arguments:

Returns:
table Vector of vectors in the format { { targetId, zoneId, <0: enter, 1: exit> } }

Example

Vector = zonemanaged:.getZoneEvents()


getName

Get the plugin name

Arguments:

Returns:
string name Plugin Name

Example

name = zonemanaged:.getName()


createZone

Create a new zone

Arguments:
any ptr Pointer to ZoneManaged object
string name Zone name
string type Zone type
table shape Table with array of points that make the Zone shape
number[] color Color values (Array with 1 (grayscale) or 3 (RGB) or 4 (RGBA) values in range 0-1)
Returns:
number id ID for the new zone

Example

id = zonemanaged:.createZone(ptr,name,type,shape,color)


registerKnownZones

Register zones that are known in the config dict which are not created via zone interface

Arguments:

Example

zonemanaged:.registerKnownZones()


getZoneIds

Get a list of current Zone id's

Arguments:
any ptr Pointer to ZoneManaged object
Returns:
table ids table with zone id's

Example

ids = zonemanaged:.getZoneIds(ptr)


getZoneById

Get a Zone with a specific id

Arguments:
any ptr Pointer to ZoneManaged object
string zoneid **
Returns:
table zone Object representing zone

Example

zone = zonemanaged:.getZoneById(ptr,zoneid)


getZones

Get a list of current Zones

Arguments:
any ptr Pointer to ZoneManaged object
integer format 0: state data, 1: configuration data, 2: both merged
Returns:
table zones table

Example

zones = zonemanaged:.getZones(ptr,format)


deleteZoneById

Delete a Zone with a specific id

Arguments:
any ptr Pointer to ZoneManaged object
string zoneid **

Example

zonemanaged:.deleteZoneById(ptr,zoneid)


getZoneValue

Fetch the values correspond to a zone

Arguments:

Example

zonemanaged:.getZoneValue()


setZoneValue

Save the values correspond to a zone

Arguments:

Example

zonemanaged:.setZoneValue()


updateZoneShape

Set a new zone shape for a specific zone

Arguments:
any ptr Pointer to ZoneManaged object
string zoneid Id of the zone to change shape
table shape Table with array of points that make the Zone shape

Example

zonemanaged:.updateZoneShape(ptr,zoneid,shape)


updateZoneColor

Set a new zone color for a specific zone

Arguments:
any ptr Pointer to ZoneManaged object
string zoneid Id of the zone to change color
number[] color New color values (Array with 4 values)

Example

zonemanaged:.updateZoneColor(ptr,zoneid,color)


updateZoneName

Set a new zone name for a specific zone

Arguments:
any ptr Pointer to ZoneManaged object
string zoneid Id of the zone to change name
string name New name

Example

zonemanaged:.updateZoneName(ptr,zoneid,name)


updateZoneType

Set a new zone type for a specific zone

Arguments:
any ptr Pointer to ZoneManaged object
string zoneid Id of the zone to change type
string type New type

Example

zonemanaged:.updateZoneType(ptr,zoneid,type)


updateZoneHits

Set a the current_entries property for a specific zone

Arguments:
any ptr Pointer to ZoneManaged object
string zoneid Id of the zone to change type
number hits Total hits to set

Example

zonemanaged:.updateZoneHits(ptr,zoneid,hits)


isPointInZone

Check if a Point is inside any zone

Arguments:
any ptr Pointer to ZoneManaged object
number[] pt Point to check (Array with 2 values)
Returns:
number[] ids vector of zone ids that match the condition

Example

ids = zonemanaged:.isPointInZone(ptr,pt)


resetZones

Clears state of all zones

Arguments:

Example

zonemanaged:.resetZones()


deleteZones

Deletes all zones

Arguments:

Example

zonemanaged:.deleteZones()