on_wln_task_complete Event

Function:

Generated when the Wi-Fi interface completes executing a given task.

Declaration:

on_wln_task_complete(completed_task as pl_wln_tasks)

See Also:

Tasks


Part

Description

completed_task

The task just completed:

  • 1 — PL_WLN_TASK_SCAN: Passive scan task completed (this task is initiated through the wln.scan method).
  • 2 — PL_WLN_TASK_ASSOCIATE: Association task completed (this task is initiated through the wln.associate method)*.
  • 3 — PL_WLN_TASK_SETTXPOWER: TX power adjustment task completed (this task is initiated through the wln.settxpower method). This is an "immediate" task.
  • 4 — PL_WLN_TASK_SETWEP: WEP mode and keys setup task completed (this task is initiated through the wln.setwep method). This is an "immediate" task.
  • 5 — PL_WLN_TASK_DISASSOCIATE: Disassociation task completed (this task is initiated through the wln.disassociate method).
  • 6 — PL_WLN_TASK_NETWORK_START: Own network creation completed (this task is initiated through the wln.networkstart method).
  • 7 — PL_WLN_TASK_NETWORK_STOP: Won network termination completed (this task is initiated through the wln.networkstop method).
  • 8 — PL_WLN_TASK_SETWPA: WPA mode and keys setup task completed (this task is initiated through the wln.setwpa method). This is an "immediate" task.
  • 9 — PL_WLN_TASK_ACTIVESCAN: Active scan task completed (this task is initiated through the wln.activescan method).

* When WPA or WPA2 security is used, this event will really mean "pre-association completed." After this, the Wi-Fi interface must still execute the WPA handshake. If this fails, your device will be disassociated from the network and an on_wln_event(1 — PL_WLN_EVENT_DISASSOCIATED) event will be generated.


Details

The wln.task read-only property will change to 0 PL_WLN_TASK_IDLE along with this event generation.

Multiple on_wln_task_complete events may be waiting in the event queue.  For this reason, the doevents statement will be skipped (not executed) if encountered within the event handler for this event or the body of any procedure in the related call chain.


on_wln_task_complete Event

Details