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

Go to the source code of this file.

Classes

class  YPwmInput
 

Macros

#define _Y_PWMREPORTMODE_ENUM
 
#define Y_DEBOUNCEPERIOD_INVALID   (YAPI_INVALID_UINT)
 
#define Y_DUTYCYCLE_INVALID   (YAPI_INVALID_DOUBLE)
 
#define Y_FREQUENCY_INVALID   (YAPI_INVALID_DOUBLE)
 
#define Y_PERIOD_INVALID   (YAPI_INVALID_DOUBLE)
 
#define Y_PULSECOUNTER_INVALID   (YAPI_INVALID_LONG)
 
#define Y_PULSEDURATION_INVALID   (YAPI_INVALID_DOUBLE)
 
#define Y_PULSETIMER_INVALID   (YAPI_INVALID_LONG)
 

Typedefs

typedef void(* YPwmInputTimedReportCallback) (YPwmInput *func, YMeasure measure)
 
typedef void(* YPwmInputValueCallback) (YPwmInput *func, const string &functionValue)
 

Enumerations

enum  Y_PWMREPORTMODE_enum {
  Y_PWMREPORTMODE_PWM_DUTYCYCLE = 0, Y_PWMREPORTMODE_PWM_FREQUENCY = 1, Y_PWMREPORTMODE_PWM_PULSEDURATION = 2, Y_PWMREPORTMODE_PWM_EDGECOUNT = 3,
  Y_PWMREPORTMODE_PWM_PULSECOUNT = 4, Y_PWMREPORTMODE_PWM_CPS = 5, Y_PWMREPORTMODE_PWM_CPM = 6, Y_PWMREPORTMODE_PWM_STATE = 7,
  Y_PWMREPORTMODE_INVALID = -1
}
 

Functions

YPwmInputyFindPwmInput (const string &func)
 
YPwmInputyFirstPwmInput (void)
 

Macro Definition Documentation

#define _Y_PWMREPORTMODE_ENUM

Definition at line 58 of file yocto_pwminput.h.

#define Y_DEBOUNCEPERIOD_INVALID   (YAPI_INVALID_UINT)

Definition at line 77 of file yocto_pwminput.h.

#define Y_DUTYCYCLE_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 71 of file yocto_pwminput.h.

#define Y_FREQUENCY_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 73 of file yocto_pwminput.h.

#define Y_PERIOD_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 74 of file yocto_pwminput.h.

#define Y_PULSECOUNTER_INVALID   (YAPI_INVALID_LONG)

Definition at line 75 of file yocto_pwminput.h.

#define Y_PULSEDURATION_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 72 of file yocto_pwminput.h.

#define Y_PULSETIMER_INVALID   (YAPI_INVALID_LONG)

Definition at line 76 of file yocto_pwminput.h.

Typedef Documentation

typedef void(* YPwmInputTimedReportCallback) (YPwmInput *func, YMeasure measure)

Definition at line 56 of file yocto_pwminput.h.

typedef void(* YPwmInputValueCallback) (YPwmInput *func, const string &functionValue)

Definition at line 54 of file yocto_pwminput.h.

Enumeration Type Documentation

Enumerator
Y_PWMREPORTMODE_PWM_DUTYCYCLE 
Y_PWMREPORTMODE_PWM_FREQUENCY 
Y_PWMREPORTMODE_PWM_PULSEDURATION 
Y_PWMREPORTMODE_PWM_EDGECOUNT 
Y_PWMREPORTMODE_PWM_PULSECOUNT 
Y_PWMREPORTMODE_PWM_CPS 
Y_PWMREPORTMODE_PWM_CPM 
Y_PWMREPORTMODE_PWM_STATE 
Y_PWMREPORTMODE_INVALID 

Definition at line 59 of file yocto_pwminput.h.

Function Documentation

YPwmInput* yFindPwmInput ( const string &  func)
inline

Retrieves a PWM input 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 PWM input is online at the time it is invoked. The returned object is nevertheless valid. Use the method YPwmInput.isOnline() to test if the PWM input is indeed online at a given time. In case of ambiguity when looking for a PWM input 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 PWM input
Returns
a YPwmInput object allowing you to drive the PWM input.

Definition at line 413 of file yocto_pwminput.h.

YPwmInput* yFirstPwmInput ( void  )
inline

Starts the enumeration of PWM inputs currently accessible. Use the method YPwmInput.nextPwmInput() to iterate on next PWM inputs.

Returns
a pointer to a YPwmInput object, corresponding to the first PWM input currently online, or a NULL pointer if there are none.

Definition at line 424 of file yocto_pwminput.h.



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