FF3DDeviceOutputAgent Class Reference
[ForceFeedBack 3d Device]

#include <FF3DDeviceOutputAgent.h>

Inherits MicoleAgent.

Collaboration diagram for FF3DDeviceOutputAgent:

Collaboration graph
[legend]
List of all members.

Detailed Description

Handle micolebus message like "OUT FF3D : " and give order to FF3DDevice via Reachin Collider.

See also:
FF3DDeviceOutputAgentCollider
FF3DDeviceOutputAgent handle this sort of "packet" on the micoleBus

FF3DDeviceOutputAgent recognized messages.

This is common FF3DDevice ForceModel command
OUT FF3D : point=(x, y, z)
Constraint device on a point.
OUT FF3D : sphere=(x, y, z, radius);
Constraint device into a sphere.
OUT FF3D : line=((x1, y1, z1),(x2, y2, z2));
Constraint device on a line
OUT FF3D : plan=((x1, y1, z1),(x2, y2, z2));
Constraint device on a plan. Second triplet define normal vector on plan.
OUT FF3D : disc=((x1, y1, z1),(x2, y2, z2),radius);
Constraint device on a disc. Same as plan force model but with a limitation around base point defined by first triplet.
OUT FF3D : none;
Remove current force model.

Definition at line 74 of file FF3DDeviceOutputAgent.h.

Public Member Functions

 FF3DDeviceOutputAgent ()
 Default Constructor.
virtual ~FF3DDeviceOutputAgent ()
void setForceModel (FF3DForceModel *fm)
 you can specify a force model
string getAgentName ()
string getAgentType ()
void onApplicationConnected (MicoleBus *app)
void onApplicationDisconnected (MicoleBus *app)
void handlePingMessage (MicoleBus *app, int argc, const char **argv)
void handleQuitMessage (MicoleBus *app, int argc, const char **argv)
void handleSuspendMessage (MicoleBus *app, int argc, const char **argv)
void handleResumeMessage (MicoleBus *app, int argc, const char **argv)
void handleRegisterReply (MicoleBus *app, int argc, const char **argv)
void handleStartMessage (MicoleBus *app, int argc, const char **argv)
void handlePrintIDMessage (MicoleBus *app, int argc, const char **argv)
int sendMessage (const char *message)
 Sends a message using bus->SendMsg.
int sendMessage (const string message)
 Sends a message using bus->SendMsg.
void sendMessage (const char *to, const char *message)
 Sends a message to the MicoleBus *app by calling app->SendMsg(const char *message) The message goes only to agent specified by const char *to.

Public Attributes

Playbackpb
FILE * log

Protected Member Functions

virtual void handlePointForceModel (MicoleBus *app, int argc, const char **argv)
 handle point force model order via Micole Bus
virtual void handleLinearForceModel (MicoleBus *app, int argc, const char **argv)
 handle linear model order via Micole Bus
virtual void handlePlanarForceModel (MicoleBus *app, int argc, const char **argv)
 handle planar model order via Micole Bus
virtual void handleNoForceModel (MicoleBus *app, int argc, const char **argv)
 handle none force model order via Micole Bus
virtual void handleSphericalForceModel (MicoleBus *app, int argc, const char **argv)
 handle spherical force model order via Micole Bus
virtual void handleDiscForceModel (MicoleBus *app, int argc, const char **argv)
 handle disc force model order via Micole Bus
virtual void handlePicobHgForceModel (MicoleBus *app, int argc, const char **argv)
 handle linear with Picob model order via Micole Bus
virtual void handlePicobGForceModel (MicoleBus *app, int argc, const char **argv)
 handle linear with Picob model order via Micole Bus
int bindMessage (const char *regexp, MicoleCallback *cb)
 Binds a callback method to bus.
void unBindMessage (int messageId)
void unBindMessage (MicoleBinding &binding)
virtual void suspendAgent ()
 Suspends the agent.
virtual void resumeAgent ()
 Resumes the agent.
virtual void stopAgent ()
 Gives inheriting class a chance to save state when the agent receives Quit-message.
void obtainIdentifier ()
 Obtains identifier from the RegistryAgent.

