Classes | Macros | Typedefs | Enumerations | Functions | Variables
yproto.h File Reference
#include "ydef.h"
#include "yapi.h"
#include "ytcp.h"
#include "yfifo.h"
#include "yhash.h"
#include "ykey.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include "ymemory.h"
#include <unistd.h>
#include <stdio.h>
Include dependency graph for yproto.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _HTTPNetHubSt
 
struct  _HTTPReqSt
 
struct  _HubSt
 
struct  _pktItem
 
struct  _RequestSt
 
struct  _WSChanSt
 
struct  _WSNetHubSt
 
struct  _WSReqSt
 
struct  _yGenericDeviceSt
 
struct  _yInterfaceSt
 
struct  _YIOHDL_internal
 
struct  _yPrivDeviceSt
 
struct  FUpdateContext
 
struct  OS_USB_Packet
 
struct  pktQueue
 
struct  USB_HDL
 
struct  yContextSt
 
struct  yPerfMon
 

Macros

#define ALLOC_YDX_PER_HUB   256
 
#define dbglog(args...)   dbglogf(__FILE_ID__,__LINE__, ## args)
 
#define DEVGEN_LOG_ACTIVATED   1u
 
#define DEVGEN_LOG_PENDING   2u
 
#define DEVGEN_LOG_PULLING   4u
 
#define ENUMLOG(fmt, args...)
 
#define FIND_FROM_ANY   (FIND_FROM_SERIAL|FIND_FROM_NAME)
 
#define FIND_FROM_NAME   2
 
#define FIND_FROM_SERIAL   1
 
#define HALENUMLOG(fmt, args...)
 
#define HALLOG(fmt, args...)
 
#define HTTP_RAW_BUFF_SIZE   (8*1024)
 
#define MAX_YDX_PER_HUB   255
 
#define MSC_VS2003   1310
 
#define NB_LINUX_USB_TR   1
 
#define NB_MAX_STARTUP_RETRY   5u
 
#define NBMAX_INTERFACE_PER_DEV   1
 
#define NBMAX_NET_HUB   32
 
#define NBMAX_USB_DEVICE_CONNECTED   256
 
#define NET_HUB_NOT_CONNECTION_TIMEOUT   (6*1024)
 
#define NETENUMLOG(fmt, args...)
 
#define NEXT_IFACE_NO(current, total)   (current+1<total?current+1:0)
 
#define NEXT_YPKT_NO(current)   ((current+1)& YPKTNOMSK)
 
#define REQLOG(fmt, args...)
 
#define SETUPED_IFACE_CACHE_SIZE   128
 
#define STRINGIFY(x)   #x
 
#define TCPLOG(fmt, args...)
 
#define TCPREQ_IN_USE   2
 
#define TCPREQ_KEEPALIVE   1
 
#define TOSTRING(x)   STRINGIFY(x)
 
#define TRACEFILE_NAMELEN   512
 
#define WIN_DEVICE_PATH_LEN   512
 
#define WSLOG(fmt, args...)
 
#define yApproximateSleep(ms)   usleep(ms*1000)
 
#define YASSERT(x)   if(!(x)){dbglog("ASSERT FAILED:%s:%d\n",__FILE_ID__ , __LINE__);YDEBUG_BREAK}
 
#define YCTX_OSX_MULTIPLES_HID   1
 
#define YDEBUG_BREAK   {}
 
#define YERR(code)   ySetErr(code,errmsg,NULL,__FILE_ID__,__LINE__)
 
#define YERRMSG(code, message)   ySetErr(code,errmsg,message,__FILE_ID__,__LINE__)
 
#define YERRMSGSILENT(code, message)   ySetErr(code, errmsg, message, NULL, 0)
 
#define YERRMSGTO(code, message, buffer)   ySetErr(code,buffer,message,__FILE_ID__,__LINE__)
 
#define YERRTO(code, buffer)   ySetErr(code,buffer,NULL,__FILE_ID__,__LINE__)
 
#define yFree(ptr)   free(ptr)
 
#define YIO_REMOTE_CLOSE   1u
 
#define yMalloc(size)   malloc(size)
 
#define yMemcpy(dst, src, size)   memcpy(dst,src,size)
 
#define yMemmove(dst, src, size)   memmove(dst,src,size)
 
#define yMemset(dst, val, size)   memset(dst,val,size)
 
#define YPANIC   {dbglog("YPANIC:%s:%d\n",__FILE_ID__ , __LINE__);YDEBUG_BREAK}
 
#define YPKT_VERSION_ORIGINAL_RELEASE   0x0202
 
#define YPROPERR(call)   {int tmpres=(call); if(YISERR(tmpres)) {return (YRETCODE)tmpres;}}
 
#define YREQLOG(fmt, args...)
 
#define YSPRINTF   ysprintf_s
 
#define YSTRCAT(dst, dstsize, src)   ystrcat_s(dst,dstsize,src)
 
#define YSTRCMP(A, B)   strcmp(A,B)
 
#define YSTRCPY(dst, dstsize, src)   ystrcpy_s(dst,dstsize,src)
 
#define YSTRDUP(src)   ystrdup_s(src)
 
#define YSTRICMP(A, B)   strcasecmp(A,B)
 
#define YSTRLEN(str)   ((int)strlen(str))
 
#define YSTRNCAT(dst, dstsize, src, len)   ystrncat_s(dst,dstsize,src,len)
 
#define YSTRNCMP(A, B, len)   strncmp(A,B,len)
 
#define YSTRNCPY(dst, dstsize, src, len)   ystrncpy_s(dst,dstsize,src,len)
 
#define YSTRNICMP(A, B, len)   strncasecmp(A,B,len)
 
#define yTracePtr(ptr)
 
#define YVSPRINTF   yvsprintf_s
 
#define YWIN_EVENT_INTERRUPT   1
 
#define YWIN_EVENT_READ   0
 

Typedefs

typedef struct _HTTPNetHubSt HTTPNetHub
 
typedef struct _HTTPReqSt HTTPReqSt
 
typedef struct _HubSt HubSt
 
typedef struct _pktItem pktItem
 
typedef void(* RequestProgress) (void *context, u32 acked, u32 totalbytes)
 
typedef struct _RequestSt RequestSt
 
typedef struct _WSChanSt WSChanSt
 
typedef struct _WSNetHubSt WSNetHub
 
typedef struct _WSReqSt WSReqSt
 
typedef void(* yDevInfoCallback) (const yDeviceSt *infos)
 
typedef struct _yGenericDeviceSt yGenericDeviceSt
 
typedef struct _yInterfaceSt yInterfaceSt
 
typedef struct _YIOHDL_internal YIOHDL_internal
 
typedef void(* yNotificCallback) (const char *serial, const char *funcid, const char *funcname, const char *funcval)
 
typedef struct _yPrivDeviceSt yPrivDeviceSt
 

Enumerations

enum  NET_HUB_STATE {
  NET_HUB_DISCONNECTED =0, NET_HUB_TRYING, NET_HUB_ESTABLISHED, NET_HUB_TOCLOSE,
  NET_HUB_CLOSED
}
 
enum  RequestState {
  REQ_CLOSED = 0, REQ_OPEN, REQ_CLOSED_BY_HUB, REQ_CLOSED_BY_API,
  REQ_ERROR
}
 
enum  USB_THREAD_STATE { USB_THREAD_NOT_STARTED, USB_THREAD_RUNNING, USB_THREAD_MUST_STOP, USB_THREAD_STOPED }
 
enum  WS_BASE_STATE {
  WS_BASE_OFFLINE = 0, WS_BASE_HEADER_SENT, WS_BASE_SOCKET_UPGRADED, WS_BASE_AUTHENTICATING,
  WS_BASE_CONNECTED
}
 
enum  YDEV_STATUS { YDEV_UNPLUGGED =0, YDEV_WORKING, YDEV_NOTRESPONDING }
 
enum  YENU_ACTION { YENU_NONE, YENU_START, YENU_STOP, YENU_RESTART }
 
enum  YHTTP_STATUS {
  YHTTP_CLOSED, YHTTP_OPENED, YHTTP_INREQUEST, YHTTP_CLOSE_BY_DEV,
  YHTTP_CLOSE_BY_API
}
 
enum  YRUN_STATUS {
  YRUN_STOPED, YRUN_AVAIL, YRUN_REQUEST, YRUN_BUSY,
  YRUN_IDLE, YRUN_ERROR
}
 

Functions

int dbglogf (const char *fileid, int line, const char *fmt,...)
 
void devHdlInfo (YUSBDEV hdl, yDeviceSt *infos)
 
void dumpYPerfEntry (yPerfMon *entry, const char *name)
 
yPrivDeviceStfindDev (const char *str, u32 flags)
 
yPrivDeviceStfindDevFromIOHdl (YIOHDL_internal *hdl)
 
YUSBDEV findDevHdlFromStr (const char *str)
 
void freeDevYdxInfos (int devYdx)
 
