acs_ex v0.3.5 ACS.Session

The actual ACS-CPE session is handled here. A session is initiated when an Inform arrives, therefore the init function takes a parsed Inform request as an argument.

We let the supervisor handle the main session handler, and then we register new sessions with the session_begins method

Summary

Functions

Processes a message from the plug. “message” is the CWMP.Protocol version of the parsed request sent into the plug

Used for :trap_exit

when stuff is sent into this session, like CWMP messages or other stuff

Script message. This means the a scripting process wants a response to a request we just put the request in the plug queue and answer no_reply here

this is spawn_linked and should apply the call to the module

When something non-Inform’ish is sent into the session we need to find and verify the session

Functions

handle_call(msg, from, state)

Processes a message from the plug. “message” is the CWMP.Protocol version of the parsed request sent into the plug.

handle_info(msg, state)

Used for :trap_exit

  1. signal with reply/2 that this is over
  2. kill me?
has_inform?(list)
process_message(session_id, message)

when stuff is sent into this session, like CWMP messages or other stuff.

script_command(device_id, command)

Script message. This means the a scripting process wants a response to a request we just put the request in the plug queue and answer no_reply here.

session_prestart(gspid, script_module, device_id, message, sessionid, fun)

this is spawn_linked and should apply the call to the module

start_link(list, session_id, device_id, message, fun \\ nil)

For the supervisor.

verify_session(session_id, remote_host)

When something non-Inform’ish is sent into the session we need to find and verify the session.