Classes | Macros | Typedefs | Enumerations | Functions | Variables
yapi.c File Reference
#include "yapi.h"
#include "yproto.h"
#include "yhash.h"
#include "yjson.h"
#include "yprog.h"
#include <sys/time.h>
Include dependency graph for yapi.c:

Go to the source code of this file.

Classes

struct  _fullAttrInfo
 
struct  ENU_CONTEXT
 
union  test_compile
 

Macros

#define __FILE_ID__   "yapi"
 
#define LOCALURL_LEN   64
 
#define YDLL_CALL_ENTER(funname)
 
#define YDLL_CALL_LEAVE(value)
 
#define YDLL_CALL_LEAVEPTR(value)
 
#define YDLL_CALL_LEAVEVOID()
 

Typedefs

typedef struct _fullAttrInfo fullAttrInfo
 

Enumerations

enum  ENU_PARSE_STATE {
  ENU_HTTP_START, ENU_API, ENU_NETWORK_START, ENU_NETWORK,
  ENU_NET_ADMINPWD, ENU_SERVICE, ENU_WP_START, ENU_WP_ARRAY,
  ENU_WP_ENTRY, ENU_WP_SERIAL, ENU_WP_LOGICALNAME, ENU_WP_PRODUCTNAME,
  ENU_WP_PRODUCTID, ENU_WP_DEVURL, ENU_WP_BEACON, ENU_WP_INDEX,
  ENU_YP_CONTENT, ENU_YP_TYPE, ENU_YP_TYPE_LIST, ENU_YP_ARRAY,
  ENU_YP_ENTRY, ENU_YP_BASETYPE, ENU_YP_HARDWAREID, ENU_YP_LOGICALNAME,
  ENU_YP_PRODUCTNAME, ENU_YP_ADVERTISEDVALUE, ENU_YP_INDEX
}
 

Functions

static void asyncDrop (void *context, const u8 *result, u32 resultlen, int retcode, const char *errmsg)
 
static void deleteAllCS (yContextSt *ctx)
 
void freeDevYdxInfos (int devYdx)
 
int handleNetNotification (HubSt *hub)
 
void initDevYdxInfos (int devYdx, yStrRef serial)
 
static void initializeAllCS (yContextSt *ctx)
 
static void logResult (void *context, const u8 *result, u32 resultlen, int retcode, const char *errmsg)
 
static void parseNetWpEntry (ENU_CONTEXT *enus)
 
static fullAttrInfoparseSettings (const char *settings, int *count)
 
static int pingURLOnhub (HubSt *hubst, const char *request, int mstimeout, char *errmsg)
 
static void skipJsonArray (yJsonStateMachine *j)
 
static void skipJsonStruct (yJsonStateMachine *j)
 
static void ssdpEntryUpdate (const char *serial, const char *urlToRegister, const char *urlToUnregister)
 
static void unregisterNetDevice (yStrRef serialref)
 
static void unregisterNetHub (yUrlRef huburl)
 
static int wpSafeCheckOverwrite (yUrlRef registeredUrl, HubSt *hub, yUrlRef devUrl)
 
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)
 
static void wpUpdateTCP (HubSt *hub, const char *serial, const char *name, u8 beacon)
 
