Smr write

From Rsewiki
Revision as of 13:24, 29 September 2008 by Lvm (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
int smr_write(struct smr *robot);

Smr_write communcates with the smr daemon [smrd], sending fields in the struct smr pointed to by robot for transmission in a subsequent sample period.

Smr_write uses some of the fields in *robot as input parameters.

Ordinarily, zero is returned. If case of error, for example if communication is not possible, a non-zero value is returned.

Input parameters

The following fields are read by smr_write:

  robot->write_flags:   An ORed combination of flags, indicating which data smr_write should send.
  robot->left.speed, robot->right.speed:   Motor speed reference values.
  robot->msg:   Asynchronous message to send.

The valid write flags are:

  SMR_FLAG_LV:   Left motor speed.
  SMR_FLAG_RV:   Right motor speed.
  SMR_FLAG_AM:   Asynchronous message.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox