Classes | Macros | Typedefs | Enumerations | Functions
yocto_motor.h File Reference
#include "yocto_api.h"
#include <cfloat>
#include <cmath>
#include <map>
Include dependency graph for yocto_motor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  YMotor
 

Macros

#define _Y_MOTORSTATUS_ENUM
 
#define Y_BRAKINGFORCE_INVALID   (YAPI_INVALID_DOUBLE)
 
#define Y_COMMAND_INVALID   (YAPI_INVALID_STRING)
 
#define Y_CUTOFFVOLTAGE_INVALID   (YAPI_INVALID_DOUBLE)
 
#define Y_DRIVINGFORCE_INVALID   (YAPI_INVALID_DOUBLE)
 
#define Y_FAILSAFETIMEOUT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_FREQUENCY_INVALID   (YAPI_INVALID_DOUBLE)
 
#define Y_OVERCURRENTLIMIT_INVALID   (YAPI_INVALID_INT)
 
#define Y_STARTERTIME_INVALID   (YAPI_INVALID_INT)
 

Typedefs

typedef void(* YMotorValueCallback) (YMotor *func, const string &functionValue)
 

Enumerations

enum  Y_MOTORSTATUS_enum {
  Y_MOTORSTATUS_IDLE = 0, Y_MOTORSTATUS_BRAKE = 1, Y_MOTORSTATUS_FORWD = 2, Y_MOTORSTATUS_BACKWD = 3,
  Y_MOTORSTATUS_LOVOLT = 4, Y_MOTORSTATUS_HICURR = 5, Y_MOTORSTATUS_HIHEAT = 6, Y_MOTORSTATUS_FAILSF = 7,
  Y_MOTORSTATUS_INVALID = -1
}
 

Functions

YMotoryFindMotor (const string &func)
 
YMotoryFirstMotor (void)
 

Macro Definition Documentation

#define _Y_MOTORSTATUS_ENUM

Definition at line 56 of file yocto_motor.h.

#define Y_BRAKINGFORCE_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 70 of file yocto_motor.h.

#define Y_COMMAND_INVALID   (YAPI_INVALID_STRING)

Definition at line 76 of file yocto_motor.h.

#define Y_CUTOFFVOLTAGE_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 71 of file yocto_motor.h.

#define Y_DRIVINGFORCE_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 69 of file yocto_motor.h.

#define Y_FAILSAFETIMEOUT_INVALID   (YAPI_INVALID_UINT)

Definition at line 75 of file yocto_motor.h.

#define Y_FREQUENCY_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 73 of file yocto_motor.h.

#define Y_OVERCURRENTLIMIT_INVALID   (YAPI_INVALID_INT)

Definition at line 72 of file yocto_motor.h.

#define Y_STARTERTIME_INVALID   (YAPI_INVALID_INT)

Definition at line 74 of file yocto_motor.h.

Typedef Documentation

typedef void(* YMotorValueCallback) (YMotor *func, const string &functionValue)

Definition at line 54 of file yocto_motor.h.

Enumeration Type Documentation

Enumerator
Y_MOTORSTATUS_IDLE 
Y_MOTORSTATUS_BRAKE 
Y_MOTORSTATUS_FORWD 
Y_MOTORSTATUS_BACKWD 
Y_MOTORSTATUS_LOVOLT 
Y_MOTORSTATUS_HICURR 
Y_MOTORSTATUS_HIHEAT 
Y_MOTORSTATUS_FAILSF 
Y_MOTORSTATUS_INVALID 

Definition at line 57 of file yocto_motor.h.

Function Documentation

YMotor* yFindMotor ( const string &  func)
inline

Retrieves a motor for a given identifier. The identifier can be specified using several formats:

  • FunctionLogicalName
  • ModuleSerialNumber.FunctionIdentifier
  • ModuleSerialNumber.FunctionLogicalName
  • ModuleLogicalName.FunctionIdentifier
  • ModuleLogicalName.FunctionLogicalName

This function does not require that the motor is online at the time it is invoked. The returned object is nevertheless valid. Use the method YMotor.isOnline() to test if the motor is indeed online at a given time. In case of ambiguity when looking for a motor by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object's is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

Parameters
func: a string that uniquely characterizes the motor
Returns
a YMotor object allowing you to drive the motor.

Definition at line 542 of file yocto_motor.h.

YMotor* yFirstMotor ( void  )
inline

Starts the enumeration of motors currently accessible. Use the method YMotor.nextMotor() to iterate on next motors.

Returns
a pointer to a YMotor object, corresponding to the first motor currently online, or a NULL pointer if there are none.

Definition at line 553 of file yocto_motor.h.



yoctopuce_altimeter
Author(s): Anja Sheppard
autogenerated on Mon Jun 10 2019 15:49:13