Fawkes API  Fawkes Development Version
PlayerPositionMapper Class Reference

Position mapper for player integration. More...

#include "position_mapper.h"

Inheritance diagram for PlayerPositionMapper:

List of all members.

Public Member Functions

 PlayerPositionMapper (std::string varname, fawkes::ObjectPositionInterface *interface, PlayerCc::Position2dProxy *proxy)
 Constructor.
virtual void sync_fawkes_to_player ()
 Sync Fawkes interface to Player proxy.
virtual void sync_player_to_fawkes ()
 Sync Player proxy to Fawkes interface.

Detailed Description

Position mapper for player integration.

This class is used to map a Player position2d proxy to a Fawkes ObjectPositionInterface.

Author:
Tim Niemueller

Constructor & Destructor Documentation

PlayerPositionMapper::PlayerPositionMapper ( std::string  varname,
fawkes::ObjectPositionInterface interface,
PlayerCc::Position2dProxy *  proxy 
)

Constructor.

Parameters:
varnamevariable name
interfaceFawkes interface instance
proxyPlayer proxy instance

Definition at line 40 of file position_mapper.cpp.


Member Function Documentation

void PlayerPositionMapper::sync_fawkes_to_player ( ) [virtual]

Sync Fawkes interface to Player proxy.

This method should be implemented to copy any outstanding data from the Fawkes interface (messages) to the Player interface. This method will be called in the ACT_EXEC hook of the BlockedTimingAspect (cf. MainLoop).

Implements PlayerProxyFawkesInterfaceMapper.

Definition at line 65 of file position_mapper.cpp.

void PlayerPositionMapper::sync_player_to_fawkes ( ) [virtual]

Sync Player proxy to Fawkes interface.

This method should be implemented to copy any outstanding data from the Player proxy to the Fawkes interface. This method will be called in the ACT_EXEC hook of the BlockedTimingAspect (cf. MainLoop).

Implements PlayerProxyFawkesInterfaceMapper.

Definition at line 51 of file position_mapper.cpp.

References fawkes::ObjectPositionInterface::set_relative_x(), fawkes::ObjectPositionInterface::set_relative_y(), fawkes::ObjectPositionInterface::set_relative_z(), and fawkes::Interface::write().


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