FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.daemon.userIO.Console Class Reference

A simple console based user interface. More...

Inheritance diagram for frodo2.daemon.userIO.Console:

Public Member Functions

 Console (Daemon daemon)
 The constructor.
void tellUser (String message)
void stopRunning ()
void run ()
 The main loop that waits for user input is situated here.
void parseInput (String input)
 A simple function that looks at the input and determines what to.
Public Member Functions inherited from frodo2.daemon.userIO.UserIO
 UserIO (Daemon daemon)
 Constructor.
void start ()
void load (String filename)
 Used to load a new configuration file.
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
void setQueue (Queue queue)
void registerController (AgentAddress address)
 Report the daemon to the controller.
void exit ()
 Quit the daemon;.
Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T >
default void notifyIn (Message msg, Object toAgent)
 Notifies the listener of an incoming message.

Package Attributes

boolean done = false
 This variable is used to determine whether the program should exit or not.
Package Attributes inherited from frodo2.daemon.userIO.UserIO
Daemon daemon
 The daemon this UI belongs to.
Queue queue
 the daemons queue

Private Attributes

final String prefix
 The command line prefix.

Detailed Description

A simple console based user interface.

The console responds to the following commands

  • to register the daemon to the controller, type controller [IP of the controller] 3000 (the latter is the port of the controller)
  • to exit, type exit
    Author
    Brammert Ottens, Thomas Leaute

Constructor & Destructor Documentation

◆ Console()

frodo2.daemon.userIO.Console.Console ( Daemon daemon)

The constructor.

Parameters
daemonthe daemon

References frodo2.daemon.userIO.UserIO.daemon.

Member Function Documentation

◆ parseInput()

void frodo2.daemon.userIO.Console.parseInput ( String input)

A simple function that looks at the input and determines what to.

Parameters
inputthe input to be parsed
Todo
The controller's port should be parameterizable

References frodo2.daemon.userIO.UserIO.exit(), frodo2.daemon.userIO.UserIO.load(), frodo2.controller.Controller.PORT, frodo2.daemon.userIO.UserIO.registerController(), and tellUser().

Referenced by run().

Here is the call graph for this function:

◆ run()

void frodo2.daemon.userIO.Console.run ( )

The main loop that waits for user input is situated here.

See also
java.lang.Thread#run()

References done, and parseInput().

Here is the call graph for this function:

◆ stopRunning()

void frodo2.daemon.userIO.Console.stopRunning ( )

◆ tellUser()

void frodo2.daemon.userIO.Console.tellUser ( String message)
See also
frodo2.controller.userIO.UserIO.tellUser(java.lang.String)

Reimplemented from frodo2.daemon.userIO.UserIO.

Referenced by parseInput().

Member Data Documentation

◆ done

boolean frodo2.daemon.userIO.Console.done = false
package

This variable is used to determine whether the program should exit or not.

Referenced by run(), and stopRunning().

◆ prefix

final String frodo2.daemon.userIO.Console.prefix
private

The command line prefix.


The documentation for this class was generated from the following file: