cPTU_Base Class Reference
[Base_ptucontrol]

#include <ptu_base.h>

Inheritance diagram for cPTU_Base:
Inheritance graph
[legend]

Public Member Functions

unsigned char set_async_event_handler (void(*async_event_handler)(unsigned char))

portstream_fd openserial (char *portname)
portstream_fd openserial_38400 (char *portname)
char closeserial (portstream_fd pt_fd)
char SerialBytesOut (portstream_fd pt_fd, unsigned char *buffer, int nBytes)
char SerialBytesIn (portstream_fd pt_fd, unsigned char *buffer, unsigned int nBytes, long timeoutVal)
char PeekByte (portstream_fd portstream, unsigned char *peekedByte)
char FlushInputBuffer (portstream_fd pt_fd)
char SerialStringOut (portstream_fd pt_fd, unsigned char *buffer)
char ReadSerialLine (portstream_fd pt_fd, unsigned char *strbuffer, long timeoutVal, int *charsRead)
void do_delay (long millisec)
char GetSignedShort (portstream_fd portstream, signed short *SHORTval, long timeout)
char PutSignedShort (portstream_fd portstream, signed short *SHORTval)
char GetUnsignedShort (portstream_fd portstream, unsigned short *USHORTval, long timeout)
char PutUnsignedShort (portstream_fd portstream, unsigned short *USHORTval)
char GetSignedLong (portstream_fd portstream, signed long *LONGval, long timeout)
char PutSignedLong (portstream_fd portstream, signed long *LONGval)

char reset_ptu_tilt (void)
unsigned char default_async_event_handler (unsigned char async_event)
portstream_fd open_host_port (char *portname)
portstream_fd open_host_port_38400 (char *portname)
char set_baud_rate (int baudrate)
char close_host_port (portstream_fd portstream)
unsigned char GetSerialChar (char await_char)
unsigned char get_binary_command_return_status ()
char SerialOut (unsigned char outchar)
unsigned char SerialIn ()
char select_host_port (portstream_fd portstream)
char reset_ptu (void)
char reset_ptu_pan (void)
char firmware_version_OK (void)
char reset_PTU_parser (long timeout_in_msec)
char set_desired (char axis, char kinematic_property, PTU_PARM_PTR *value, char movement_mode)
char await_completion (void)
long get_current (char axis, char kinematic_property)
long get_desired (char axis, char kinematic_property)
char set_mode (char mode_type, char mode_parameter)
char halt (char halt_type)
char * firmware_version (void)
char select_unit (UID_fd unit_ID)
char set_unit_id (UID_fd unit_ID)
char set_PTU_motion (short int desired_pan_pos, short int desired_tilt_pos, unsigned short int desired_pan_speed, unsigned short int desired_tilt_speed)
char get_PTU_motion (short int *desired_pan_pos, short int *desired_tilt_pos, unsigned short int *desired_pan_speed, unsigned short int *desired_tilt_speed)
char config_CHA ()
char config_CHA_38400 ()
char talkto_CHA ()
char talkto_PTUcontroller ()
char set_pure_velocities (signed short int *pan_speed, signed short int *tilt_speed)
unsigned char set_TTL_outputs (unsigned char in_TTL_control_byte)
unsigned char get_TTL_values ()
unsigned char TriggerOn (signed short int startPanPos, signed short int deltaPos, signed short int numTriggers)
unsigned char TriggerOff ()
signed short int TriggersPending ()
char set_desired_abs_positions (signed short int *Ppos, signed short int *Tpos)
char get_current_positions (signed short int *Ppos, signed short int *Tpos)
char set_ISM_desired_abs_positions (signed short int *Ppos, signed short int *Tpos)
char get_ISM_desired_abs_positions (signed short int *Ppos, signed short int *Tpos)
unsigned char checksum_on_2_2B (unsigned char *val1, unsigned char *val2)
unsigned char execute_set_desired_velocities (signed short int *Pspeed, signed short int *Tspeed)

Data Fields

event_handler_fn_ptr_type async_event_handler_fn_ptr

