Public Member Functions | Protected Member Functions | Protected Attributes
segway::RmpInterface Class Reference

#include <RmpInterface.h>

Inheritance diagram for segway::RmpInterface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool ChangeOperationalMode (RmpOperationalModeRequest modeRequest)
void GetFaultStatusDescription (FaultStatusDescription &rDescription)
template<typename T >
GetUserDefinedFeedback (UserDefinedFeedbackType type)
virtual void Initialize (const std::string &rIpAddress, uint16_t portNumber)
virtual void Initialize (const std::string &rDevicePort)
bool ResetIntegrators (uint32_t bitmap)
bool ResetParamsToDefault ()
 RmpInterface ()
template<typename T >
bool SetConfiguration (const RmpConfigurationCommand< T > &rConfigurationCommand, T value)
template<>
bool SetConfiguration (const RmpConfigurationCommand< uint32_t > &rConfigurationCommand, uint32_t value)
template<>
bool SetConfiguration (const RmpConfigurationCommand< float > &rConfigurationCommand, float value)
bool SetUserDefinedFeedbackBitmap (UserDefinedFeedbackBitmapType bitmapType, const uint32_t bitmap)
virtual void ShutDown ()
virtual bool Update (bool forceUpdate=false)
virtual ~RmpInterface ()

Protected Member Functions

size_t GetFeedbackEntryCount ()
void Initialize ()
void InitializeFeedbackBitmaps ()
bool IsValidFeedbackBitmap (const RmpConfigurationCommand< uint32_t > &rConfigurationCommand, const uint32_t bitmap)
bool SendConfigurationCommand (uint16_t commandId, uint32_t value)
bool SetConfiguration (uint16_t commandId, UserDefinedFeedbackType feedbackType, uint32_t value)
void UpdateUserDefinedFeedback (const Bytes &rBytes)

Protected Attributes

uint32_t m_FeedbackBitmap [FEEDBACK_TYPE_NBR]
bool m_IsFeedbackBitmapSet
RmpTransport::Ptr m_pTransport
uint32_t m_UserDefinedFeedback [FEEDBACK_TYPE_NBR][MAX_ENTRIES_PER_FEEDBACK]

Detailed Description

This class provides an interface to a rmp platform. Please refer to the rmp user manual to understand the technical terms.

Definition at line 55 of file RmpInterface.h.


Constructor & Destructor Documentation

Constructor

Definition at line 58 of file RmpInterface.cpp.

Destructor

Definition at line 66 of file RmpInterface.cpp.


Member Function Documentation

Change operational mode

Parameters:
modeRequestdesired operational mode. Defined in RmpUserDefinedFeedbackType.h.
Returns:
wether the mode was properly changed
Exceptions:
std::logic_errorif modeRequest is not valid

Definition at line 406 of file RmpInterface.cpp.

Get a fault status description. This method returns a list of string describing a fault. An empty list means not fault.

Parameters:
rDescriptionreturned fault status description

Definition at line 474 of file RmpInterface.cpp.

Get the number of feedback entries

Returns:
number of feedback entries

Definition at line 643 of file RmpInterface.cpp.

Get a user defined feedback

Parameters:
typetype of user defined feedback. Defined in RmpUserDefinedFeedbackType.h.
Returns:
feedback. This templated function is only implemented for type uint32_t and float.
Exceptions:
std::logic_errorif called with template parameter different than uint32_t or float

Definition at line 188 of file RmpInterface.cpp.

void segway::RmpInterface::Initialize ( const std::string &  rIpAddress,
uint16_t  portNumber 
) [virtual]

Initialize a udp communication

Parameters:
rIpAddressip address of the rmp
portNumberport number of the rmp
Exceptions:
std::logic_errorif the transport has already been initialized and has not been shut down

Definition at line 71 of file RmpInterface.cpp.

void segway::RmpInterface::Initialize ( const std::string &  rDevicePort) [virtual]

Initialize a usb communication

Parameters:
rDevicePort
Exceptions:
std::logic_errorif the transport has already been initialized and has not been shut down

Definition at line 83 of file RmpInterface.cpp.

void segway::RmpInterface::Initialize ( ) [protected]

Protected initialization method Initialize the user defined feedback bitmaps and switch to tractor mode

Exceptions:
std::runtime_errorif unable to initialize feedback bitmpas properly
Exceptions:
std::runtime_errorif unable to set the rmp in tractor mode

Definition at line 510 of file RmpInterface.cpp.

Get the uder defined feedback bitmap (configuration) from the rmp and update the state representation accordingly