Protected Attributes

vector< MicoleBindingbindings
AgentState state
int resumeId

Static Protected Attributes

static MicoleBusbus = 0

Classes

struct  FF3DDeviceOutputAgentCollider
 FF3DDeviceOutputAgentCollider, add forceModel corresponding to IvyBus instructions. More...


Constructor & Destructor Documentation

FF3DDeviceOutputAgent::FF3DDeviceOutputAgent (  ) 

Default Constructor.

dummy for test

Definition at line 43 of file FF3DDeviceOutputAgent.cpp.

FF3DDeviceOutputAgent::~FF3DDeviceOutputAgent (  )  [virtual]

Definition at line 114 of file FF3DDeviceOutputAgent.cpp.


Member Function Documentation

int MicoleAgent::bindMessage ( const char *  regexp,
MicoleCallback cb 
) [protected, inherited]

Binds a callback method to bus.

When a message that satisfies condition given in *regexp is received, the call back method is called by the bus. Methods that are bound with this message are not called when the agent is SUSPENDED. Methods that are bound using bus->BindMsg() are called also when the agent's state is SUSPENDED.

Definition at line 88 of file MicoleAgent.cpp.

string MicoleAgent::getAgentName (  )  [inherited]

Definition at line 62 of file MicoleAgent.cpp.

string MicoleAgent::getAgentType (  )  [inherited]

Definition at line 67 of file MicoleAgent.cpp.

void FF3DDeviceOutputAgent::handleDiscForceModel ( MicoleBus app,
int  argc,
const char **  argv 
) [protected, virtual]

handle disc force model order via Micole Bus

Definition at line 235 of file FF3DDeviceOutputAgent.cpp.

void FF3DDeviceOutputAgent::handleLinearForceModel ( MicoleBus app,
int  argc,
const char **  argv 
) [protected, virtual]

handle linear model order via Micole Bus

Definition at line 144 of file FF3DDeviceOutputAgent.cpp.

void FF3DDeviceOutputAgent::handleNoForceModel ( MicoleBus app,
int  argc,
const char **  argv 
) [protected, virtual]

handle none force model order via Micole Bus

Definition at line 268 of file FF3DDeviceOutputAgent.cpp.

void FF3DDeviceOutputAgent::handlePicobGForceModel ( MicoleBus app,
int  argc,
const char **  argv 
) [protected, virtual]

handle linear with Picob model order via Micole Bus

Definition at line 305 of file FF3DDeviceOutputAgent.cpp.

void FF3DDeviceOutputAgent::handlePicobHgForceModel ( MicoleBus app,
int  argc,
const char **  argv 
) [protected, virtual]

handle linear with Picob model order via Micole Bus

Definition at line 273 of file FF3DDeviceOutputAgent.cpp.

void MicoleAgent::handlePingMessage ( MicoleBus app,
int  argc,
const char **  argv 
) [inherited]

Definition at line 130 of file MicoleAgent.cpp.

void FF3DDeviceOutputAgent::handlePlanarForceModel ( MicoleBus app,
int  argc,
const char **  argv 
) [protected, virtual]

handle planar model order via Micole Bus

Definition at line 174 of file FF3DDeviceOutputAgent.cpp.

void FF3DDeviceOutputAgent::handlePointForceModel ( MicoleBus app,
int  argc,
const char **  argv 
) [protected, virtual]

handle point force model order via Micole Bus

Definition at line 121 of file FF3DDeviceOutputAgent.cpp.

void MicoleAgent::handlePrintIDMessage ( MicoleBus app,
int  argc,
const char **  argv 
) [inherited]

Definition at line 180 of file MicoleAgent.cpp.

void MicoleAgent::handleQuitMessage ( MicoleBus app,
int  argc,
const char **  argv 
) [inherited]

Reimplemented in RegistryAgent, and SoundPlayerAgent.

Definition at line 111 of file MicoleAgent.cpp.

void MicoleAgent::handleRegisterReply ( MicoleBus app,
int  argc,
const char **  argv 
) [inherited]

Definition at line 138 of file MicoleAgent.cpp.

