Skip to content

tripwiremanaged Lua Interface


get

Get a pointer to the TripwireManaged object

Arguments:
any ptr Pointer to Module object
Returns:
tripwiremanaged ptr Pointer to casted TripwireManaged object

Example

ptr = tripwiremanaged:.get(ptr)


getConfig

Get the configuration object for the plugin

Arguments:

Returns:
table obj Map with configurations

Example

obj = tripwiremanaged:.getConfig()


getName

Get the plugin name

Arguments:

Returns:
string name Plugin Name

Example

name = tripwiremanaged:.getName()


processTripwires

Check what targets are crossing lines

Arguments:
CheckTarget[] targets List of targets to check

Example

tripwiremanaged:.processTripwires(targets)


processTripwires

Check what targets are crossing lines

Arguments:
CheckTarget[] targets List of targets to check
string[] tripwiresFilter List of tripwires to process

Example

tripwiremanaged:.processTripwires(targets,tripwiresFilter)


processTripwires

Check what targets are crossing lines

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

Example

tripwiremanaged:.processTripwires(targets,options)


processTripwires

Check what targets are crossing lines

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

Example

tripwiremanaged:.processTripwires(targets,tripwiresFilter,options)


processTripwires

Check what targets are crossing lines

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

Example

tripwiremanaged:.processTripwires(targets,groupFilter)


processTripwires

Check what targets are crossing lines

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

Example

tripwiremanaged:.processTripwires(targets,groupFilter,options)


getTripwireEvents

Get crossings for all Tripwires

Arguments:

Returns:
table Vector of vectors in the format { { target_id, tripwire_id, direction } }

Example

Vector = tripwiremanaged:.getTripwireEvents()


createTripwire

Create a new tripwire

Arguments:
name Tripwire name
group Tripwire group
type Tripwire type
shape Object with vector of points that make the Tripwire shape
color Tripwire color
direction Tripwire crossing direction
Returns:
number ID for the new tripwire

Example

ID = tripwiremanaged:.createTripwire(Tripwire,Tripwire,Tripwire,Object,Tripwire,Tripwire)


registerKnownTripwires

Register tripwires that are known in the config dict which are not created via TripwireManaged

Arguments:

Example

tripwiremanaged:.registerKnownTripwires()


getTripwireById

Get a Tripwire with a specific id

Arguments:
any ptr Pointer to TripwireManaged object
string tripwireid **
Returns:
table tripwire Object representing tripwire

Example

tripwire = tripwiremanaged:.getTripwireById(ptr,tripwireid)


getTripwires

Get a list of current Tripwires

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

Example

tripwires = tripwiremanaged:.getTripwires(ptr,format)


deleteTripwireById

Delete a Tripwire with a specific id

Arguments:
any ptr Pointer to TripwireManaged object
string tripwireid **

Example

tripwiremanaged:.deleteTripwireById(ptr,tripwireid)


getTripwireValue

Fetch the values correspond to a tripwire

Arguments:

Example

tripwiremanaged:.getTripwireValue()


setTripwireValue

Save the values correspond to a tripwire

Arguments:

Example

tripwiremanaged:.setTripwireValue()


deleteTripwires

Deletes all tripwires

Arguments:

Example

tripwiremanaged:.deleteTripwires()