Member Function Documentation

char cPTU_Base::await_completion ( void   ) 

References AWAIT_COMMAND_COMPLETION, get_binary_command_return_status(), and SerialOut().

Referenced by cPTU_Control::Wait().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char cPTU_Base::checksum_on_2_2B ( unsigned char *  val1,
unsigned char *  val2 
)

Referenced by execute_set_desired_velocities().

Here is the caller graph for this function:

char cPTU_Base::close_host_port ( portstream_fd  portstream  ) 

References closeserial(), current_host_port, and PORT_NOT_OPENED.

Referenced by cPTU_Control::CloseSerialPort().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::closeserial ( portstream_fd  pt_fd  ) 

References PORT_NOT_OPENED, and TRUE.

Referenced by close_host_port().

Here is the caller graph for this function:

char cPTU_Base::config_CHA (  ) 

References current_host_port, FALSE, ReadSerialLine(), SerialStringOut(), status, and TRUE.

Here is the call graph for this function:

char cPTU_Base::config_CHA_38400 (  ) 

References current_host_port, FALSE, ReadSerialLine(), SerialStringOut(), status, and TRUE.

Here is the call graph for this function:

unsigned char cPTU_Base::default_async_event_handler ( unsigned char  async_event  ) 
void cPTU_Base::do_delay ( long  millisec  ) 
unsigned char cPTU_Base::execute_set_desired_velocities ( signed short int *  Pspeed,
signed short int *  Tspeed 
)
char * cPTU_Base::firmware_version ( void   ) 

References current_host_port, do_delay(), FIRMWARE_VERSION_QUERY, ReadSerialLine(), and SerialOut().

Here is the call graph for this function:

char cPTU_Base::firmware_version_OK ( void   ) 

References current_host_port, do_delay(), FALSE, FlushInputBuffer(), PTU_codeVersion, PTU_modelVersion, PTU_revision, ReadSerialLine(), SerialBytesOut(), status, and TRUE.

Referenced by reset_PTU_parser().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::FlushInputBuffer ( portstream_fd  pt_fd  ) 

References TRUE.

Referenced by firmware_version_OK(), and reset_PTU_parser().

Here is the caller graph for this function:

unsigned char cPTU_Base::get_binary_command_return_status (  ) 

References ASYNCHRONOUS_EVENT, FALSE, GetSerialChar(), status, and TRUE.

Referenced by await_completion(), execute_set_desired_velocities(), halt(), set_desired(), set_desired_abs_positions(), set_ISM_desired_abs_positions(), set_mode(), and set_pure_velocities().

Here is the call graph for this function:

Here is the caller graph for this function:

long cPTU_Base::get_current ( char  axis,
char  kinematic_property 
)
char cPTU_Base::get_current_positions ( signed short int *  Ppos,
signed short int *  Tpos 
)

References current_host_port, GetSignedShort(), PAN_CURRENT_POS_QUERY, SerialOut(), and TILT_CURRENT_POS_QUERY.

Here is the call graph for this function:

long cPTU_Base::get_desired ( char  axis,
char  kinematic_property 
)

References ACCELERATION, ASYNCHRONOUS_EVENT, BASE, current_host_port, err, GetSerialChar(), GetSignedLong(), GetSignedShort(), GetUnsignedShort(), HOLD_POWER_LEVEL, ISM_DRIFT, ISM_GET_PAN_DRIFT_RATE, ISM_GET_TILT_DRIFT_RATE, LOWER_SPEED_LIMIT, MAXIMUM_POSITION, MINIMUM_POSITION, MOVE_POWER_LEVEL, PAN, PAN_ACCEL_QUERY, PAN_BASE_SPEED_QUERY, PAN_DESIRED_POS_QUERY, PAN_DESIRED_SPEED_QUERY, PAN_HOLD_POWER_QUERY, PAN_LOWER_SPEED_LIMIT_QUERY, PAN_MAX_POSITION_QUERY, PAN_MIN_POSITION_QUERY, PAN_MOVE_POWER_QUERY, PAN_RESOLUTION_QUERY, PAN_UPPER_SPEED_LIMIT_QUERY, PeekByte(), POSITION, PTU_ILLEGAL_COMMAND_ARGUMENT, PTU_INDEPENDENT_SPEED_CONTROL_MODE, RESOLUTION, SerialIn(), SerialOut(), SPEED, speed_control_mode, TILT, TILT_ACCEL_QUERY, TILT_BASE_SPEED_QUERY, TILT_DESIRED_POS_QUERY, TILT_DESIRED_SPEED_QUERY, TILT_HOLD_POWER_QUERY, TILT_LOWER_SPEED_LIMIT_QUERY, TILT_MAX_POSITION_QUERY, TILT_MIN_POSITION_QUERY, TILT_MOVE_POWER_QUERY, TILT_RESOLUTION_QUERY, TILT_UPPER_SPEED_LIMIT_QUERY, TRUE, UPPER_SPEED_LIMIT, and value.

Referenced by cPTU_Control::GetDesiredPanA(), cPTU_Control::GetDesiredPanP(), cPTU_Control::GetDesiredPanPdeg(), cPTU_Control::GetDesiredPanR(), cPTU_Control::GetDesiredPanS(), cPTU_Control::GetDesiredPanSdegsec(), cPTU_Control::GetDesiredTiltA(), cPTU_Control::GetDesiredTiltP(), cPTU_Control::GetDesiredTiltPdeg(), cPTU_Control::GetDesiredTiltR(), cPTU_Control::GetDesiredTiltS(), and cPTU_Control::GetDesiredTiltSdegsec().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::get_ISM_desired_abs_positions ( signed short int *  Ppos,
signed short int *  Tpos 
)

References current_host_port, GetSignedShort(), PAN_CURRENT_POS_QUERY, and SerialOut().

Here is the call graph for this function:

char cPTU_Base::get_PTU_motion ( short int *  desired_pan_pos,
short int *  desired_tilt_pos,
unsigned short int *  desired_pan_speed,
unsigned short int *  desired_tilt_speed 
)

References current_host_port, GetSignedShort(), GetUnsignedShort(), PTU_OK, QUERY_CURRENT_PTU_MOTION, and SerialBytesOut().

Here is the call graph for this function:

unsigned char cPTU_Base::get_TTL_values (  ) 

References GetSerialChar(), SerialOut(), TRUE, and TTL_CONTROLS.

Here is the call graph for this function:

unsigned char cPTU_Base::GetSerialChar ( char  await_char  ) 

References c, current_host_port, err, SerialBytesIn(), and TRUE.

Referenced by get_binary_command_return_status(), get_current(), get_desired(), get_TTL_values(), reset_ptu(), reset_ptu_pan(), reset_PTU_parser(), reset_ptu_tilt(), set_TTL_outputs(), set_unit_id(), TriggerOff(), and TriggerOn().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::GetSignedLong ( portstream_fd  portstream,
signed long *  LONGval,
long  timeout 
)

References i, SerialBytesIn(), and TRUE.

Referenced by get_current(), and get_desired().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::GetSignedShort ( portstream_fd  portstream,
signed short *  SHORTval,
long  timeout 
)

References SerialBytesIn(), and TRUE.

Referenced by get_current(), get_current_positions(), get_desired(), get_ISM_desired_abs_positions(), get_PTU_motion(), and TriggersPending().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::GetUnsignedShort ( portstream_fd  portstream,
unsigned short *  USHORTval,
long  timeout 
)

References SerialBytesIn(), and TRUE.

Referenced by get_current(), get_desired(), and get_PTU_motion().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::halt ( char  halt_type  ) 

References get_binary_command_return_status(), HALT, HALT_PAN, HALT_TILT, PAN, SerialOut(), and TILT.

Referenced by cPTU_Control::Halt().

Here is the call graph for this function:

Here is the caller graph for this function:

portstream_fd cPTU_Base::open_host_port ( char *  portname  ) 

References current_host_port, do_delay(), openserial(), and SerialBytesOut().