void MicoleAgent::handleResumeMessage ( MicoleBus app,
int  argc,
const char **  argv 
) [inherited]

Definition at line 105 of file MicoleAgent.cpp.

void FF3DDeviceOutputAgent::handleSphericalForceModel ( MicoleBus app,
int  argc,
const char **  argv 
) [protected, virtual]

handle spherical force model order via Micole Bus

Definition at line 209 of file FF3DDeviceOutputAgent.cpp.

void MicoleAgent::handleStartMessage ( MicoleBus app,
int  argc,
const char **  argv 
) [inherited]

Definition at line 175 of file MicoleAgent.cpp.

void MicoleAgent::handleSuspendMessage ( MicoleBus app,
int  argc,
const char **  argv 
) [inherited]

Definition at line 99 of file MicoleAgent.cpp.

void MicoleAgent::obtainIdentifier (  )  [protected, inherited]

Obtains identifier from the RegistryAgent.

Definition at line 185 of file MicoleAgent.cpp.

void MicoleAgent::onApplicationConnected ( MicoleBus app  )  [inherited]

void MicoleAgent::onApplicationDisconnected ( MicoleBus app  )  [inherited]

void MicoleAgent::resumeAgent (  )  [protected, virtual, inherited]

Resumes the agent.

Re-binds all callback methods.

Reimplemented in MicoleAgentThread.

Definition at line 158 of file MicoleAgent.cpp.

void MicoleAgent::sendMessage ( const char *  to,
const char *  message 
) [inherited]

Sends a message to the MicoleBus *app by calling app->SendMsg(const char *message) The message goes only to agent specified by const char *to.

The receiving agent must have appropriate regexp bound to process the message.

int MicoleAgent::sendMessage ( const string  message  )  [inherited]

Sends a message using bus->SendMsg.

The message goes to all agents.

Definition at line 79 of file MicoleAgent.cpp.

int MicoleAgent::sendMessage ( const char *  message  )  [inherited]

Sends a message using bus->SendMsg.

The message goes to all agents.

Definition at line 72 of file MicoleAgent.cpp.

void FF3DDeviceOutputAgent::setForceModel ( FF3DForceModel fm  )  [inline]

you can specify a force model

Parameters:
fm FF3DForceModel who constraint FF3DDevice
Warning:
ForceModel is deleted automatically if replaced (no clone of object)
Note:
if you use IvyBus, you don't need to use this function

Definition at line 92 of file FF3DDeviceOutputAgent.h.

void MicoleAgent::stopAgent (  )  [protected, virtual, inherited]

Gives inheriting class a chance to save state when the agent receives Quit-message.

Reimplemented in MicoleAgentThread.

Definition at line 170 of file MicoleAgent.cpp.

void MicoleAgent::suspendAgent (  )  [protected, virtual, inherited]

Suspends the agent.

Unbinds all callback methods that are bound using MicoleAgent::bindMessage()

Reimplemented in MicoleAgentThread.

Definition at line 146 of file MicoleAgent.cpp.

void MicoleAgent::unBindMessage ( MicoleBinding binding  )  [protected, inherited]

void MicoleAgent::unBindMessage ( int  messageId  )  [protected, inherited]


Member Data Documentation

vector<MicoleBinding> MicoleAgent::bindings [protected, inherited]

Definition at line 158 of file MicoleAgent.h.

MicoleBus * MicoleAgent::bus = 0 [static, protected, inherited]

Definition at line 156 of file MicoleAgent.h.

FILE* FF3DDeviceOutputAgent::log

Definition at line 84 of file FF3DDeviceOutputAgent.h.

Playback* FF3DDeviceOutputAgent::pb

Definition at line 83 of file FF3DDeviceOutputAgent.h.

int MicoleAgent::resumeId [protected, inherited]

Definition at line 160 of file MicoleAgent.h.

AgentState MicoleAgent::state [protected, inherited]

Definition at line 159 of file MicoleAgent.h.


The documentation for this class was generated from the following files:
Generated on Tue Oct 16 17:10:53 2007 for Micole by  doxygen 1.4.7