Skip to content

isexist_agent

Tushar Semwal edited this page Oct 15, 2017 · 1 revision

Syntax:

isexist_agent(Agent_name,(IP,Port),Handler)   % The predicate can be used to check the existence of a specific agent in a platform.  %

Agent _name: <atom ?> IP: <atom ?> Port: <integer ?> Handler: <atom ?>

Description:

This predicate checks if any agent exists with the name provided within the predicate. If so, it provides details regarding its IP, Port number and handler. The predicate fails otherwise.

Example:

?- isexist_agent(agent1,(IP,Port),Handler).

The results are:

?- IP = localhost, 
?- Port = 5658, 
?- Handler = mobileagent. 
?- isexist_agent(agent1,(IP,5658),Handler). 

The results are:

?-IP = localhost, 
?- Handler = mobileagent. 
Clone this wiki locally