- 
                Notifications
    
You must be signed in to change notification settings  - Fork 7
 
isexist_agent
        Tushar Semwal edited this page Oct 15, 2017 
        ·
        1 revision
      
    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 ?>
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.
?- 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.