int FusionErrmsg (int code, char *errmsg, const char *generr, const char *detailerr)
 
int handleNetNotification (HubSt *hub)
 
void initDevYdxInfos (int devYdxy, yStrRef serial)
 
int vdbglogf (const char *fileid, int line, const char *fmt, va_list args)
 
void wpSafeRegister (HubSt *hub, u8 devYdx, yStrRef serialref, yStrRef lnameref, yStrRef productref, u16 deviceid, yUrlRef devUrl, s8 beacon)
 
void wpSafeUnregister (yStrRef serialref)
 
void wpSafeUpdate (HubSt *hub, u8 devYdx, yStrRef serialref, yStrRef lnameref, yUrlRef devUrl, s8 beacon)
 
u32 yapiGetCNonce (u32 nc)
 
YRETCODE yapiHTTPRequestSyncDone_internal (YIOHDL *iohdl, char *errmsg)
 
YRETCODE yapiHTTPRequestSyncStartEx_internal (YIOHDL *iohdl, int tcpchan, const char *device, const char *request, int requestsize, char **reply, int *replysize, yapiRequestProgressCallback progress_cb, void *progress_ctx, char *errmsg)
 
int yapiJsonGetPath_internal (const char *path, const char *json_data, int json_size, int withHTTPheader, const char **output, char *errmsg)
 
YRETCODE yapiPullDeviceLog (const char *serial)
 
YRETCODE yapiPullDeviceLogEx (int devydx)
 
YRETCODE yapiRequestOpen (YIOHDL_internal *iohdl, int tpchan, const char *device, const char *request, int reqlen, yapiRequestAsyncCallback callback, void *context, yapiRequestProgressCallback progress_cb, void *progress_ctx, char *errmsg)
 
int YFOPEN (FILE **f, const char *filename, const char *mode)
 
void yFunctionTimedUpdate (YAPI_FUNCTION fundescr, double deviceTime, const u8 *report, u32 len)
 
void yFunctionUpdate (YAPI_FUNCTION fundescr, const char *value)
 
int ymemfind (const u8 *haystack, u32 haystack_len, const u8 *needle, u32 needle_len)
 
void yPktQueueFree (pktQueue *q)
 
void yPktQueueInit (pktQueue *q)
 
YRETCODE yPktQueuePeekH2D (yInterfaceSt *iface, pktItem **pkt)
 
YRETCODE yPktQueuePopH2D (yInterfaceSt *iface, pktItem **pkt)
 
YRETCODE yPktQueuePushD2H (yInterfaceSt *iface, const USB_Packet *pkt, char *errmsg)
 
YRETCODE yPktQueuePushH2D (yInterfaceSt *iface, const USB_Packet *pkt, char *errmsg)
 
void yPktQueueSetError (pktQueue *q, YRETCODE code, const char *msg)
 
YRETCODE yPktQueueWaitAndPopD2H (yInterfaceSt *iface, pktItem **pkt, int ms, char *errmsg)
 
void ypUpdateHybrid (const char *serial, Notification_funydx funInfo, const char *funcval)
 
void ypUpdateUSB (const char *serial, const char *funcid, const char *funcname, int funclass, int funydx, const char *funcval)
 
void ypUpdateYdx (int devydx, Notification_funydx funInfo, const char *funcval)
 
int ySetErr (int code, char *outmsg, const char *erreur, const char *file, u32 line)
 
int ysprintf_s (char *dst, unsigned dstsize, const char *fmt,...)
 
YRETCODE ystrcat_s (char *dst, unsigned dstsize, const char *src)
 
YRETCODE ystrcpy_s (char *dst, unsigned dstsize, const char *src)
 
char * ystrdup_s (const char *src)
 
YRETCODE ystrncat_s (char *dst, unsigned dstsize, const char *src, unsigned len)
 
YRETCODE ystrncpy_s (char *dst, unsigned dstsize, const char *src, unsigned len)
 
int yUsbClose (YIOHDL_internal *ioghdl, char *errmsg)
 
int yUsbEOF (YIOHDL_internal *ioghdl, char *errmsg)
 
int yUsbFree (yContextSt *ctx, char *errmsg)
 
int yUSBGetBooloader (const char *serial, const char *name, yInterfaceSt *iface, char *errmsg)
 
yGenericDeviceStyUSBGetGenericInfo (yStrRef devdescr)
 
int yUsbIdle (void)
 
int yUsbInit (yContextSt *ctx, char *errmsg)
 
int yUsbOpen (YIOHDL_internal *ioghdl, const char *device, char *errmsg)
 
