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

Go to the source code of this file.

Classes

class  YDelayedPulse
 
class  YRelay
 

Macros

#define _CLASS_YDELAYEDPULSE
 
#define _Y_OUTPUT_ENUM
 
#define _Y_STATE_ENUM
 
#define _Y_STATEATPOWERON_ENUM
 
#define Y_COUNTDOWN_INVALID   (YAPI_INVALID_LONG)
 
#define Y_MAXTIMEONSTATEA_INVALID   (YAPI_INVALID_LONG)
 
#define Y_MAXTIMEONSTATEB_INVALID   (YAPI_INVALID_LONG)
 
#define Y_PULSETIMER_INVALID   (YAPI_INVALID_LONG)
 

Typedefs

typedef void(* YRelayValueCallback) (YRelay *func, const string &functionValue)
 

Enumerations

enum  Y_OUTPUT_enum {
  Y_OUTPUT_OFF = 0, Y_OUTPUT_ON = 1, Y_OUTPUT_INVALID = -1, Y_OUTPUT_OFF = 0,
  Y_OUTPUT_ON = 1, Y_OUTPUT_INVALID = -1
}
 
enum  Y_STATE_enum {
  Y_STATE_A = 0, Y_STATE_B = 1, Y_STATE_INVALID = -1, Y_STATE_A = 0,
  Y_STATE_B = 1, Y_STATE_INVALID = -1
}
 
enum  Y_STATEATPOWERON_enum {
  Y_STATEATPOWERON_UNCHANGED = 0, Y_STATEATPOWERON_A = 1, Y_STATEATPOWERON_B = 2, Y_STATEATPOWERON_INVALID = -1,
  Y_STATEATPOWERON_UNCHANGED = 0, Y_STATEATPOWERON_A = 1, Y_STATEATPOWERON_B = 2, Y_STATEATPOWERON_INVALID = -1
}
 

Functions

YRelayyFindRelay (const string &func)
 
YRelayyFirstRelay (void)
 

Macro Definition Documentation

#define _CLASS_YDELAYEDPULSE

Definition at line 81 of file yocto_relay.h.

#define _Y_OUTPUT_ENUM

Definition at line 73 of file yocto_relay.h.

#define _Y_STATE_ENUM

Definition at line 56 of file yocto_relay.h.

#define _Y_STATEATPOWERON_ENUM

Definition at line 64 of file yocto_relay.h.

#define Y_COUNTDOWN_INVALID   (YAPI_INVALID_LONG)

Definition at line 100 of file yocto_relay.h.

#define Y_MAXTIMEONSTATEA_INVALID   (YAPI_INVALID_LONG)

Definition at line 97 of file yocto_relay.h.

#define Y_MAXTIMEONSTATEB_INVALID   (YAPI_INVALID_LONG)

Definition at line 98 of file yocto_relay.h.

#define Y_PULSETIMER_INVALID   (YAPI_INVALID_LONG)

Definition at line 99 of file yocto_relay.h.

Typedef Documentation

typedef void(* YRelayValueCallback) (YRelay *func, const string &functionValue)

Definition at line 54 of file yocto_relay.h.

Enumeration Type Documentation

Enumerator
Y_OUTPUT_OFF 
Y_OUTPUT_ON 
Y_OUTPUT_INVALID 
Y_OUTPUT_OFF 
Y_OUTPUT_ON 
Y_OUTPUT_INVALID 

Definition at line 74 of file yocto_relay.h.

Enumerator
Y_STATE_A 
Y_STATE_B 
Y_STATE_INVALID 
Y_STATE_A 
Y_STATE_B 
Y_STATE_INVALID 

Definition at line 57 of file yocto_relay.h.

Enumerator
Y_STATEATPOWERON_UNCHANGED 
Y_STATEATPOWERON_A 
Y_STATEATPOWERON_B 
Y_STATEATPOWERON_INVALID 
Y_STATEATPOWERON_UNCHANGED 
Y_STATEATPOWERON_A 
Y_STATEATPOWERON_B 
Y_STATEATPOWERON_INVALID 

Definition at line 65 of file yocto_relay.h.

Function Documentation

YRelay* yFindRelay ( const string &  func)
inline

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

Definition at line 474 of file yocto_relay.h.

YRelay* yFirstRelay ( void  )
inline

Starts the enumeration of relays currently accessible. Use the method YRelay.nextRelay() to iterate on next relays.

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

Definition at line 485 of file yocto_relay.h.



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