home OpenMash Documentations
Class Index Method Index Class Hierarchy

TCL CLASS

ASCP

Base class for active service control protocol v3 in active service framework.

SUPERCLASSES

AnnounceListenManager

SUBCLASSES

ASCP/Client, ASCP/Manager, ASCP/Service

MEMBERS

lastann_, avgdelta_

lastann_

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).

avgdelta_

An array indexed by agent spec, that contains average time between announcement from the corresponding agent.

METHODS

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

init

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.

destroy

ASCP instproc destroy { }

Cleanup "after" callback.

version

ASCP proc version { }

Return the version string of the current Active Service Framework.

version

ASCP proc version { }

Return the version string of the current Active Service Framework.

send_announcement

ASCP public send_announcement { }

Construct an announcement, and send it.

bye

ASCP instproc bye { }

Construct a BYE announcement and announce it.

agent_id

ASCP public agent_id { }

Return a string that represent an instance of the current agent.

agent_type

ASCP public agent_type { }

Subclass should overwrite this to return agent type.

process_packet

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.

args

ASCP public args { }

Subclass should overwrite this to return agent specific data.

ssg_port

ASCP public ssg_port { }

Subclass should overwrite this to return port number to a soft state gateway.

service_location

ASCP instproc service_location { }

Subclass should overwrite this to return the service location.

service_type

ASCP instproc service_type { }

Subclass should overwrite this to return the service type.

service_instance

ASCP instproc service_instance { }

Subclass should overwrite this to return the service type.

recv_announcement

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.

del_agent

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.

error

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

bandwidth

ASCP instproc bandwidth { }

as_args

ASCP instproc as_args { }

register

ASCP instproc register { addr packet }

unregister

ASCP instproc unregister { addr packet }

control_port

ASCP instproc control_port { }

add_timer

ASCP instproc add_timer { timer }

del_timer

ASCP instproc del_timer { timer }

timers

ASCP instproc timers { op args }

INHERITED METHODS

start, stop, announce, recv, timer, get_timer, set_announcement, get_announcement, ttl

FILENAME

tcl/indiva/lib/ascp.tcl


Generated on Mon Apr 12 04:04:16 PDT 2004