int yUsbOpenDevDescr (YIOHDL_internal *ioghdl, yStrRef devdescr, char *errmsg)
 
int yUsbReadBlock (YIOHDL_internal *ioghdl, char *buffer, int len, u64 blockUntil, char *errmsg)
 
int yUsbReadNonBlock (YIOHDL_internal *ioghdl, char *buffer, int len, char *errmsg)
 
void yUSBReleaseAllDevices (void)
 
int yUsbSetIOAsync (YIOHDL_internal *ioghdl, yapiRequestAsyncCallback callback, void *context, char *errmsg)
 
int yUsbTrafficPending (void)
 
YRETCODE yUSBUpdateDeviceList (char *errmsg)
 
int yUsbWrite (YIOHDL_internal *ioghdl, const char *buffer, int writelen, char *errmsg)
 
int yvsprintf_s (char *dst, unsigned dstsize, const char *fmt, va_list arg)
 
int yyyOShdlCompare (yPrivDeviceSt *dev, yInterfaceSt *newiface)
 
void yyyPacketShutdown (yInterfaceSt *iface)
 
YRETCODE yyySendPacket (yInterfaceSt *iface, const USB_Packet *pkt, char *errmsg)
 
int yyySetup (yInterfaceSt *iface, char *errmsg)
 
int yyySignalOutPkt (yInterfaceSt *iface, char *errmsg)
 
int yyyUSB_init (yContextSt *ctx, char *errmsg)
 
int yyyUSB_stop (yContextSt *ctx, char *errmsg)
 
int yyyUSBGetInterfaces (yInterfaceSt **ifaces, int *nbifaceDetect, char *errmsg)
 

Variables

yContextStyContext
 
char ytracefile []
 

Macro Definition Documentation

#define ALLOC_YDX_PER_HUB   256

Definition at line 728 of file yproto.h.

#define dbglog (   args...)    dbglogf(__FILE_ID__,__LINE__, ## args)

Definition at line 413 of file yproto.h.

#define DEVGEN_LOG_ACTIVATED   1u

Definition at line 646 of file yproto.h.

#define DEVGEN_LOG_PENDING   2u

Definition at line 647 of file yproto.h.

#define DEVGEN_LOG_PULLING   4u

Definition at line 648 of file yproto.h.

#define ENUMLOG (   fmt,
  args... 
)

Definition at line 356 of file yproto.h.

#define FIND_FROM_ANY   (FIND_FROM_SERIAL|FIND_FROM_NAME)

Definition at line 1037 of file yproto.h.

#define FIND_FROM_NAME   2

Definition at line 1036 of file yproto.h.

#define FIND_FROM_SERIAL   1

Definition at line 1035 of file yproto.h.

#define HALENUMLOG (   fmt,
  args... 
)

Definition at line 310 of file yproto.h.

#define HALLOG (   fmt,
  args... 
)

Definition at line 295 of file yproto.h.

#define HTTP_RAW_BUFF_SIZE   (8*1024)

Definition at line 556 of file yproto.h.

#define MAX_YDX_PER_HUB   255

Definition at line 727 of file yproto.h.

#define MSC_VS2003   1310

Definition at line 267 of file yproto.h.

#define NB_LINUX_USB_TR   1

Definition at line 557 of file yproto.h.

#define NB_MAX_STARTUP_RETRY   5u

Definition at line 672 of file yproto.h.

#define NBMAX_INTERFACE_PER_DEV   1

Definition at line 605 of file yproto.h.

#define NBMAX_NET_HUB   32

Definition at line 553 of file yproto.h.

#define NBMAX_USB_DEVICE_CONNECTED   256

Definition at line 554 of file yproto.h.

#define NET_HUB_NOT_CONNECTION_TIMEOUT   (6*1024)

Definition at line 733 of file yproto.h.

#define NETENUMLOG (   fmt,
  args... 
)

Definition at line 371 of file yproto.h.

#define NEXT_IFACE_NO (   current,
  total 
)    (current+1<total?current+1:0)

Definition at line 675 of file yproto.h.

#define NEXT_YPKT_NO (   current)    ((current+1)& YPKTNOMSK)

Definition at line 674 of file yproto.h.

#define REQLOG (   fmt,
  args... 
)

Definition at line 340 of file yproto.h.

#define SETUPED_IFACE_CACHE_SIZE   128

Definition at line 890 of file yproto.h.

#define STRINGIFY (   x)    #x

Definition at line 422 of file yproto.h.

