igstk::AscensionCommandInterpreter Class Reference

#include <igstkAscensionCommandInterpreter.h>

Inheritance diagram for igstk::AscensionCommandInterpreter:
Inheritance graph
[legend]
Collaboration diagram for igstk::AscensionCommandInterpreter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

CommunicationType * GetCommunication ()
 Get the communication object.
void Open ()
 Open communication with the flock.
void Stop ()
 Stop and restart the system.
void Run ()
void Close ()
 Close communication with the flock.
void Reset ()
 Do a hardware reset of the flock.
void SetHemisphere (AscensionHemisphere hemisphere)
 Set the operational hemisphere of the flock.
void SetFormat (AscensionDataFormat format)
 Set the data format.
void SetButtonMode (bool mode)
 Set button state reporting on or off.
void Point ()
 Request a single data record.
void Stream ()
 Request that the flock starts streaming data records.
void EndStream ()
 Request that the flock stops streaming data records.
void EndStreamIfStreaming ()
 Request that the flock stops streaming data records, but only if it is currently streaming.
void Update ()
 Get the next data record from the flock.
unsigned int GetBird ()
 Get the bird that the most recent data record is for.
void GetPosition (float xyz[3])
 Get the position from the most recent data record, if present.
void GetAngles (float zyx[3])
 Get the angles from the most recent data record, if present.
void GetMatrix (float a[9])
 Get the rotation matrix from the most recent data record, if present.
void GetQuaternion (float q[4])
 Get the quaternion from the most recent data record, if present.
int GetButton ()
 Get the button state for a transducer that has a button attached.
void MatrixFromAngles (float a[9], const float zyx[3])
 Convenience method to convert angles to a matrix.
void AnglesFromMatrix (float zyx[3], const float a[9])
 Convenience method to convert a matrix into angles.
void FBBReset ()
 Pass a reset to the Flock of Birds Bus to reset all the birds.
void FBBAutoConfig (unsigned int num)
 Configure the flock to work with a certain number of birds.
void RS232ToFBB (unsigned int bird)
 Direct the next command to a specific bird on the Flock Of Birds Bus.
void SendCommand (AscensionCommand command)
 Send a command to the Flock of Birds.
void SendCommandWords (AscensionCommand command, const short *data)
 Send a command to the Flock of Birds along with some 16-bit data.
void SendCommandBytes (AscensionCommand command, const char *data)
 Send a command to the Flock of Birds along with some 8-bit data.
int ExamineValue (AscensionParameter parm)
 Examine a parameter value and return the result.
int ExamineValueWords (AscensionParameter parm, short *data)
 Examine a parameter value and store the result in the supplied array.
int ExamineValueBytes (AscensionParameter parm, char *data)
 Examine a parameter value and store the result in the supplied array.
void ChangeValue (AscensionParameter parm, int data)
 Change a parameter to the specified value.
void ChangeValueWords (AscensionParameter parm, const short *data)
 Change a parameter to values in the supplied array.
void ChangeValueBytes (AscensionParameter parm, const char *data)
 Change a parameter to values in the supplied array.
AscensionErrorCode GetError ()
 Get an integer error code for the flock, zero if no error.
const char * GetErrorMessage ()
 Get a textual description of the last error from the flock.
void ButtonRead (int *val)
 Read the button state.
int GetShort (const char *cp)
 Utilitity function to unpack two chars from the flock into a short.
void PutShort (char *cp, int val)
 Utility function to convert a short into two chars for the flock.

Protected Member Functions

 AscensionCommandInterpreter ()
 Constructor.
virtual ~AscensionCommandInterpreter ()
 Destructor.
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 Print object information.

Detailed Description

Definition at line 297 of file igstkAscensionCommandInterpreter.h.


Constructor & Destructor Documentation

igstk::AscensionCommandInterpreter::AscensionCommandInterpreter (  )  [protected]

Constructor.

virtual igstk::AscensionCommandInterpreter::~AscensionCommandInterpreter (  )  [protected, virtual]

Destructor.


Member Function Documentation

CommunicationType* igstk::AscensionCommandInterpreter::GetCommunication (  ) 

Get the communication object.

void igstk::AscensionCommandInterpreter::Open (  ) 

Open communication with the flock.

void igstk::AscensionCommandInterpreter::Stop (  ) 

Stop and restart the system.

void igstk::AscensionCommandInterpreter::Run (  ) 
void igstk::AscensionCommandInterpreter::Close (  ) 

Close communication with the flock.

void igstk::AscensionCommandInterpreter::Reset (  ) 

Do a hardware reset of the flock.

void igstk::AscensionCommandInterpreter::SetHemisphere ( AscensionHemisphere  hemisphere  ) 

Set the operational hemisphere of the flock.

void igstk::AscensionCommandInterpreter::SetFormat ( AscensionDataFormat  format  ) 

Set the data format.

void igstk::AscensionCommandInterpreter::SetButtonMode ( bool  mode  ) 

Set button state reporting on or off.

void igstk::AscensionCommandInterpreter::Point (  ) 

Request a single data record.

void igstk::AscensionCommandInterpreter::Stream (  ) 

Request that the flock starts streaming data records.

void igstk::AscensionCommandInterpreter::EndStream (  ) 

Request that the flock stops streaming data records.

