I don't know better for now than show you the links to the online manual to start with them:
http://www.conitec.net/beta/aentity-event.htmhttp://www.conitec.net/beta/aent-scan_entity.htmTry to build simple functions build on that. It is quite complicated.
Probably, in some issues of the AUM Magazine are articles about that, but I don't know where.