#define TCPLOG (   fmt,
  args... 
)

Definition at line 325 of file yproto.h.

#define TCPREQ_IN_USE   2

Definition at line 829 of file yproto.h.

#define TCPREQ_KEEPALIVE   1

Definition at line 828 of file yproto.h.

#define TOSTRING (   x)    STRINGIFY(x)

Definition at line 423 of file yproto.h.

#define TRACEFILE_NAMELEN   512

Definition at line 987 of file yproto.h.

#define WIN_DEVICE_PATH_LEN   512

Definition at line 555 of file yproto.h.

#define WSLOG (   fmt,
  args... 
)

Definition at line 388 of file yproto.h.

#define yApproximateSleep (   ms)    usleep(ms*1000)

Definition at line 433 of file yproto.h.

#define YASSERT (   x)    if(!(x)){dbglog("ASSERT FAILED:%s:%d\n",__FILE_ID__ , __LINE__);YDEBUG_BREAK}

Definition at line 454 of file yproto.h.

#define YCTX_OSX_MULTIPLES_HID   1

Definition at line 920 of file yproto.h.

#define YDEBUG_BREAK   {}

Definition at line 450 of file yproto.h.

#define YERR (   code)    ySetErr(code,errmsg,NULL,__FILE_ID__,__LINE__)

Definition at line 456 of file yproto.h.

#define YERRMSG (   code,
  message 
)    ySetErr(code,errmsg,message,__FILE_ID__,__LINE__)

Definition at line 458 of file yproto.h.

#define YERRMSGSILENT (   code,
  message 
)    ySetErr(code, errmsg, message, NULL, 0)

Definition at line 459 of file yproto.h.

#define YERRMSGTO (   code,
  message,
  buffer 
)    ySetErr(code,buffer,message,__FILE_ID__,__LINE__)

Definition at line 460 of file yproto.h.

#define YERRTO (   code,
  buffer 
)    ySetErr(code,buffer,NULL,__FILE_ID__,__LINE__)

Definition at line 457 of file yproto.h.

#define yFree (   ptr)    free(ptr)

Definition at line 199 of file yproto.h.

#define YIO_REMOTE_CLOSE   1u

Definition at line 662 of file yproto.h.

#define yMalloc (   size)    malloc(size)

Definition at line 198 of file yproto.h.

#define yMemcpy (   dst,
  src,
  size 
)    memcpy(dst,src,size)

Definition at line 204 of file yproto.h.

#define yMemmove (   dst,
  src,
  size 
)    memmove(dst,src,size)

Definition at line 205 of file yproto.h.

#define yMemset (   dst,
  val,
  size 
)    memset(dst,val,size)

Definition at line 203 of file yproto.h.

#define YPANIC   {dbglog("YPANIC:%s:%d\n",__FILE_ID__ , __LINE__);YDEBUG_BREAK}

Definition at line 453 of file yproto.h.

#define YPKT_VERSION_ORIGINAL_RELEASE   0x0202

Definition at line 469 of file yproto.h.

#define YPROPERR (   call)    {int tmpres=(call); if(YISERR(tmpres)) {return (YRETCODE)tmpres;}}

Definition at line 455 of file yproto.h.

#define YREQLOG (   fmt,
  args... 
)

Definition at line 280 of file yproto.h.

#define YSPRINTF   ysprintf_s

Definition at line 238 of file yproto.h.

#define YSTRCAT (   dst,
  dstsize,
  src 
)    ystrcat_s(dst,dstsize,src)

Definition at line 235 of file yproto.h.

#define YSTRCMP (   A,
 
)    strcmp(A,B)

Definition at line 226 of file yproto.h.

#define YSTRCPY (   dst,
  dstsize,
  src 
)    ystrcpy_s(dst,dstsize,src)

Definition at line 234 of file yproto.h.

#define YSTRDUP (   src)    ystrdup_s(src)

Definition at line 233 of file yproto.h.

#define YSTRICMP (   A,
 
)    strcasecmp(A,B)

Definition at line 228 of file yproto.h.

#define YSTRLEN (   str)    ((int)strlen(str))

Definition at line 230 of file yproto.h.

#define YSTRNCAT (   dst,
  dstsize,
  src,
  len 
)    ystrncat_s(dst,dstsize,src,len)

Definition at line 236 of file yproto.h.

#define YSTRNCMP (   A,
  B,
  len 
)    strncmp(A,B,len)

Definition at line 227 of file yproto.h.

#define YSTRNCPY (   dst,
  dstsize,
  src,
  len 
)    ystrncpy_s(dst,dstsize,src,len)

