50 #ifndef __igstkAscensionCommandInterpreter_h
51 #define __igstkAscensionCommandInterpreter_h
314 void SetCommunication(CommunicationType* communication);
479 virtual void PrintSelf( std::ostream& os, itk::Indent indent )
const;
484 void ReceiveRaw(
char *reply,
unsigned int len);
487 void SendRaw(
const char *text,
unsigned int len);
490 int Unpack(
char **cp);
499 std::string m_ErrorText;
514 unsigned int m_NumberOfBirds;
523 unsigned int m_FBBAddress;
526 unsigned int m_CurrentBird;
532 bool m_ButtonMode[128];
538 char m_DataBuffer[256];
541 unsigned int m_PhaseErrorLeftoverBytes;
544 CommunicationType::Pointer m_Communication;
communications timeout error
error opening serial port
Sudden output change elimination.
Bird outputs an error code.
FBB Auto-Configuration, 1 xmtr/N snsrs.
Change / Examine Hemisphere.
void AnglesFromMatrix(float zyx[3], const float a[9])
Convenience method to convert a matrix into angles.
void GetMatrix(float a[9])
Get the rotation matrix from the most recent data record, if present.
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print object information.
Base class for all the IGSTK classes.
void Stop()
Stop and restart the system.
void Open()
Open communication with the flock.
DC filter constant table ALPHA_MAX.
void FBBAutoConfig(unsigned int num)
Configure the flock to work with a certain number of birds.
virtual ~AscensionCommandInterpreter()
Destructor.
void SetFormat(AscensionDataFormat format)
Set the data format.
void RS232ToFBB(unsigned int bird)
Direct the next command to a specific bird on the Flock Of Birds Bus.
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.
DC Filter constant table ALPHA_MIN.
error setting COM port parameters
#define igstkStandardClassTraitsMacro(classname, superclassname)
Convenience macro for traits of a non-templated class.
Disable/Enable data ready output.
int ExamineValueBytes(AscensionParameter parm, char *data)
Examine a parameter value and store the result in the supplied array.
Transmitter Operation Mode.
void EndStreamIfStreaming()
Request that the flock stops streaming data records, but only if it is currently streaming.
void Close()
Close communication with the flock.
AscensionDataFormat
The Flock of Birds supports several different data formats, which can be set with the SetFormat() met...
void SetButtonMode(bool mode)
Set button state reporting on or off.
AscensionStatusBits
The bird status parameter FB_STATUS can be examined using the ExamineValue() function.
Software revision number.
action is illegal in this state
int GetButton()
Get the button state for a transducer that has a button attached.
void Point()
Request a single data record.
Changes data ready character.
void SetHemisphere(AscensionHemisphere hemisphere)
Set the operational hemisphere of the flock.
const char * GetErrorMessage()
Get a textual description of the last error from the flock.
int GetShort(const char *cp)
Utilitity function to unpack two chars from the flock into a short.
void SendCommand(AscensionCommand command)
Send a command to the Flock of Birds.
On error: stop or don't stop Bird.
AscensionAddressMode
The FB_FBB_ADDRESS_MODE parameter can be examined with ExamineValue().
AscensionCommandInterpreter()
Constructor.
unrecognized bird command
void GetAngles(float zyx[3])
Get the angles from the most recent data record, if present.
void FBBReset()
Pass a reset to the Flock of Birds Bus to reset all the birds.
AscensionCommand
Every bird command consists of a single byte.
void Update()
Get the next data record from the flock.
AscensionHemisphere
The FB_P_HEMISPHERE parameter can be examined with ExamineValue() and changed with fbChangeValue()...
AscensionErrorCode
The following error codes are returned by GetError():
DC filter constant table Vm.
void GetQuaternion(float q[4])
Get the quaternion from the most recent data record, if present.
unsigned int GetBird()
Get the bird that the most recent data record is for.
void PutShort(char *cp, int val)
Utility function to convert a short into two chars for the flock.
void GetPosition(float xyz[3])
Get the position from the most recent data record, if present.
void Stream()
Request that the flock starts streaming data records.
Bird measurement rate count.
void ChangeValueWords(AscensionParameter parm, const short *data)
Change a parameter to values in the supplied array.
This class implements communication over a serial port via RS-232.
void ChangeValue(AscensionParameter parm, int data)
Change a parameter to the specified value.
void ChangeValueBytes(AscensionParameter parm, const char *data)
Change a parameter to values in the supplied array.
System Model Identification.
phase error: comm port is dropping bytes
void Reset()
Do a hardware reset of the flock.
bad examine/change parameter
void MatrixFromAngles(float a[9], const float zyx[3])
Convenience method to convert angles to a matrix.
void EndStream()
Request that the flock stops streaming data records.
void SendCommandWords(AscensionCommand command, const short *data)
Send a command to the Flock of Birds along with some 16-bit data.
Bird computer crystal speed.
Change / Examine Reference Frame2.
AscensionBusStatusBits
The FB_FBB_STATUS parameter can be examined using ExamineValueBytes(), which will provide one status ...
Change / Examine Angle Align2.
void SendCommandBytes(AscensionCommand command, const char *data)
Send a command to the Flock of Birds along with some 8-bit data.
AscensionPositionScale
The FB_POSITION_SCALING parameter is specified here in millimeters rather than inches.
AscensionErrorCode GetError()
Get an integer error code for the flock, zero if no error.
void ButtonRead(int *val)
Read the button state.
CommunicationType * GetCommunication()
Get the communication object.