src/libYARP_dev/galil/qnx6/yarp/YARPGalilDeviceDriver.cpp
int YARPGalilDeviceDriver::get_ref_speeds(void *spds)
{
	long rc = 0;

	// int *output = (int *) spds;
	double *output = (double *) spds;

	char cmd[] = "SP";
	char *buff = m_buffer_out;

	memcpy(buff, cmd, sizeof(cmd)-1);
	buff+=(sizeof(cmd)-1);

	buff = _append_question_marks(buff);

	// close command
	buff = _append_cmd('\0', buff);

	rc = DMCCommand((HANDLEDMC) m_handle,
					m_buffer_out,
					m_buffer_in, buff_length);

	_ascii_to_binary(m_buffer_in, output);

	return rc;
}
// these commands are ascii; I KNOW this is probably slow...
// however these are methods which are executed once in a while and I didn't
// want to waste time (someone would say I'm lazy :) )
these commands are ascii; I KNOW this is probably slow
however these are methods which are executed once in a while and I didn't
want to waste time (someone would say I'm lazy :) )
these commands are ascii ; I KNOW this is probably slow however these are methods which are executed once in a while and I didn ' t want to waste time ( someone would say I ' m lazy : ) )
int YARPGalilDeviceDriver::get_ref_speeds(void *spds)
{
	long rc = 0;
	double *output = (double *) spds;
	char cmd[] = "SP";
	char *buff = m_buffer_out;
	memcpy(buff, cmd, sizeof(cmd)-1);
	buff+=(sizeof(cmd)-1);
	buff = _append_question_marks(buff);
	buff = _append_cmd('\0', buff);
	rc = DMCCommand((HANDLEDMC) m_handle,
					m_buffer_out,
					m_buffer_in, buff_length);
	_ascii_to_binary(m_buffer_in, output);
	return rc;
}
int YARPGalilDeviceDriver :: get_ref_speeds ( void * spds ) { long rc = 0 ; double * output = ( double * ) spds ; char cmd [ ] = " " ; char * buff = m_buffer_out ; memcpy ( buff , cmd , sizeof ( cmd ) - 1 ) ; buff += ( sizeof ( cmd ) - 1 ) ; buff = _append_question_marks ( buff ) ; buff = _append_cmd ( ' \0 ' , buff ) ; rc = DMCCommand ( ( HANDLEDMC ) m_handle , m_buffer_out , m_buffer_in , buff_length ) ; _ascii_to_binary ( m_buffer_in , output ) ; return rc ; }
these commands are ascii; I KNOW this is probably slow...
however these are methods which are executed once in a while and I didn't
want to waste time (someone would say I'm lazy :) )
these commands are ascii ; I KNOW this is probably slow ... however these are methods which are executed once in a while and I didn ' t want to waste time ( someone would say I ' m lazy : ) )
// int *output = (int *) spds; // close command