Referenced by cPTU_Control::OpenSerialPort().

Here is the call graph for this function:

Here is the caller graph for this function:

portstream_fd cPTU_Base::open_host_port_38400 ( char *  portname  ) 

References current_host_port, do_delay(), openserial_38400(), and SerialBytesOut().

Referenced by cPTU_Control::OpenSerialPort().

Here is the call graph for this function:

Here is the caller graph for this function:

portstream_fd cPTU_Base::openserial ( char *  portname  ) 

References PORT_NOT_OPENED.

Referenced by open_host_port().

Here is the caller graph for this function:

portstream_fd cPTU_Base::openserial_38400 ( char *  portname  ) 

References PORT_NOT_OPENED.

Referenced by open_host_port_38400().

Here is the caller graph for this function:

char cPTU_Base::PeekByte ( portstream_fd  portstream,
unsigned char *  peekedByte 
)

References FALSE.

Referenced by get_current(), and get_desired().

Here is the caller graph for this function:

char cPTU_Base::PutSignedLong ( portstream_fd  portstream,
signed long *  LONGval 
)

References SerialBytesOut(), and TRUE.

Referenced by set_desired().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::PutSignedShort ( portstream_fd  portstream,
signed short *  SHORTval 
)

References SerialBytesOut(), and TRUE.

Referenced by execute_set_desired_velocities(), set_desired(), set_desired_abs_positions(), set_ISM_desired_abs_positions(), set_PTU_motion(), set_pure_velocities(), and TriggerOn().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::PutUnsignedShort ( portstream_fd  portstream,
unsigned short *  USHORTval 
)

References SerialBytesOut(), and TRUE.

Referenced by set_desired(), set_PTU_motion(), and set_unit_id().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::ReadSerialLine ( portstream_fd  pt_fd,
unsigned char *  strbuffer,
long  timeoutVal,
int *  charsRead 
)

WARNING Changed this but don't know if it will work. must test with ptu

References c, FALSE, n, TIMEOUT_CHAR_READ, and TRUE.

Referenced by config_CHA(), config_CHA_38400(), firmware_version(), firmware_version_OK(), talkto_CHA(), and talkto_PTUcontroller().

Here is the caller graph for this function:

char cPTU_Base::reset_ptu ( void   ) 

References c, GetSerialChar(), PAN_LIMIT_HIT, SerialOut(), TILT_LIMIT_HIT, TRUE, and UNIT_RESET.

Referenced by cPTU_Control::Reset().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::reset_ptu_pan ( void   ) 

References c, GetSerialChar(), PAN_LIMIT_HIT, SerialOut(), TILT_LIMIT_HIT, TRUE, and UNIT_RESET_PAN.

Here is the call graph for this function:

char cPTU_Base::reset_PTU_parser ( long  timeout_in_msec  ) 
char cPTU_Base::reset_ptu_tilt ( void   ) 

References c, GetSerialChar(), PAN_LIMIT_HIT, SerialOut(), TILT_LIMIT_HIT, TRUE, and UNIT_RESET_TILT.

Here is the call graph for this function:

char cPTU_Base::select_host_port ( portstream_fd  portstream  ) 

References current_host_port.

char cPTU_Base::select_unit ( UID_fd  unit_ID  ) 

References current_host_port, do_delay(), SerialBytesOut(), and TRUE.

Here is the call graph for this function:

char cPTU_Base::SerialBytesIn ( portstream_fd  pt_fd,
unsigned char *  buffer,
unsigned int  nBytes,
long  timeoutVal 
)

References FALSE, i, n, PORT_NOT_OPENED, and TRUE.

Referenced by GetSerialChar(), GetSignedLong(), GetSignedShort(), GetUnsignedShort(), SerialIn(), and set_PTU_motion().

Here is the caller graph for this function:

char cPTU_Base::SerialBytesOut ( portstream_fd  pt_fd,
unsigned char *  buffer,
int  nBytes 
)
unsigned char cPTU_Base::SerialIn (  ) 

References current_host_port, and SerialBytesIn().