Definition at line 237 of file yproto.h.

#define YSTRNICMP (   A,
  B,
  len 
)    strncasecmp(A,B,len)

Definition at line 229 of file yproto.h.

#define yTracePtr (   ptr)

Definition at line 200 of file yproto.h.

#define YVSPRINTF   yvsprintf_s

Definition at line 239 of file yproto.h.

#define YWIN_EVENT_INTERRUPT   1

Definition at line 560 of file yproto.h.

#define YWIN_EVENT_READ   0

Definition at line 559 of file yproto.h.

Typedef Documentation

typedef struct _HTTPNetHubSt HTTPNetHub
typedef struct _HTTPReqSt HTTPReqSt
typedef struct _HubSt HubSt
typedef struct _pktItem pktItem
typedef void(* RequestProgress) (void *context, u32 acked, u32 totalbytes)

Definition at line 855 of file yproto.h.

typedef struct _RequestSt RequestSt
typedef struct _WSChanSt WSChanSt
typedef struct _WSNetHubSt WSNetHub
typedef struct _WSReqSt WSReqSt
typedef void(* yDevInfoCallback) (const yDeviceSt *infos)

Definition at line 708 of file yproto.h.

typedef struct _yInterfaceSt yInterfaceSt
typedef void(* yNotificCallback) (const char *serial, const char *funcid, const char *funcname, const char *funcval)

Definition at line 709 of file yproto.h.

typedef struct _yPrivDeviceSt yPrivDeviceSt

Enumeration Type Documentation

Enumerator
NET_HUB_DISCONNECTED 
NET_HUB_TRYING 
NET_HUB_ESTABLISHED 
NET_HUB_TOCLOSE 
NET_HUB_CLOSED 

Definition at line 718 of file yproto.h.

Enumerator
REQ_CLOSED 
REQ_OPEN 
REQ_CLOSED_BY_HUB 
REQ_CLOSED_BY_API 
REQ_ERROR 

Definition at line 850 of file yproto.h.

Enumerator
USB_THREAD_NOT_STARTED 
USB_THREAD_RUNNING 
USB_THREAD_MUST_STOP 
USB_THREAD_STOPED 

Definition at line 711 of file yproto.h.

Enumerator
WS_BASE_OFFLINE 
WS_BASE_HEADER_SENT 
WS_BASE_SOCKET_UPGRADED 
WS_BASE_AUTHENTICATING 
WS_BASE_CONNECTED 

Definition at line 752 of file yproto.h.

Enumerator
YDEV_UNPLUGGED 
YDEV_WORKING 
YDEV_NOTRESPONDING 

Definition at line 606 of file yproto.h.

Enumerator
YENU_NONE 
YENU_START 
YENU_STOP 
YENU_RESTART 

Definition at line 617 of file yproto.h.

Enumerator
YHTTP_CLOSED 
YHTTP_OPENED 
YHTTP_INREQUEST 
YHTTP_CLOSE_BY_DEV 
YHTTP_CLOSE_BY_API 

Definition at line 635 of file yproto.h.

Enumerator
YRUN_STOPED 
YRUN_AVAIL 
YRUN_REQUEST 
YRUN_BUSY 
YRUN_IDLE 
YRUN_ERROR 

Definition at line 625 of file yproto.h.

Function Documentation

int dbglogf ( const char *  fileid,
int  line,
const char *  fmt,
  ... 
)

Definition at line 222 of file ystream.c.

void devHdlInfo ( YUSBDEV  hdl,
yDeviceSt infos 
)

Definition at line 2334 of file ystream.c.

void dumpYPerfEntry ( yPerfMon entry,
const char *  name 
)

Definition at line 2353 of file ystream.c.

yPrivDeviceSt* findDev ( const char *  str,
u32  flags 
)

Definition at line 2269 of file ystream.c.

yPrivDeviceSt* findDevFromIOHdl ( YIOHDL_internal hdl)

Definition at line 2310 of file ystream.c.

YUSBDEV findDevHdlFromStr ( const char *  str)

Definition at line 2299 of file ystream.c.

void freeDevYdxInfos ( int  devYdx)

Definition at line 388 of file yapi.c.

int FusionErrmsg ( int  code,
char *  errmsg,
const char *  generr,
const char *  detailerr 
)

Definition at line 112 of file ystream.c.

int handleNetNotification ( HubSt hub)

Definition at line 1677 of file yapi.c.

void initDevYdxInfos ( int  devYdxy,
yStrRef  serial 
)