static HubStyapiAllocHub (const char *url, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiCheckFirmware (const char *serial, const char *rev, const char *path, char *buffer, int buffersize, int *fullsize, char *errmsg)
 
int YAPI_FUNCTION_EXPORT yapiCheckLogicalName (const char *name)
 
static int yapiCheckLogicalName_internal (const char *name)
 
void YAPI_FUNCTION_EXPORT yapiFreeAPI (void)
 
static void yapiFreeAPI_internal (void)
 
static void yapiFreeHub (HubSt *hub)
 
YAPI_FUNCTION_EXPORT void yapiFreeMem (void *ptr)
 
int YAPI_FUNCTION_EXPORT yapiGetAllDevices (YAPI_DEVICE *buffer, int maxsize, int *neededsize, char *errmsg)
 
static int yapiGetAllDevices_internal (YAPI_DEVICE *buffer, int maxsize, int *neededsize, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiGetAllJsonKeys (const char *json_buffer, char *buffer, int buffersize, int *fullsize, char *errmsg)
 
static YRETCODE yapiGetAllJsonKeys_internal (const char *json_buffer, char *buffer, int buffersize, int *fullsize, char *errmsg)
 
u16 YAPI_FUNCTION_EXPORT yapiGetAPIVersion (const char **version, const char **apidate)
 
static u16 yapiGetAPIVersion_internal (const char **version, const char **apidate)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiGetBootloaders (char *buffer, int buffersize, int *fullsize, char *errmsg)
 
static YRETCODE yapiGetBootloaders_internal (char *buffer, int buffersize, int *fullsize, char *errmsg)
 
YRETCODE yapiGetBootloadersDevs (char *serials, unsigned int maxNbSerial, unsigned int *totalBootladers, char *errmsg)
 
u32 yapiGetCNonce (u32 nc)
 
YAPI_DEVICE YAPI_FUNCTION_EXPORT yapiGetDevice (const char *device_str, char *errmsg)
 
static YAPI_DEVICE yapiGetDevice_internal (const char *device_str, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiGetDeviceInfo (YAPI_DEVICE devdesc, yDeviceSt *infos, char *errmsg)
 
static YRETCODE yapiGetDeviceInfo_internal (YAPI_DEVICE devdesc, yDeviceSt *infos, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiGetDevicePath (YAPI_DEVICE devdesc, char *rootdevice, char *request, int requestsize, int *neededsize, char *errmsg)
 
static YRETCODE yapiGetDevicePath_internal (YAPI_DEVICE devdesc, char *rootdevice, char *request, int requestsize, int *neededsize, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiGetDevicePathEx (const char *serial, char *rootdevice, char *request, int requestsize, int *neededsize, char *errmsg)
 
static YRETCODE yapiGetDevicePathEx_internal (const char *serial, char *rootdevice, char *request, int requestsize, int *neededsize, char *errmsg)
 
YAPI_FUNCTION YAPI_FUNCTION_EXPORT yapiGetFunction (const char *class_str, const char *function_str, char *errmsg)
 
static YAPI_FUNCTION yapiGetFunction_internal (const char *class_str, const char *function_str, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiGetFunctionInfo (YAPI_FUNCTION fundesc, YAPI_DEVICE *devdesc, char *serial, char *funcId, char *funcName, char *funcVal, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiGetFunctionInfoEx (YAPI_FUNCTION fundesc, YAPI_DEVICE *devdesc, char *serial, char *funcId, char *baseType, char *funcName, char *funcVal, char *errmsg)
 
static YRETCODE yapiGetFunctionInfoEx_internal (YAPI_FUNCTION fundesc, YAPI_DEVICE *devdesc, char *serial, char *funcId, char *baseType, char *funcName, char *funcVal, char *errmsg)
 
int YAPI_FUNCTION_EXPORT yapiGetFunctionsByClass (const char *class_str, YAPI_FUNCTION prevfundesc, YAPI_FUNCTION *buffer, int maxsize, int *neededsize, char *errmsg)
 
static int yapiGetFunctionsByClass_internal (const char *class_str, YAPI_FUNCTION prevfundesc, YAPI_FUNCTION *buffer, int maxsize, int *neededsize, char *errmsg)
 
int YAPI_FUNCTION_EXPORT yapiGetFunctionsByDevice (YAPI_DEVICE devdesc, YAPI_FUNCTION prevfundesc, YAPI_FUNCTION *buffer, int maxsize, int *neededsize, char *errmsg)
 
static int yapiGetFunctionsByDevice_internal (YAPI_DEVICE devdesc, YAPI_FUNCTION prevfundesc, YAPI_FUNCTION *buffer, int maxsize, int *neededsize, char *errmsg)
 
YAPI_FUNCTION_EXPORT void * yapiGetMem (int size)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiGetSubdevices (const char *serial, char *buffer, int buffersize, int *fullsize, char *errmsg)
 
static int yapiGetSubdevices_internal (const char *serial, char *buffer, int buffersize, int *fullsize, char *errmsg)
 
u64 YAPI_FUNCTION_EXPORT yapiGetTickCount (void)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiHandleEvents (char *errmsg)
 
static YRETCODE yapiHandleEvents_internal (char *errmsg)
 
int YAPI_FUNCTION_EXPORT yapiHTTPRequest (const char *device, const char *request, char *buffer, int buffsize, int *fullsize, char *errmsg)
 
static int yapiHTTPRequest_internal (const char *device, const char *request, char *buffer, int buffsize, int *fullsize, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestAsync (const char *device, const char *request, yapiRequestAsyncCallback callback, void *context, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestAsyncEx (const char *device, const char *request, int len, yapiRequestAsyncCallback callback, void *context, char *errmsg)
 
static YRETCODE yapiHTTPRequestAsyncEx_internal (int tcpchan, const char *device, const char *request, int len, yapiRequestAsyncCallback callback, void *context, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestAsyncOutOfBand (int channel, const char *device, const char *request, int requestsize, yapiRequestAsyncCallback callback, void *context, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestSyncDone (YIOHDL *iohdl, char *errmsg)
 
YRETCODE yapiHTTPRequestSyncDone_internal (YIOHDL *iohdl, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestSyncStart (YIOHDL *iohdl, const char *device, const char *request, char **reply, int *replysize, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestSyncStartEx (YIOHDL *iohdl, const char *device, const char *request, int requestsize, char **reply, int *replysize, 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)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestSyncStartOutOfBand (YIOHDL *iohdl, int channel, const char *device, const char *request, int requestsize, char **reply, int *replysize, yapiRequestProgressCallback progress_cb, void *progress_ctx, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiInitAPI (int detect_type, char *errmsg)
 
static YRETCODE yapiInitAPI_internal (int detect_type, char *errmsg)
 
int YAPI_FUNCTION_EXPORT yapiJsonDecodeString (const char *json_string, char *output)
 
static int yapiJsonDecodeString_internal (const char *json_string, char *output)
 
int YAPI_FUNCTION_EXPORT yapiJsonGetPath (const char *path, const char *json_data, int json_size, const char **result, char *errmsg)
 
int yapiJsonGetPath_internal (const char *path, const char *json_data, int json_size, int withHTTPheader, const char **output, char *errmsg)
 
static const char * yapiJsonValueParseArray (yJsonStateMachine *j, const char *path, int *result, char *errmsg)
 
static const char * yapiJsonValueParseStruct (yJsonStateMachine *j, const char *path, int *result, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiLockDeviceCallBack (char *errmsg)
 
static YRETCODE yapiLockDeviceCallBack_internal (char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiLockFunctionCallBack (char *errmsg)
 
static YRETCODE yapiLockFunctionCallBack_internal (char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiPreregisterHub (const char *url, char *errmsg)
 
static YRETCODE yapiPreregisterHub_internal (const char *url, char *errmsg)
 
YRETCODE yapiPullDeviceLog (const char *serial)
 
YRETCODE yapiPullDeviceLogEx (int devydx)
 
void YAPI_FUNCTION_EXPORT yapiRegisterDeviceArrivalCallback (yapiDeviceUpdateCallback arrivalCallback)
 
static void yapiRegisterDeviceArrivalCallback_internal (yapiDeviceUpdateCallback arrivalCallback)
 
void YAPI_FUNCTION_EXPORT yapiRegisterDeviceChangeCallback (yapiDeviceUpdateCallback changeCallback)
 
static void yapiRegisterDeviceChangeCallback_internal (yapiDeviceUpdateCallback changeCallback)
 
void YAPI_FUNCTION_EXPORT yapiRegisterDeviceLogCallback (yapiDeviceLogCallback logCallback)
 
static void yapiRegisterDeviceLogCallback_internal (yapiDeviceLogCallback logCallback)
 
void YAPI_FUNCTION_EXPORT yapiRegisterDeviceRemovalCallback (yapiDeviceUpdateCallback removalCallback)
 
static void yapiRegisterDeviceRemovalCallback_internal (yapiDeviceUpdateCallback removalCallback)
 
void YAPI_FUNCTION_EXPORT yapiRegisterFunctionUpdateCallback (yapiFunctionUpdateCallback updateCallback)
 
static void yapiRegisterFunctionUpdateCallback_internal (yapiFunctionUpdateCallback updateCallback)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiRegisterHub (const char *url, char *errmsg)
 
static YRETCODE yapiRegisterHub_internal (const char *url, char *errmsg)
 
void YAPI_FUNCTION_EXPORT yapiRegisterHubDiscoveryCallback (yapiHubDiscoveryCallback hubDiscoveryCallback)
 
static void yapiRegisterHubDiscoveryCallback_internal (yapiHubDiscoveryCallback hubDiscoveryCallback)
 
static YRETCODE yapiRegisterHubEx (const char *url, int checkacces, char *errmsg)
 
void YAPI_FUNCTION_EXPORT yapiRegisterLogFunction (yapiLogFunction logfun)
 
static void yapiRegisterLogFunction_internal (yapiLogFunction logfun)
 
void yapiRegisterRawNotificationCb (yRawNotificationCb callback)
 
void yapiRegisterRawReportCb (yRawReportCb callback)
 
void yapiRegisterRawReportV2Cb (yRawReportV2Cb callback)
 
void YAPI_FUNCTION_EXPORT yapiRegisterTimedReportCallback (yapiTimedReportCallback timedReportCallback)
 
static void yapiRegisterTimedReportCallback_internal (yapiTimedReportCallback timedReportCallback)
 
YRETCODE yapiRequestOpen (YIOHDL_internal *iohdl, int tcpchan, const char *device, const char *request, int reqlen, yapiRequestAsyncCallback callback, void *context, yapiRequestProgressCallback progress_cb, void *progress_ctx, char *errmsg)
 
static int yapiRequestOpenHTTP (YIOHDL_internal *iohdl, HubSt *hub, YAPI_DEVICE dev, const char *request, int reqlen, int wait_for_start, u64 mstimeout, yapiRequestAsyncCallback callback, void *context, char *errmsg)
 
static int yapiRequestOpenUSB (YIOHDL_internal *iohdl, HubSt *hub, YAPI_DEVICE dev, const char *request, int reqlen, u64 unused_timeout, yapiRequestAsyncCallback callback, void *context, char *errmsg)
 
static int yapiRequestOpenWS (YIOHDL_internal *iohdl, HubSt *hub, YAPI_DEVICE dev, int tcpchan, const char *request, int reqlen, u64 mstimeout, yapiRequestAsyncCallback callback, void *context, RequestProgress progress_cb, void *progress_ctx, char *errmsg)
 
static int yapiRequestWaitEndHTTP (YIOHDL_internal *iohdl, char **reply, int *replysize, char *errmsg)
 
static int yapiRequestWaitEndUSB (YIOHDL_internal *iohdl, char **reply, int *replysize, char *errmsg)
 
static int yapiRequestWaitEndWS (YIOHDL_internal *iohdl, char **reply, int *replysize, char *errmsg)
 
void YAPI_FUNCTION_EXPORT yapiSetTraceFile (const char *file)
 
static void yapiSetTraceFile_internal (const char *file)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiSleep (int ms_duration, char *errmsg)
 
static YRETCODE yapiSleep_internal (int ms_duration, char *errmsg)
 
void YAPI_FUNCTION_EXPORT yapiStartStopDeviceLogCallback (const char *serial, int start)
 
static void yapiStartStopDeviceLogCallback_internal (const char *serial, int start)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiTestHub (const char *url, int mstimeout, char *errmsg)
 
static YRETCODE yapiTestHub_internal (const char *url, int mstimeout, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiTriggerHubDiscovery (char *errmsg)
 
static YRETCODE yapiTriggerHubDiscovery_internal (char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiUnlockDeviceCallBack (char *errmsg)
 
static YRETCODE yapiUnlockDeviceCallBack_internal (char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiUnlockFunctionCallBack (char *errmsg)
 
static YRETCODE yapiUnlockFunctionCallBack_internal (char *errmsg)
 
void YAPI_FUNCTION_EXPORT yapiUnregisterHub (const char *url)
 
static void yapiUnregisterHub_internal (const char *url)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiUpdateDeviceList (u32 forceupdate, char *errmsg)
 
static YRETCODE yapiUpdateDeviceList_internal (u32 forceupdate, char *errmsg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiUpdateFirmware (const char *serial, const char *firmwarePath, const char *settings, int startUpdate, char *msg)
 
YRETCODE YAPI_FUNCTION_EXPORT yapiUpdateFirmwareEx (const char *serial, const char *firmwarePath, const char *settings, int force, int startUpdate, char *msg)
 
static int yEnuJson (ENU_CONTEXT *enus, yJsonStateMachine *j)
 
void yFunctionTimedUpdate (YAPI_FUNCTION fundescr, double deviceTime, const u8 *report, u32 len)
 
void yFunctionUpdate (YAPI_FUNCTION fundescr, const char *value)
 
static void * yhelper_thread (void *ctx)
 
static int yNetHubEnum (HubSt *hub, int forceupdate, char *errmsg)
 
static int yNetHubEnumEx (HubSt *hub, ENU_CONTEXT *enus, char *errmsg)
 
static void ypUpdateNet (ENU_CONTEXT *enus)
 
static int yTcpTrafficPending (void)
 

Variables

u64 test_pkt =0
 
u64 test_tout =0
 

Macro Definition Documentation

#define __FILE_ID__   "yapi"

Definition at line 39 of file yapi.c.

#define LOCALURL_LEN   64
#define YDLL_CALL_ENTER (   funname)

Definition at line 4288 of file yapi.c.

#define YDLL_CALL_LEAVE (   value)

Definition at line 4290 of file yapi.c.

#define YDLL_CALL_LEAVEPTR (   value)

Definition at line 4291 of file yapi.c.

#define YDLL_CALL_LEAVEVOID ( )

Definition at line 4289 of file yapi.c.

Typedef Documentation

typedef struct _fullAttrInfo fullAttrInfo

Enumeration Type Documentation

Enumerator
ENU_HTTP_START 
ENU_API 
ENU_NETWORK_START 
ENU_NETWORK 
ENU_NET_ADMINPWD 
ENU_SERVICE 
ENU_WP_START 
ENU_WP_ARRAY 
ENU_WP_ENTRY 
ENU_WP_SERIAL 
ENU_WP_LOGICALNAME 
ENU_WP_PRODUCTNAME 
ENU_WP_PRODUCTID 
ENU_WP_DEVURL 
ENU_WP_BEACON 
ENU_WP_INDEX 
ENU_YP_CONTENT 
ENU_YP_TYPE 
ENU_YP_TYPE_LIST 
ENU_YP_ARRAY 
ENU_YP_ENTRY 
ENU_YP_BASETYPE 
ENU_YP_HARDWAREID 
ENU_YP_LOGICALNAME 
ENU_YP_PRODUCTNAME 
ENU_YP_ADVERTISEDVALUE 
ENU_YP_INDEX 

Definition at line 254 of file yapi.c.

Function Documentation

static void asyncDrop ( void *  context,
const u8 *  result,
u32  resultlen,
int  retcode,
const char *  errmsg 
)
static

Definition at line 3446 of file yapi.c.

static void deleteAllCS ( yContextSt ctx)
static

Definition at line 1302 of file yapi.c.

void freeDevYdxInfos ( int  devYdx)

Definition at line 388 of file yapi.c.

int handleNetNotification ( HubSt hub)

Definition at line 1677 of file yapi.c.

void initDevYdxInfos ( int  devYdx,
yStrRef  serial 
)

Definition at line 379 of file yapi.c.

static void initializeAllCS ( yContextSt ctx)
static

Definition at line 1290 of file yapi.c.

static void logResult ( void *  context,
const u8 *  result,
u32  resultlen,
int  retcode,
const char *  errmsg 
)
static

Definition at line 396 of file yapi.c.

static void parseNetWpEntry ( ENU_CONTEXT enus)
static

Definition at line 717 of file yapi.c.

static fullAttrInfo* parseSettings ( const char *  settings,
int *  count 
)
static

Definition at line 3951 of file yapi.c.

static int pingURLOnhub ( HubSt hubst,
const char *  request,
int  mstimeout,
char *  errmsg 
)
static

Definition at line 2439 of file yapi.c.

static void skipJsonArray ( yJsonStateMachine j)
static

Definition at line 3747 of file yapi.c.

static void skipJsonStruct ( yJsonStateMachine j)
static

Definition at line 3732 of file yapi.c.

static void ssdpEntryUpdate ( const char *  serial,
const char *  urlToRegister,
const char *  urlToUnregister 
)
static

Definition at line 1265 of file yapi.c.

static void unregisterNetDevice ( yStrRef  serialref)
static

Definition at line 740 of file yapi.c.

static void unregisterNetHub ( yUrlRef  huburl)
static

Definition at line 1224 of file yapi.c.

static int wpSafeCheckOverwrite ( yUrlRef  registeredUrl,
HubSt hub,
yUrlRef  devUrl 
)
static

Definition at line 341 of file yapi.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.

static void wpUpdateTCP ( HubSt hub,
const char *  serial,
const char *  name,
u8  beacon 
)
static

Definition at line 1635 of file yapi.c.

static HubSt* yapiAllocHub ( const char *  url,
char *  errmsg 
)
static

Definition at line 1153 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiCheckFirmware ( const char *  serial,
const char *  rev,
const char *  path,
char *  buffer,
int  buffersize,
int *  fullsize,
char *  errmsg 
)

Definition at line 4730 of file yapi.c.

int YAPI_FUNCTION_EXPORT yapiCheckLogicalName ( const char *  name)

Definition at line 4464 of file yapi.c.

static int yapiCheckLogicalName_internal ( const char *  name)
static

Definition at line 2779 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiFreeAPI ( void  )

Definition at line 4304 of file yapi.c.

static void yapiFreeAPI_internal ( void  )
static

Definition at line 1440 of file yapi.c.

static void yapiFreeHub ( HubSt hub)
static

Definition at line 1198 of file yapi.c.

YAPI_FUNCTION_EXPORT void yapiFreeMem ( void *  ptr)

Definition at line 4724 of file yapi.c.

int YAPI_FUNCTION_EXPORT yapiGetAllDevices ( YAPI_DEVICE buffer,
int  maxsize,
int *  neededsize,
char *  errmsg 
)

Definition at line 4497 of file yapi.c.

static int yapiGetAllDevices_internal ( YAPI_DEVICE buffer,
int  maxsize,
int *  neededsize,
char *  errmsg 
)
static

Definition at line 2846 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiGetAllJsonKeys ( const char *  json_buffer,
char *  buffer,
int  buffersize,
int *  fullsize,
char *  errmsg 
)

Definition at line 4706 of file yapi.c.

static YRETCODE yapiGetAllJsonKeys_internal ( const char *  json_buffer,
char *  buffer,
int  buffersize,
int *  fullsize,
char *  errmsg 
)
static

Definition at line 4032 of file yapi.c.

u16 YAPI_FUNCTION_EXPORT yapiGetAPIVersion ( const char **  version,
const char **  apidate 
)

Definition at line 4472 of file yapi.c.

static u16 yapiGetAPIVersion_internal ( const char **  version,
const char **  apidate 
)
static

Definition at line 2798 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiGetBootloaders ( char *  buffer,
int  buffersize,
int *  fullsize,
char *  errmsg 
)

Definition at line 4673 of file yapi.c.

static YRETCODE yapiGetBootloaders_internal ( char *  buffer,
int  buffersize,
int *  fullsize,
char *  errmsg 
)
static

Definition at line 3586 of file yapi.c.

YRETCODE yapiGetBootloadersDevs ( char *  serials,
unsigned int  maxNbSerial,
unsigned int *  totalBootladers,
char *  errmsg 
)

Definition at line 3541 of file yapi.c.

u32 yapiGetCNonce ( u32  nc)

Definition at line 2750 of file yapi.c.

YAPI_DEVICE YAPI_FUNCTION_EXPORT yapiGetDevice ( const char *  device_str,
char *  errmsg 
)

Definition at line 4488 of file yapi.c.

static YAPI_DEVICE yapiGetDevice_internal ( const char *  device_str,
char *  errmsg 
)
static

Definition at line 2819 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiGetDeviceInfo ( YAPI_DEVICE  devdesc,
yDeviceSt infos,
char *  errmsg 
)

Definition at line 4506 of file yapi.c.

static YRETCODE yapiGetDeviceInfo_internal ( YAPI_DEVICE  devdesc,
yDeviceSt infos,
char *  errmsg 
)
static

Definition at line 2884 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiGetDevicePath ( YAPI_DEVICE  devdesc,
char *  rootdevice,
char *  request,
int  requestsize,
int *  neededsize,
char *  errmsg 
)

Definition at line 4515 of file yapi.c.

static YRETCODE yapiGetDevicePath_internal ( YAPI_DEVICE  devdesc,
char *  rootdevice,
char *  request,
int  requestsize,
int *  neededsize,
char *  errmsg 
)
static

Definition at line 2915 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiGetDevicePathEx ( const char *  serial,
char *  rootdevice,
char *  request,
int  requestsize,
int *  neededsize,
char *  errmsg 
)

Definition at line 4524 of file yapi.c.

static YRETCODE yapiGetDevicePathEx_internal ( const char *  serial,
char *  rootdevice,
char *  request,
int  requestsize,
int *  neededsize,
char *  errmsg 
)
static

Definition at line 2933 of file yapi.c.

YAPI_FUNCTION YAPI_FUNCTION_EXPORT yapiGetFunction ( const char *  class_str,
const char *  function_str,
char *  errmsg 
)

Definition at line 4533 of file yapi.c.

static YAPI_FUNCTION yapiGetFunction_internal ( const char *  class_str,
const char *  function_str,
char *  errmsg 
)
static

Definition at line 2979 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiGetFunctionInfo ( YAPI_FUNCTION  fundesc,
YAPI_DEVICE devdesc,
char *  serial,
char *  funcId,
char *  funcName,
char *  funcVal,
char *  errmsg 
)

Definition at line 4562 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiGetFunctionInfoEx ( YAPI_FUNCTION  fundesc,
YAPI_DEVICE devdesc,
char *  serial,
char *  funcId,
char *  baseType,
char *  funcName,
char *  funcVal,
char *  errmsg 
)

Definition at line 4572 of file yapi.c.

static YRETCODE yapiGetFunctionInfoEx_internal ( YAPI_FUNCTION  fundesc,
YAPI_DEVICE devdesc,
char *  serial,
char *  funcId,
char *  baseType,
char *  funcName,
char *  funcVal,
char *  errmsg 
)
static

Definition at line 3031 of file yapi.c.

int YAPI_FUNCTION_EXPORT yapiGetFunctionsByClass ( const char *  class_str,
YAPI_FUNCTION  prevfundesc,
YAPI_FUNCTION buffer,
int  maxsize,
int *  neededsize,
char *  errmsg 
)

Definition at line 4542 of file yapi.c.

static int yapiGetFunctionsByClass_internal ( const char *  class_str,
YAPI_FUNCTION  prevfundesc,
YAPI_FUNCTION buffer,
int  maxsize,
int *  neededsize,
char *  errmsg 
)
static

Definition at line 2996 of file yapi.c.

int YAPI_FUNCTION_EXPORT yapiGetFunctionsByDevice ( YAPI_DEVICE  devdesc,
YAPI_FUNCTION  prevfundesc,
YAPI_FUNCTION buffer,
int  maxsize,
int *  neededsize,
char *  errmsg 
)

Definition at line 4552 of file yapi.c.

static int yapiGetFunctionsByDevice_internal ( YAPI_DEVICE  devdesc,
YAPI_FUNCTION  prevfundesc,
YAPI_FUNCTION buffer,
int  maxsize,
int *  neededsize,
char *  errmsg 
)
static

Definition at line 3014 of file yapi.c.

YAPI_FUNCTION_EXPORT void* yapiGetMem ( int  size)

Definition at line 4715 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiGetSubdevices ( const char *  serial,
char *  buffer,
int  buffersize,
int *  fullsize,
char *  errmsg 
)

Definition at line 4758 of file yapi.c.

static int yapiGetSubdevices_internal ( const char *  serial,
char *  buffer,
int  buffersize,
int *  fullsize,
char *  errmsg 
)
static

Definition at line 3676 of file yapi.c.

u64 YAPI_FUNCTION_EXPORT yapiGetTickCount ( void  )

Definition at line 2713 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiHandleEvents ( char *  errmsg)

Definition at line 4446 of file yapi.c.

static YRETCODE yapiHandleEvents_internal ( char *  errmsg)
static

Definition at line 2664 of file yapi.c.

int YAPI_FUNCTION_EXPORT yapiHTTPRequest ( const char *  device,
const char *  request,
char *  buffer,
int  buffsize,
int *  fullsize,
char *  errmsg 
)

Definition at line 4648 of file yapi.c.

static int yapiHTTPRequest_internal ( const char *  device,
const char *  request,
char *  buffer,
int  buffsize,
int *  fullsize,
char *  errmsg 
)
static

Definition at line 3496 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestAsync ( const char *  device,
const char *  request,
yapiRequestAsyncCallback  callback,
void *  context,
char *  errmsg 
)

Definition at line 4629 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestAsyncEx ( const char *  device,
const char *  request,
int  len,
yapiRequestAsyncCallback  callback,
void *  context,
char *  errmsg 
)

Definition at line 4620 of file yapi.c.

static YRETCODE yapiHTTPRequestAsyncEx_internal ( int  tcpchan,
const char *  device,
const char *  request,
int  len,
yapiRequestAsyncCallback  callback,
void *  context,
char *  errmsg 
)
static

Definition at line 3455 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestAsyncOutOfBand ( int  channel,
const char *  device,
const char *  request,
int  requestsize,
yapiRequestAsyncCallback  callback,
void *  context,
char *  errmsg 
)

Definition at line 4638 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestSyncDone ( YIOHDL iohdl,
char *  errmsg 
)

Definition at line 4611 of file yapi.c.

YRETCODE yapiHTTPRequestSyncDone_internal ( YIOHDL iohdl,
char *  errmsg 
)

Definition at line 3398 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestSyncStart ( YIOHDL iohdl,
const char *  device,
const char *  request,
char **  reply,
int *  replysize,
char *  errmsg 
)

Definition at line 4591 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiHTTPRequestSyncStartEx ( YIOHDL iohdl,
const char *  device,
const char *  request,
int  requestsize,
char **  reply,
int *  replysize,
char *  errmsg 
)

Definition at line 4582 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.

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

Definition at line 4601 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiInitAPI ( int  detect_type,
char *  errmsg 
)

Definition at line 4295 of file yapi.c.

static YRETCODE yapiInitAPI_internal ( int  detect_type,
char *  errmsg 
)
static

Definition at line 1331 of file yapi.c.

int YAPI_FUNCTION_EXPORT yapiJsonDecodeString ( const char *  json_string,
char *  output 
)

Definition at line 4683 of file yapi.c.

static int yapiJsonDecodeString_internal ( const char *  json_string,
char *  output 
)
static

Definition at line 3889 of file yapi.c.

int YAPI_FUNCTION_EXPORT yapiJsonGetPath ( const char *  path,
const char *  json_data,
int  json_size,
const char **  result,
char *  errmsg 
)

Definition at line 4691 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.

static const char * yapiJsonValueParseArray ( yJsonStateMachine j,
const char *  path,
int *  result,
char *  errmsg 
)
static

Definition at line 3835 of file yapi.c.

static const char* yapiJsonValueParseStruct ( yJsonStateMachine j,
const char *  path,
int *  result,
char *  errmsg 
)
static

Definition at line 3762 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiLockDeviceCallBack ( char *  errmsg)

Definition at line 4385 of file yapi.c.

static YRETCODE yapiLockDeviceCallBack_internal ( char *  errmsg)
static

Definition at line 2284 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiLockFunctionCallBack ( char *  errmsg)

Definition at line 4367 of file yapi.c.

static YRETCODE yapiLockFunctionCallBack_internal ( char *  errmsg)
static

Definition at line 2266 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiPreregisterHub ( const char *  url,
char *  errmsg 
)

Definition at line 4421 of file yapi.c.

static YRETCODE yapiPreregisterHub_internal ( const char *  url,
char *  errmsg 
)
static

Definition at line 2584 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.

void YAPI_FUNCTION_EXPORT yapiRegisterDeviceArrivalCallback ( yapiDeviceUpdateCallback  arrivalCallback)

Definition at line 4332 of file yapi.c.

static void yapiRegisterDeviceArrivalCallback_internal ( yapiDeviceUpdateCallback  arrivalCallback)
static

Definition at line 1543 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiRegisterDeviceChangeCallback ( yapiDeviceUpdateCallback  changeCallback)

Definition at line 4346 of file yapi.c.

static void yapiRegisterDeviceChangeCallback_internal ( yapiDeviceUpdateCallback  changeCallback)
static

Definition at line 1587 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiRegisterDeviceLogCallback ( yapiDeviceLogCallback  logCallback)

Definition at line 4318 of file yapi.c.

static void yapiRegisterDeviceLogCallback_internal ( yapiDeviceLogCallback  logCallback)
static

Definition at line 1511 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiRegisterDeviceRemovalCallback ( yapiDeviceUpdateCallback  removalCallback)

Definition at line 4339 of file yapi.c.

static void yapiRegisterDeviceRemovalCallback_internal ( yapiDeviceUpdateCallback  removalCallback)
static

Definition at line 1573 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiRegisterFunctionUpdateCallback ( yapiFunctionUpdateCallback  updateCallback)

Definition at line 4353 of file yapi.c.

static void yapiRegisterFunctionUpdateCallback_internal ( yapiFunctionUpdateCallback  updateCallback)
static

Definition at line 1599 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiRegisterHub ( const char *  url,
char *  errmsg 
)

Definition at line 4412 of file yapi.c.

static YRETCODE yapiRegisterHub_internal ( const char *  url,
char *  errmsg 
)
static

Definition at line 2577 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiRegisterHubDiscoveryCallback ( yapiHubDiscoveryCallback  hubDiscoveryCallback)

Definition at line 4657 of file yapi.c.

static void yapiRegisterHubDiscoveryCallback_internal ( yapiHubDiscoveryCallback  hubDiscoveryCallback)
static

Definition at line 3519 of file yapi.c.

static YRETCODE yapiRegisterHubEx ( const char *  url,
int  checkacces,
char *  errmsg 
)
static

Definition at line 2303 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiRegisterLogFunction ( yapiLogFunction  logfun)

Definition at line 4311 of file yapi.c.

static void yapiRegisterLogFunction_internal ( yapiLogFunction  logfun)
static

Definition at line 1497 of file yapi.c.

void yapiRegisterRawNotificationCb ( yRawNotificationCb  callback)

Definition at line 4093 of file yapi.c.

void yapiRegisterRawReportCb ( yRawReportCb  callback)

Definition at line 4103 of file yapi.c.

void yapiRegisterRawReportV2Cb ( yRawReportV2Cb  callback)

Definition at line 4113 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiRegisterTimedReportCallback ( yapiTimedReportCallback  timedReportCallback)

Definition at line 4360 of file yapi.c.

static void yapiRegisterTimedReportCallback_internal ( yapiTimedReportCallback  timedReportCallback)
static

Definition at line 1610 of file yapi.c.

YRETCODE yapiRequestOpen ( YIOHDL_internal iohdl,
int  tcpchan,
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.

static int yapiRequestOpenHTTP ( YIOHDL_internal iohdl,
HubSt hub,
YAPI_DEVICE  dev,
const char *  request,
int  reqlen,
int  wait_for_start,
u64  mstimeout,
yapiRequestAsyncCallback  callback,
void *  context,
char *  errmsg 
)
static

Definition at line 3092 of file yapi.c.

static int yapiRequestOpenUSB ( YIOHDL_internal iohdl,
HubSt hub,
YAPI_DEVICE  dev,
const char *  request,
int  reqlen,
u64  unused_timeout,
yapiRequestAsyncCallback  callback,
void *  context,
char *  errmsg 
)
static

Definition at line 3046 of file yapi.c.

static int yapiRequestOpenWS ( YIOHDL_internal iohdl,
HubSt hub,
YAPI_DEVICE  dev,
int  tcpchan,
const char *  request,
int  reqlen,
u64  mstimeout,
yapiRequestAsyncCallback  callback,
void *  context,
RequestProgress  progress_cb,
void *  progress_ctx,
char *  errmsg 
)
static

Definition at line 3140 of file yapi.c.

static int yapiRequestWaitEndHTTP ( YIOHDL_internal iohdl,
char **  reply,
int *  replysize,
char *  errmsg 
)
static

Definition at line 3297 of file yapi.c.

static int yapiRequestWaitEndUSB ( YIOHDL_internal iohdl,
char **  reply,
int *  replysize,
char *  errmsg 
)
static

Definition at line 3252 of file yapi.c.

static int yapiRequestWaitEndWS ( YIOHDL_internal iohdl,
char **  reply,
int *  replysize,
char *  errmsg 
)
static

Definition at line 3322 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiSetTraceFile ( const char *  file)

Definition at line 4481 of file yapi.c.

static void yapiSetTraceFile_internal ( const char *  file)
static

Definition at line 2808 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiSleep ( int  ms_duration,
char *  errmsg 
)

Definition at line 4455 of file yapi.c.

static YRETCODE yapiSleep_internal ( int  ms_duration,
char *  errmsg 
)
static

Definition at line 2680 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiStartStopDeviceLogCallback ( const char *  serial,
int  start 
)

Definition at line 4325 of file yapi.c.

static void yapiStartStopDeviceLogCallback_internal ( const char *  serial,
int  start 
)
static

Definition at line 1524 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiTestHub ( const char *  url,
int  mstimeout,
char *  errmsg 
)

Definition at line 4403 of file yapi.c.

static YRETCODE yapiTestHub_internal ( const char *  url,
int  mstimeout,
char *  errmsg 
)
static

Definition at line 2508 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiTriggerHubDiscovery ( char *  errmsg)

Definition at line 4664 of file yapi.c.

static YRETCODE yapiTriggerHubDiscovery_internal ( char *  errmsg)
static

Definition at line 3530 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiUnlockDeviceCallBack ( char *  errmsg)

Definition at line 4394 of file yapi.c.

static YRETCODE yapiUnlockDeviceCallBack_internal ( char *  errmsg)
static

Definition at line 2294 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiUnlockFunctionCallBack ( char *  errmsg)

Definition at line 4376 of file yapi.c.

static YRETCODE yapiUnlockFunctionCallBack_internal ( char *  errmsg)
static

Definition at line 2275 of file yapi.c.

void YAPI_FUNCTION_EXPORT yapiUnregisterHub ( const char *  url)

Definition at line 4430 of file yapi.c.

static void yapiUnregisterHub_internal ( const char *  url)
static

Definition at line 2591 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiUpdateDeviceList ( u32  forceupdate,
char *  errmsg 
)

Definition at line 4437 of file yapi.c.

static YRETCODE yapiUpdateDeviceList_internal ( u32  forceupdate,
char *  errmsg 
)
static

Definition at line 2622 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiUpdateFirmware ( const char *  serial,
const char *  firmwarePath,
const char *  settings,
int  startUpdate,
char *  msg 
)

Definition at line 4739 of file yapi.c.

YRETCODE YAPI_FUNCTION_EXPORT yapiUpdateFirmwareEx ( const char *  serial,
const char *  firmwarePath,
const char *  settings,
int  force,
int  startUpdate,
char *  msg 
)

Definition at line 4748 of file yapi.c.

static int yEnuJson ( ENU_CONTEXT enus,
yJsonStateMachine j 
)
static

Definition at line 763 of file yapi.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.

static void* yhelper_thread ( void *  ctx)
static

Definition at line 2069 of file yapi.c.

static int yNetHubEnum ( HubSt hub,
int  forceupdate,
char *  errmsg 
)
static

Definition at line 1088 of file yapi.c.

static int yNetHubEnumEx ( HubSt hub,
ENU_CONTEXT enus,
char *  errmsg 
)
static

Definition at line 1004 of file yapi.c.

static void ypUpdateNet ( ENU_CONTEXT enus)
static

Definition at line 754 of file yapi.c.

static int yTcpTrafficPending ( void  )
static

Definition at line 2053 of file yapi.c.

Variable Documentation

u64 test_pkt =0

Definition at line 2677 of file yapi.c.

u64 test_tout =0

Definition at line 2678 of file yapi.c.



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