Referenced by get_current(), and get_desired().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::SerialOut ( unsigned char  outchar  ) 
char cPTU_Base::SerialStringOut ( portstream_fd  pt_fd,
unsigned char *  buffer 
)

References s, and TRUE.

Referenced by config_CHA(), config_CHA_38400(), talkto_CHA(), and talkto_PTUcontroller().

Here is the caller graph for this function:

unsigned char cPTU_Base::set_async_event_handler ( void(*)(unsigned char)  async_event_handler  ) 
char cPTU_Base::set_baud_rate ( int  baudrate  ) 
char cPTU_Base::set_desired ( char  axis,
char  kinematic_property,
PTU_PARM_PTR value,
char  movement_mode 
)
char cPTU_Base::set_desired_abs_positions ( signed short int *  Ppos,
signed short int *  Tpos 
)
char cPTU_Base::set_ISM_desired_abs_positions ( signed short int *  Ppos,
signed short int *  Tpos 
)

References current_host_port, get_binary_command_return_status(), PAN_TILT_SET_ABS_POS, PutSignedShort(), and SerialOut().

Here is the call graph for this function:

char cPTU_Base::set_mode ( char  mode_type,
char  mode_parameter 
)
char cPTU_Base::set_PTU_motion ( short int  desired_pan_pos,
short int  desired_tilt_pos,
unsigned short int  desired_pan_speed,
unsigned short int  desired_tilt_speed 
)

References current_host_port, PutSignedShort(), PutUnsignedShort(), SerialBytesIn(), SerialBytesOut(), SET_DESIRED_PTU_MOTION, and status.

Referenced by cPTU_Control::PanTiltPosSpeed().

Here is the call graph for this function:

Here is the caller graph for this function:

char cPTU_Base::set_pure_velocities ( signed short int *  pan_speed,
signed short int *  tilt_speed 
)

References current_host_port, get_binary_command_return_status(), PAN_SET_ABS_SPEED, PLN, PTU_OK, PutSignedShort(), SerialOut(), and TILT_SET_ABS_SPEED.

Referenced by cPTU_Control::SetPureVelocity(), and cPTU_Control::SetPureVelocity_DegperSec().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char cPTU_Base::set_TTL_outputs ( unsigned char  in_TTL_control_byte  ) 

References GetSerialChar(), SerialOut(), TRUE, and TTL_CONTROLS.

Here is the call graph for this function:

char cPTU_Base::set_unit_id ( UID_fd  unit_ID  ) 

References current_host_port, GetSerialChar(), PutUnsignedShort(), SerialOut(), SET_UNIT_ID, and TRUE.

Here is the call graph for this function:

char cPTU_Base::talkto_CHA (  ) 

References CHA_comm_active, current_host_port, FALSE, ReadSerialLine(), SerialStringOut(), status, and TRUE.

Here is the call graph for this function:

char cPTU_Base::talkto_PTUcontroller (  ) 

References CHA_comm_active, current_host_port, FALSE, ReadSerialLine(), SerialStringOut(), status, and TRUE.

Here is the call graph for this function:

unsigned char cPTU_Base::TriggerOff (  ) 

References GetSerialChar(), SerialOut(), TRIGGER_CONTROLS, TRIGGER_OP_off, and TRUE.

Here is the call graph for this function:

unsigned char cPTU_Base::TriggerOn ( signed short int  startPanPos,
signed short int  deltaPos,
signed short int  numTriggers 
)

References current_host_port, GetSerialChar(), PutSignedShort(), SerialOut(), TRIGGER_CONTROLS, TRIGGER_OP_on, and TRUE.

Here is the call graph for this function:

signed short int cPTU_Base::TriggersPending (  ) 

References current_host_port, GetSignedShort(), SerialOut(), TRIGGER_CONTROLS, and TRIGGER_OP_numPending.

Here is the call graph for this function:


Field Documentation


The documentation for this class was generated from the following files:
Generated on Wed Jun 2 12:43:29 2010 for LAR Atlas by  doxygen 1.6.3