FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.test.MessageDebugger Class Reference

Prints out all messages received and sent by the agent. More...

Inheritance diagram for frodo2.algorithms.test.MessageDebugger:

Public Member Functions

 MessageDebugger (DCOPProblemInterface<?, ?> problem, Element params)
 Constructor.
void setQueue (Queue queue)
Collection< MessageTypegetMsgTypes ()
Decision notifyOut (Message msg)
Decision notifyOut (Object fromAgent, Message msg, Collection<? extends Object > toAgents)
void notifyIn (Message msg)
void notifyIn (Message msg, Object toAgent)
MessageDebugger getEavesdropper ()
Public Member Functions inherited from frodo2.communication.OutgoingMsgPolicyInterface< T >
default Decision notifyOut (Object fromAgent, Message msg)
 Notifies the listener of an outgoing message.
default Decision notifyOut (Message msg, Collection<? extends Object > toAgents)
 Notifies the listener of an outgoing message.

Private Member Functions

 MessageDebugger (DCOPProblemInterface<?, ?> problem, boolean perAgent, boolean hideSystemMessages, String vizClassName)
 Constructor.
Visualizer createVisualizer ()

Private Attributes

final String agent
 The name of this agent.
final boolean hideSystemMessages
 Whether to display system messages.
boolean perAgent = false
 If true, the eavesdropper will be added to each agent's queue and report message exchanged.
final String vizClassName
 The class name for the Visualizer.
final Visualizer viz
 The Visualizer used to display the messages exchanged.
final DCOPProblemInterface<?, ?> problem
 The problem instance.

Detailed Description

Prints out all messages received and sent by the agent.

Author
Thomas Leaute
Warning
Printing out all messages exchanges can be computationally expensive. Only use this feature for debugging purposes.

Constructor & Destructor Documentation

◆ MessageDebugger() [1/2]

frodo2.algorithms.test.MessageDebugger.MessageDebugger ( DCOPProblemInterface<?, ?> problem,
Element params )

Constructor.

Parameters
problemthe problem instance
paramsthe parameters for this module

References createVisualizer(), and problem.

Referenced by getEavesdropper().

Here is the call graph for this function:

◆ MessageDebugger() [2/2]

frodo2.algorithms.test.MessageDebugger.MessageDebugger ( DCOPProblemInterface<?, ?> problem,
boolean perAgent,
boolean hideSystemMessages,
String vizClassName )
private

Constructor.

Parameters
problemthe problem instance
perAgentif true, the eavesdropper will be added to each agent's queue and report message exchanged
hideSystemMessageswhether to display system messages
vizClassNamethe class name for the Visualizer

References createVisualizer(), hideSystemMessages, perAgent, problem, and vizClassName.

Here is the call graph for this function:

Member Function Documentation

◆ createVisualizer()

Visualizer frodo2.algorithms.test.MessageDebugger.createVisualizer ( )
private
Returns
a Visualizer of the class specified in the agent config

References frodo2.gui.Visualizer.render(), and frodo2.gui.Visualizer.setCompiled().

Referenced by MessageDebugger(), and MessageDebugger().

Here is the call graph for this function:

◆ getEavesdropper()

MessageDebugger frodo2.algorithms.test.MessageDebugger.getEavesdropper ( )
See also
Eavesdroppable.getEavesdropper()

Implements frodo2.algorithms.Eavesdroppable< T >.

References MessageDebugger().

Here is the call graph for this function:

◆ getMsgTypes()

Collection< MessageType > frodo2.algorithms.test.MessageDebugger.getMsgTypes ( )

◆ notifyIn() [1/2]

void frodo2.algorithms.test.MessageDebugger.notifyIn ( Message msg)
See also
IncomingMsgPolicyInterface.notifyIn(Message)

Implements frodo2.communication.IncomingMsgPolicyInterface< T >.

References notifyIn().

Referenced by notifyIn().

Here is the call graph for this function:

◆ notifyIn() [2/2]

◆ notifyOut() [1/2]

Decision frodo2.algorithms.test.MessageDebugger.notifyOut ( Message msg)
See also
OutgoingMsgPolicyInterface.notifyOut(Message)

Implements frodo2.communication.OutgoingMsgPolicyInterface< T >.

References notifyOut().

Referenced by notifyOut().

Here is the call graph for this function:

◆ notifyOut() [2/2]

◆ setQueue()

void frodo2.algorithms.test.MessageDebugger.setQueue ( Queue queue)

Member Data Documentation

◆ agent

final String frodo2.algorithms.test.MessageDebugger.agent
private

The name of this agent.

◆ hideSystemMessages

final boolean frodo2.algorithms.test.MessageDebugger.hideSystemMessages
private

Whether to display system messages.

Referenced by MessageDebugger().

◆ perAgent

boolean frodo2.algorithms.test.MessageDebugger.perAgent = false
private

If true, the eavesdropper will be added to each agent's queue and report message exchanged.

Referenced by MessageDebugger().

◆ problem

final DCOPProblemInterface<?, ?> frodo2.algorithms.test.MessageDebugger.problem
private

The problem instance.

Referenced by MessageDebugger(), and MessageDebugger().

◆ viz

final Visualizer frodo2.algorithms.test.MessageDebugger.viz
private

The Visualizer used to display the messages exchanged.

◆ vizClassName

final String frodo2.algorithms.test.MessageDebugger.vizClassName
private

The class name for the Visualizer.

Referenced by MessageDebugger().


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