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

Go to the source code of this file.

Classes

class  YSerialPort
 
class  YSnoopingRecord
 

Macros

#define _Y_VOLTAGELEVEL_ENUM
 
#define Y_COMMAND_INVALID   (YAPI_INVALID_STRING)
 
#define Y_CURRENTJOB_INVALID   (YAPI_INVALID_STRING)
 
#define Y_ERRCOUNT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_LASTMSG_INVALID   (YAPI_INVALID_STRING)
 
#define Y_PROTOCOL_INVALID   (YAPI_INVALID_STRING)
 
#define Y_RXCOUNT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_RXMSGCOUNT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_SERIALMODE_INVALID   (YAPI_INVALID_STRING)
 
#define Y_STARTUPJOB_INVALID   (YAPI_INVALID_STRING)
 
#define Y_TXCOUNT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_TXMSGCOUNT_INVALID   (YAPI_INVALID_UINT)
 

Typedefs

typedef void(* YSerialPortValueCallback) (YSerialPort *func, const string &functionValue)
 

Enumerations

enum  Y_VOLTAGELEVEL_enum {
  Y_VOLTAGELEVEL_OFF = 0, Y_VOLTAGELEVEL_TTL3V = 1, Y_VOLTAGELEVEL_TTL3VR = 2, Y_VOLTAGELEVEL_TTL5V = 3,
  Y_VOLTAGELEVEL_TTL5VR = 4, Y_VOLTAGELEVEL_RS232 = 5, Y_VOLTAGELEVEL_RS485 = 6, Y_VOLTAGELEVEL_INVALID = -1,
  Y_VOLTAGELEVEL_OFF = 0, Y_VOLTAGELEVEL_TTL3V = 1, Y_VOLTAGELEVEL_TTL3VR = 2, Y_VOLTAGELEVEL_TTL5V = 3,
  Y_VOLTAGELEVEL_TTL5VR = 4, Y_VOLTAGELEVEL_RS232 = 5, Y_VOLTAGELEVEL_RS485 = 6, Y_VOLTAGELEVEL_INVALID = -1
}
 

Functions

YSerialPortyFindSerialPort (const string &func)
 
YSerialPortyFirstSerialPort (void)
 

Macro Definition Documentation

#define _Y_VOLTAGELEVEL_ENUM

Definition at line 56 of file yocto_serialport.h.

#define Y_COMMAND_INVALID   (YAPI_INVALID_STRING)

Definition at line 76 of file yocto_serialport.h.

#define Y_CURRENTJOB_INVALID   (YAPI_INVALID_STRING)

Definition at line 74 of file yocto_serialport.h.

#define Y_ERRCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 70 of file yocto_serialport.h.

#define Y_LASTMSG_INVALID   (YAPI_INVALID_STRING)

Definition at line 73 of file yocto_serialport.h.

#define Y_PROTOCOL_INVALID   (YAPI_INVALID_STRING)

Definition at line 77 of file yocto_serialport.h.

#define Y_RXCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 68 of file yocto_serialport.h.

#define Y_RXMSGCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 71 of file yocto_serialport.h.

#define Y_SERIALMODE_INVALID   (YAPI_INVALID_STRING)

Definition at line 78 of file yocto_serialport.h.

#define Y_STARTUPJOB_INVALID   (YAPI_INVALID_STRING)

Definition at line 75 of file yocto_serialport.h.

#define Y_TXCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 69 of file yocto_serialport.h.

#define Y_TXMSGCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 72 of file yocto_serialport.h.

Typedef Documentation

typedef void(* YSerialPortValueCallback) (YSerialPort *func, const string &functionValue)

Definition at line 54 of file yocto_serialport.h.

Enumeration Type Documentation

Enumerator
Y_VOLTAGELEVEL_OFF 
Y_VOLTAGELEVEL_TTL3V 
Y_VOLTAGELEVEL_TTL3VR 
Y_VOLTAGELEVEL_TTL5V 
Y_VOLTAGELEVEL_TTL5VR 
Y_VOLTAGELEVEL_RS232 
Y_VOLTAGELEVEL_RS485 
Y_VOLTAGELEVEL_INVALID 
Y_VOLTAGELEVEL_OFF 
Y_VOLTAGELEVEL_TTL3V 
Y_VOLTAGELEVEL_TTL3VR 
Y_VOLTAGELEVEL_TTL5V 
Y_VOLTAGELEVEL_TTL5VR 
Y_VOLTAGELEVEL_RS232 
Y_VOLTAGELEVEL_RS485 
Y_VOLTAGELEVEL_INVALID 

Definition at line 57 of file yocto_serialport.h.

Function Documentation

YSerialPort* yFindSerialPort ( const string &  func)
inline

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

Definition at line 993 of file yocto_serialport.h.

YSerialPort* yFirstSerialPort ( void  )
inline

Starts the enumeration of serial ports currently accessible. Use the method YSerialPort.nextSerialPort() to iterate on next serial ports.

Returns
a pointer to a YSerialPort object, corresponding to the first serial port currently online, or a NULL pointer if there are none.

Definition at line 1004 of file yocto_serialport.h.



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