![]() |
OpenMash Documentations | Class Index | Method Index | Class Hierarchy |
TCL CLASS
ASCP
Base class for active service control protocol v3 in active service framework.
ASCP/Client, ASCP/Manager, ASCP/Service
An array indexed by agent spec, that contains time the last announcement was made to the corresponding agent. Time are stored as absolute time (gettimeofday) and as ascii time ( clock format).
An array indexed by agent spec, that contains average time between announcement from the corresponding agent.
init, destroy, version, version, send_announcement, bye, agent_id, agent_type, process_packet, args, ssg_port, service_location, service_type, service_instance, recv_announcement, del_agent, error, bandwidth, as_args, register, unregister, control_port, add_timer, del_timer, timers
ASCP instproc init { session bw }
Initialize various members and timer.
session
ip address and port number of the target session.
bw
bandwidth limit of the protocol.
ASCP instproc destroy { }
Cleanup "after" callback.
ASCP proc version { }
Return the version string of the current Active Service Framework.
ASCP proc version { }
Return the version string of the current Active Service Framework.
ASCP public send_announcement { }
Construct an announcement, and send it.
ASCP instproc bye { }
Construct a BYE announcement and announce it.
ASCP public agent_id { }
Return a string that represent an instance of the current agent.
ASCP public agent_type { }
Subclass should overwrite this to return agent type.
ASCP public process_packet { addr packet }
Agent specific handling of message. Subclass should overwrite this. NOTE: This is responsible for freeing $packet.
packet
The ASCP packet received.
addr
Address where this packet comes from.
ASCP public args { }
Subclass should overwrite this to return agent specific data.
ASCP public ssg_port { }
Subclass should overwrite this to return port number to a soft state gateway.
ASCP instproc service_location { }
Subclass should overwrite this to return the service location.
ASCP instproc service_type { }
Subclass should overwrite this to return the service type.
ASCP instproc service_instance { }
Subclass should overwrite this to return the service type.
ASCP instproc recv_announcement { addr port data size }
Called when an announcement is received. The announcement is parsed and special cases are handled (DEATH, BYE, wrong version). The method "process_packet {}" is then called to process other general messages.
size
The length of data in bytes.
data
The data contained in this announcement.
port
The port number where this announcement came from.
addr
The address where this announcement came from.
ASCP instproc del_agent { agent_id }
Assume that the agent specified by $agent_id is dead. Clean up all states corresponding to that agent.
agent_id
Specification to the agent to be deleted.
ASCP instproc error { msg }
Print an error message. Subclass may want to overwrite this so that it is printed to somewhere else, for e.g. a log file.
msg
The error message
ASCP instproc bandwidth { }
ASCP instproc as_args { }
ASCP instproc register { addr packet }
ASCP instproc unregister { addr packet }
ASCP instproc control_port { }
ASCP instproc add_timer { timer }
ASCP instproc del_timer { timer }
ASCP instproc timers { op args }
start, stop, announce, recv, timer, get_timer, set_announcement, get_announcement, ttl
Generated on Mon Apr 12 04:04:16 PDT 2004