void igstk::AscensionCommandInterpreter::EndStreamIfStreaming (  ) 

Request that the flock stops streaming data records, but only if it is currently streaming.

void igstk::AscensionCommandInterpreter::Update (  ) 

Get the next data record from the flock.

This should only be called after a call to Point(), or after streaming has been started.

unsigned int igstk::AscensionCommandInterpreter::GetBird (  ) 

Get the bird that the most recent data record is for.

It is very important to check this value to make sure that you are getting data for the right bird.

void igstk::AscensionCommandInterpreter::GetPosition ( float  xyz[3]  ) 

Get the position from the most recent data record, if present.

The data format must be FB_POSITION_ANGLES, FB_POSITION_MATRIX, FB_POSITION_QUATERNION, or FB_POSITION.

void igstk::AscensionCommandInterpreter::GetAngles ( float  zyx[3]  ) 

Get the angles from the most recent data record, if present.

The data format must be FB_POSITION_ANGLES or FB_ANGLES.

void igstk::AscensionCommandInterpreter::GetMatrix ( float  a[9]  ) 

Get the rotation matrix from the most recent data record, if present.

The data format must be FB_POSITION_MATRIX or FB_MATRIX. Since FB_POSITION_ANGLES is the native format and is also the most compact, angles should be preferred over matrices for data transfer.

void igstk::AscensionCommandInterpreter::GetQuaternion ( float  q[4]  ) 

Get the quaternion from the most recent data record, if present.

The data format must be FB_POSITION_QUATERNION or FB_QUATERNION. Since FB_POSITION_ANGLES is the native format and is also the most compact, angles should be preferred over quaternions for data transfer.

int igstk::AscensionCommandInterpreter::GetButton (  ) 

Get the button state for a transducer that has a button attached.

This will return zero unless ButtonMode() has been called to turn on button reporting.

void igstk::AscensionCommandInterpreter::MatrixFromAngles ( float  a[9],
const float  zyx[3] 
)

Convenience method to convert angles to a matrix.

void igstk::AscensionCommandInterpreter::AnglesFromMatrix ( float  zyx[3],
const float  a[9] 
)

Convenience method to convert a matrix into angles.

void igstk::AscensionCommandInterpreter::FBBReset (  ) 

Pass a reset to the Flock of Birds Bus to reset all the birds.

void igstk::AscensionCommandInterpreter::FBBAutoConfig ( unsigned int  num  ) 

Configure the flock to work with a certain number of birds.

void igstk::AscensionCommandInterpreter::RS232ToFBB ( unsigned int  bird  ) 

Direct the next command to a specific bird on the Flock Of Birds Bus.

void igstk::AscensionCommandInterpreter::SendCommand ( AscensionCommand  command  ) 

Send a command to the Flock of Birds.

void igstk::AscensionCommandInterpreter::SendCommandWords ( AscensionCommand  command,
const short *  data 
)

Send a command to the Flock of Birds along with some 16-bit data.

void igstk::AscensionCommandInterpreter::SendCommandBytes ( AscensionCommand  command,
const char *  data 
)

Send a command to the Flock of Birds along with some 8-bit data.

int igstk::AscensionCommandInterpreter::ExamineValue ( AscensionParameter  parm  ) 

Examine a parameter value and return the result.

int igstk::AscensionCommandInterpreter::ExamineValueWords ( AscensionParameter  parm,
short *  data 
)

Examine a parameter value and store the result in the supplied array.

int igstk::AscensionCommandInterpreter::ExamineValueBytes ( AscensionParameter  parm,
char *  data 
)

Examine a parameter value and store the result in the supplied array.

void igstk::AscensionCommandInterpreter::ChangeValue ( AscensionParameter  parm,
int  data 
)

Change a parameter to the specified value.

void igstk::AscensionCommandInterpreter::ChangeValueWords ( AscensionParameter  parm,
const short *  data 
)

Change a parameter to values in the supplied array.

void igstk::AscensionCommandInterpreter::ChangeValueBytes ( AscensionParameter  parm,
const char *  data 
)

Change a parameter to values in the supplied array.

AscensionErrorCode igstk::AscensionCommandInterpreter::GetError (  ) 

Get an integer error code for the flock, zero if no error.

If the error is FB_TIMEOUT_ERROR, the bird itself probably has an error that has halted the streaming of data. You can check the status of the flock with ExamineValue(fFB_ERROR_CODE).

const char* igstk::AscensionCommandInterpreter::GetErrorMessage (  ) 

Get a textual description of the last error from the flock.

void igstk::AscensionCommandInterpreter::ButtonRead ( int *  val  ) 

Read the button state.

You should usually use SetButtonMode() and get the button state with the tracking data records.

int igstk::AscensionCommandInterpreter::GetShort ( const char *  cp  ) 

Utilitity function to unpack two chars from the flock into a short.

void igstk::AscensionCommandInterpreter::PutShort ( char *  cp,
int  val 
)

Utility function to convert a short into two chars for the flock.

virtual void igstk::AscensionCommandInterpreter::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const [protected, virtual]

Print object information.

Reimplemented from igstk::Object.


The documentation for this class was generated from the following file:
Generated on Tue Jul 13 11:06:50 2010 for IGSTK by  doxygen 1.6.3