Exceptions:
std::runtime_errorif unable to initialize feedback bitmpas properly

Definition at line 521 of file RmpInterface.cpp.

bool segway::RmpInterface::IsValidFeedbackBitmap ( const RmpConfigurationCommand< uint32_t > &  rConfigurationCommand,
const uint32_t  bitmap 
) [protected]

Check wether the feedback bitmap is valid

Parameters:
rConfigurationCommandbitmap configuration command
bitmapbitmap
Returns:
wether the feedback bitmap is valid

Definition at line 682 of file RmpInterface.cpp.

bool segway::RmpInterface::ResetIntegrators ( uint32_t  bitmap)

Reset position data on the rmp

Parameters:
bitmapbitmap describing which position data to reset, should not be greater than RESET_ALL_POSITION_DATA (0x0000001F)
Returns:
wether the integrator(s) was(were) properly reset
Exceptions:
std::logic_errorif the bitmap is not valid. Please read the rmp manual for more information about bitmap validity.

Definition at line 224 of file RmpInterface.cpp.

Reset all parameters stored in NVM to their default values

Returns:
wether the parameters were properly reset

Definition at line 297 of file RmpInterface.cpp.

bool segway::RmpInterface::SendConfigurationCommand ( uint16_t  commandId,
uint32_t  value 
) [protected]

Send configuration command

Parameters:
commandIdconfiguration command id, specified in RmpConfigurationCommand.h
valueconfiguration value
Returns:
wether the command was properly sent.

Definition at line 637 of file RmpInterface.cpp.

template<typename T >
bool segway::RmpInterface::SetConfiguration ( const RmpConfigurationCommand< T > &  rConfigurationCommand,
value 
)

Execute configuration command

Parameters:
rConfigurationCommandconfiguration command object as defined in RmpConfigurationCommand.h
valueparameter value. This templated function is only implemented for type uint32_t and float.
Returns:
wether the rmp is properly configured
Exceptions:
std::logic_errorif called with template parameter different than uint32_t or float

Definition at line 105 of file RmpInterface.cpp.

template<>
bool segway::RmpInterface::SetConfiguration ( const RmpConfigurationCommand< uint32_t > &  rConfigurationCommand,
uint32_t  value 
)

Definition at line 113 of file RmpInterface.cpp.

template<>
bool segway::RmpInterface::SetConfiguration ( const RmpConfigurationCommand< float > &  rConfigurationCommand,
float  value 
)

Definition at line 131 of file RmpInterface.cpp.

bool segway::RmpInterface::SetConfiguration ( uint16_t  commandId,
UserDefinedFeedbackType  feedbackType,
uint32_t  value 
) [protected]

Set up configuration

Parameters:
commandIdconfiguration command id, specified in RmpConfigurationCommand.h
feedbackTypeuser defined feeback type, specified in RmpUserdefinedFeedbackType
valueconfiguration value
Returns:
wether the configuaration was properly set up.

Definition at line 581 of file RmpInterface.cpp.

Set user defined feedback bitmap

Parameters:
bitmapTypetype of user defined feedback bitmap
bitmapfeedback bitmap
Returns:
wether the bitmap was properyly set
Exceptions:
std::logic_errorif bitmapType is not valid
std::logic_errorif bitmap is not valid. Please read the rmp manual for more information about bitmap validity.

Definition at line 327 of file RmpInterface.cpp.

void segway::RmpInterface::ShutDown ( ) [virtual]

Stop the communication

Definition at line 95 of file RmpInterface.cpp.

bool segway::RmpInterface::Update ( bool  forceUpdate = false) [virtual]

Update Read and update the platform state

Parameters:
forceUpdateforce update. If true, will send a dummy command to cause a response.
Returns:
wether the update was successfull

Definition at line 148 of file RmpInterface.cpp.

void segway::RmpInterface::UpdateUserDefinedFeedback ( const Bytes rBytes) [protected]

Update user defined feedback Convert a byte array to user defined feedback data.

Parameters:
rBytesbyte array

Definition at line 662 of file RmpInterface.cpp.


Member Data Documentation

Store the user defined feedback bitmap information

Definition at line 265 of file RmpInterface.h.

Wether the user defined feedback bitmap is set (known)

Definition at line 260 of file RmpInterface.h.

Transport interface

Definition at line 255 of file RmpInterface.h.

Store the user defined feedback

Definition at line 270 of file RmpInterface.h.


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


rmp_base
Author(s):
autogenerated on Wed Aug 26 2015 16:24:40