Definition at line 379 of file yapi.c.

int vdbglogf ( const char *  fileid,
int  line,
const char *  fmt,
va_list  args 
)

Definition at line 189 of file ystream.c.

void wpSafeRegister ( HubSt hub,
u8  devYdx,
yStrRef  serialref,
yStrRef  lnameref,
yStrRef  productref,
u16  deviceid,
yUrlRef  devUrl,
s8  beacon 
)

Definition at line 599 of file yapi.c.

void wpSafeUnregister ( yStrRef  serialref)

Definition at line 703 of file yapi.c.

void wpSafeUpdate ( HubSt hub,
u8  devYdx,
yStrRef  serialref,
yStrRef  lnameref,
yUrlRef  devUrl,
s8  beacon 
)

Definition at line 659 of file yapi.c.

u32 yapiGetCNonce ( u32  nc)

Definition at line 2750 of file yapi.c.

YRETCODE yapiHTTPRequestSyncDone_internal ( YIOHDL iohdl,
char *  errmsg 
)

Definition at line 3398 of file yapi.c.

YRETCODE yapiHTTPRequestSyncStartEx_internal ( YIOHDL iohdl,
int  tcpchan,
const char *  device,
const char *  request,
int  requestsize,
char **  reply,
int *  replysize,
yapiRequestProgressCallback  progress_cb,
void *  progress_ctx,
char *  errmsg 
)

Definition at line 3348 of file yapi.c.

int yapiJsonGetPath_internal ( const char *  path,
const char *  json_data,
int  json_size,
int  withHTTPheader,
const char **  output,
char *  errmsg 
)

Definition at line 3912 of file yapi.c.

YRETCODE yapiPullDeviceLog ( const char *  serial)

Definition at line 563 of file yapi.c.

YRETCODE yapiPullDeviceLogEx ( int  devydx)

Definition at line 474 of file yapi.c.

YRETCODE yapiRequestOpen ( YIOHDL_internal iohdl,
int  tpchan,
const char *  device,
const char *  request,
int  reqlen,
yapiRequestAsyncCallback  callback,
void *  context,
yapiRequestProgressCallback  progress_cb,
void *  progress_ctx,
char *  errmsg 
)

Definition at line 3189 of file yapi.c.

int YFOPEN ( FILE **  f,
const char *  filename,
const char *  mode 
)

Definition at line 130 of file ystream.c.

void yFunctionTimedUpdate ( YAPI_FUNCTION  fundescr,
double  deviceTime,
const u8 *  report,
u32  len 
)

Definition at line 237 of file yapi.c.

void yFunctionUpdate ( YAPI_FUNCTION  fundescr,
const char *  value 
)

Definition at line 225 of file yapi.c.

int ymemfind ( const u8 *  haystack,
u32  haystack_len,
const u8 *  needle,
u32  needle_len 
)

Definition at line 373 of file ymemory.c.

void yPktQueueFree ( pktQueue q)

Definition at line 928 of file ystream.c.

void yPktQueueInit ( pktQueue q)

Definition at line 919 of file ystream.c.

YRETCODE yPktQueuePeekH2D ( yInterfaceSt iface,
pktItem **  pkt 
)

Definition at line 1160 of file ystream.c.

YRETCODE yPktQueuePopH2D ( yInterfaceSt iface,
pktItem **  pkt 
)

Definition at line 1176 of file ystream.c.

YRETCODE yPktQueuePushD2H ( yInterfaceSt iface,
const USB_Packet pkt,
char *  errmsg 
)

Definition at line 1097 of file ystream.c.

YRETCODE yPktQueuePushH2D ( yInterfaceSt iface,
const USB_Packet pkt,
char *  errmsg 
)

Definition at line 1145 of file ystream.c.

void yPktQueueSetError ( pktQueue q,
YRETCODE  code,
const char *  msg 
)

Definition at line 985 of file ystream.c.

YRETCODE yPktQueueWaitAndPopD2H ( yInterfaceSt iface,
pktItem **  pkt,
int  ms,
char *  errmsg 
)

Definition at line 1128 of file ystream.c.

void ypUpdateHybrid ( const char *  serial,
Notification_funydx  funInfo,
const char *  funcval 
)

Definition at line 300 of file ystream.c.

void ypUpdateUSB ( const char *  serial,
const char *  funcid,
const char *  funcname,
int  funclass,
int  funydx,
const char *  funcval 
)

Definition at line 255 of file ystream.c.

void ypUpdateYdx ( int  devydx,
Notification_funydx  funInfo,
const char *  funcval 
)

