User Tools

Site Tools


pom-ng:lua

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pom-ng:lua [2014/05/25 13:20] – fix naming - they are named key and value not k, v 46.14.206.196pom-ng:lua [2020/05/26 21:59] (current) – external edit 127.0.0.1
Line 252: Line 252:
 === event.timestsamp === === event.timestsamp ===
 == Returns: == == Returns: ==
-Returns the timestamp when the event started in ms.+Returns the timestamp when the event started in micro seconds since epoch.
 ==== output ==== ==== output ====
  
Line 260: Line 260:
 Called when an instance of the output is stopped. This function must be implemented by addon. Called when an instance of the output is stopped. This function must be implemented by addon.
  
-=== output:event_listen_start(event_name, process_begin_function, process_end_function) ===+=== output:event_listen_start(event_name, process_begin_function, process_end_function, filter) ===
 Call this function to start listening to a particular event. You must call output:event_listen_stop(event_name) when you are done listening to that particular event. Call this function to start listening to a particular event. You must call output:event_listen_stop(event_name) when you are done listening to that particular event.
  
Line 267: Line 267:
   * //process_begin_function//: Function that will be called when an event starts. Its prototype is process_function(event).   * //process_begin_function//: Function that will be called when an event starts. Its prototype is process_function(event).
   * //process_end_function//: Function that will be called when an event stops. Its prototype is process_function(event).   * //process_end_function//: Function that will be called when an event stops. Its prototype is process_function(event).
 +  * //filter//: String containing an event filter, optional.
  
 === output:event_listen_stop(event_name) === === output:event_listen_stop(event_name) ===
Line 277: Line 278:
 Called when an instance of the output is started. This function must be implemented by addon. Called when an instance of the output is started. This function must be implemented by addon.
  
-=== output:pload_listen_start(open_function, write_function, close_function) ===+=== output:pload_listen_start(open_function, write_function, close_function, filter) ===
 Start listening to payloads. Every payload will be processed. It's up to the output to filter them. If you don't need a specific function, you can specify nil instead. Start listening to payloads. Every payload will be processed. It's up to the output to filter them. If you don't need a specific function, you can specify nil instead.
  
Line 284: Line 285:
   * //write_function//: Function that will be called when new data from a payload are available. Its prototype is write_function(payload_priv, payload_data). It must return **true** to continue processing the payload, other **false**.   * //write_function//: Function that will be called when new data from a payload are available. Its prototype is write_function(payload_priv, payload_data). It must return **true** to continue processing the payload, other **false**.
   * //close_function//: Function that will be called once a payload has been fully processed. Its prototype is close_function(payload_priv).   * //close_function//: Function that will be called once a payload has been fully processed. Its prototype is close_function(payload_priv).
 +  * //filter//: Pload filter to use, optional.
  
 == Parameters of the above functions: == == Parameters of the above functions: ==
Line 310: Line 312:
 == Returns: == == Returns: ==
 Returns the event related to this payload. Returns the event related to this payload.
 +
 +=== pload.filename ===
 +
 +== Returns: ==
 +Returns the pload filename if it has been set, nil otherwise.
  
 === pload.parent === === pload.parent ===
Line 348: Line 355:
 Close the plugin and releases all the associated data. Close the plugin and releases all the associated data.
  
-=== plugin:event_listen_start(event_name) ===+=== plugin:event_listen_start(event_name, filter) ===
 Have the plugin listens to a specific event and process it. Have the plugin listens to a specific event and process it.
  
 == Parameters: == == Parameters: ==
   * //event_name//: Name of the event to listen to.   * //event_name//: Name of the event to listen to.
 +  * //filter//: String containing an event filter, optional.
  
 === plugin:event_listen_stop(event_name) === === plugin:event_listen_stop(event_name) ===
pom-ng/lua.1401024001.txt.gz · Last modified: 2020/05/26 21:59 (external edit)