AgentIDs

API

Fjage.AgentIDType
aid = AgentID(name[, istopic])
aid = AgentID(name[, owner])
aid = AgentID(name[, istopic[, owner]])

Create an AgentID, optionally with an owner.

Base.:<<Method
rsp = aid << msg

Send a request via the gateway to the specified agent, and wait for a response.

Fjage.requestFunction
rsp = request(aid, msg[, timeout])

Send a request via the gateway to the specified agent, and wait for a response. The response is returned. The agentID (aid) specified must be an "owned" agentID obtained from the agent(gw, name) function or returned by the agentforservice(gw, service) function. The timeout is specified in milliseconds, and defaults to 1 second if unspecified.

Fjage.sendMethod
send(aid, msg)

Send a message via the gateway to the specified agent. The agentID (aid) specified must be an "owned" agentID obtained from the agent(gw, name) function or returned by the agentforservice(gw, service) function.

Fjage.topicMethod
aid = topic([owner,] name[, subtopic])

Creates an AgentID for a named topic, optionally owned by an owner. AgentIDs that are associated with gateways/agents can be used directly in send() and request() calls.