Definition at line 286 of file ystream.c.

int ySetErr ( int  code,
char *  outmsg,
const char *  erreur,
const char *  file,
u32  line 
)

Definition at line 72 of file ystream.c.

int ysprintf_s ( char *  dst,
unsigned  dstsize,
const char *  fmt,
  ... 
)

Definition at line 298 of file ymemory.c.

YRETCODE ystrcat_s ( char *  dst,
unsigned  dstsize,
const char *  src 
)

Definition at line 293 of file ymemory.c.

YRETCODE ystrcpy_s ( char *  dst,
unsigned  dstsize,
const char *  src 
)

Definition at line 277 of file ymemory.c.

char* ystrdup_s ( const char *  src)

Definition at line 284 of file ymemory.c.

YRETCODE ystrncat_s ( char *  dst,
unsigned  dstsize,
const char *  src,
unsigned  len 
)

Definition at line 337 of file ymemory.c.

YRETCODE ystrncpy_s ( char *  dst,
unsigned  dstsize,
const char *  src,
unsigned  len 
)

Definition at line 308 of file ymemory.c.

int yUsbClose ( YIOHDL_internal ioghdl,
char *  errmsg 
)

Definition at line 2811 of file ystream.c.

int yUsbEOF ( YIOHDL_internal ioghdl,
char *  errmsg 
)

Definition at line 2771 of file ystream.c.

int yUsbFree ( yContextSt ctx,
char *  errmsg 
)

Definition at line 2410 of file ystream.c.

int yUSBGetBooloader ( const char *  serial,
const char *  name,
yInterfaceSt iface,
char *  errmsg 
)

Definition at line 463 of file yprog.c.

yGenericDeviceSt* yUSBGetGenericInfo ( yStrRef  devdescr)
int yUsbIdle ( void  )

Definition at line 2441 of file ystream.c.

int yUsbInit ( yContextSt ctx,
char *  errmsg 
)

Definition at line 2401 of file ystream.c.

int yUsbOpen ( YIOHDL_internal ioghdl,
const char *  device,
char *  errmsg 
)

Definition at line 2566 of file ystream.c.

int yUsbOpenDevDescr ( YIOHDL_internal ioghdl,
yStrRef  devdescr,
char *  errmsg 
)

Definition at line 2553 of file ystream.c.

int yUsbReadBlock ( YIOHDL_internal ioghdl,
char *  buffer,
int  len,
u64  blockUntil,
char *  errmsg 
)

Definition at line 2728 of file ystream.c.

int yUsbReadNonBlock ( YIOHDL_internal ioghdl,
char *  buffer,
int  len,
char *  errmsg 
)

Definition at line 2684 of file ystream.c.

void yUSBReleaseAllDevices ( void  )

Definition at line 2182 of file ystream.c.

int yUsbSetIOAsync ( YIOHDL_internal ioghdl,
yapiRequestAsyncCallback  callback,
void *  context,
char *  errmsg 
)

Definition at line 2602 of file ystream.c.

int yUsbTrafficPending ( void  )

Definition at line 2535 of file ystream.c.

YRETCODE yUSBUpdateDeviceList ( char *  errmsg)

Definition at line 2191 of file ystream.c.

int yUsbWrite ( YIOHDL_internal ioghdl,
const char *  buffer,
int  writelen,
char *  errmsg 
)

Definition at line 2628 of file ystream.c.

int yvsprintf_s ( char *  dst,
unsigned  dstsize,
const char *  fmt,
va_list  arg 
)

Definition at line 357 of file ymemory.c.

int yyyOShdlCompare ( yPrivDeviceSt dev,
yInterfaceSt newiface 
)
void yyyPacketShutdown ( yInterfaceSt iface)
YRETCODE yyySendPacket ( yInterfaceSt iface,
const USB_Packet pkt,
char *  errmsg 
)

Definition at line 1199 of file ystream.c.

int yyySetup ( yInterfaceSt iface,
char *  errmsg 
)
int yyySignalOutPkt ( yInterfaceSt iface,
char *  errmsg 
)
int yyyUSB_init ( yContextSt ctx,
char *  errmsg 
)
int yyyUSB_stop ( yContextSt ctx,
char *  errmsg 
)
int yyyUSBGetInterfaces ( yInterfaceSt **  ifaces,
int *  nbifaceDetect,
char *  errmsg 
)

Variable Documentation

yContextSt* yContext

Definition at line 59 of file ystream.c.

char ytracefile[]

Definition at line 64 of file ystream.c.



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