Classes | Macros | Enumerations | Functions | Variables
yhash.h File Reference
#include "ydef.h"
Include dependency graph for yhash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  yAbsUrl
 
union  YHashSlot
 
struct  yWhitePageEntry
 
struct  yYellowPageArray
 
struct  yYellowPageCateg
 
struct  yYellowPageEntry
 

Macros

#define HASH_BUF_POW   5 /* HASH_BUF_POW = log_2(HASH_BUF_SIZE+2+2) */
 
#define HASH_BUF_SIZE   28
 
#define NB_MAX_DEVICES   256
 
#define NB_MAX_HASH_ENTRIES   8192
 
#define WORD_TEXT_OG   0x474f
 
#define WORD_TEXT_PR   0x5250
 
#define wpAllowUnregister()   wpAllowUnregisterEx()
 
#define wpPreventUnregister()   wpPreventUnregisterEx()
 
#define YBLKID_WPENTRY   0xf0
 
#define YBLKID_YPARRAY   0xf2
 
#define YBLKID_YPCATEG   0xf1
 
#define YBLKID_YPENTRY   0xf3
 
#define YBLKID_YPENTRYEND   (YBLKID_YPENTRY+YOCTO_N_BASECLASSES-1)
 
#define YMAX_HUB_URL_DEEP   8
 
#define YOCTO_HOSTNAME_NAME   (HASH_BUF_SIZE*2+2)
 
#define YSTRREF_EMPTY_STRING   0x00ff /* yStrRef value for the empty string */
 
#define YSTRREF_HUBPORT_STRING   0x00d6 /* yStrRef value for the string 'HubPort' */
 
#define YSTRREF_MODULE_STRING   0x0020 /* yStrRef value for the string 'Module' */
 
#define YSTRREF_mODULE_STRING   0x00a3 /* yStrRef value for the string 'module' */
 
#define YSTRREF_SENSOR_STRING   0x0001 /* yStrRef value for the string 'Sensor' */
 
#define YWP_BEACON_ON   0x01
 
#define YWP_MARK_FOR_UNREGISTER   0x02
 

Enumerations

enum  yAsbUrlProto { PROTO_AUTO = 0, PROTO_HTTP, PROTO_WEBSOCKET }
 
enum  yAsbUrlType { USB_URL, IP_URL, NAME_URL }
 
enum  yWPAttribute {
  Y_WP_SERIALNUMBER, Y_WP_LOGICALNAME, Y_WP_PRODUCTNAME, Y_WP_PRODUCTID,
  Y_WP_NETWORKURL, Y_WP_BEACON, Y_WP_INDEX
}
 

Functions

int decodeNetFuncValV2 (const u8 *p, Notification_funydx *funInfo, char *funcVal)
 
void wpAllowUnregisterEx (void)
 
u16 wpEntryCount (void)
 
int wpGetAllDevUsingHubUrl (yUrlRef hubUrl, yStrRef *buffer, int sizeInStrRef)
 
yStrRef wpGetAttribute (yBlkHdl hdl, yWPAttribute attridx)
 
int wpGetDeviceInfo (YAPI_DEVICE devdesc, u16 *deviceid, char *productname, char *serial, char *logicalname, u8 *beacon)
 
int wpGetDeviceUrl (YAPI_DEVICE devdesc, char *roothubserial, char *request, int requestsize, int *neededsize)
 
yUrlRef wpGetDeviceUrlRef (YAPI_DEVICE devdesc)
 
int wpGetDevYdx (yStrRef serial)
 
void wpGetLogicalName (yBlkHdl hdl, char *logicalName)
 
void wpGetSerial (yBlkHdl hdl, char *serial)
 
int wpMarkForUnregister (yStrRef serial)
 
void wpPreventUnregisterEx (void)
 
int wpRegister (int devYdx, yStrRef serial, yStrRef logicalName, yStrRef productName, u16 productId, yUrlRef devUrl, s8 beacon)
 
YAPI_DEVICE wpSearch (const char *device_str)
 
YAPI_DEVICE wpSearchByNameHash (yStrRef strref)
 
YAPI_DEVICE wpSearchByUrl (const char *host, const char *rootUrl)
 
YAPI_DEVICE wpSearchEx (yStrRef strref)
 
u16 yBlkListLength (yBlkHdl hdl)
 
yBlkHdl yBlkListSeek (yBlkHdl hdl, u16 pos)
 
void yHashFree (void)
 
void yHashGetBuf (yHash yhash, u8 *destbuf, u16 bufsize)
 
void yHashGetStr (yHash yhash, char *destbuf, u16 bufsize)
 
u16 yHashGetStrLen (yHash yhash)
 
char * yHashGetStrPtr (yHash yhash)
 
yAsbUrlType yHashGetUrlPort (yUrlRef urlref, char *url, u16 *port, yAsbUrlProto *proto, yStrRef *user, yStrRef *password)
 
void yHashInit (void)
 
yHash yHashPutBuf (const u8 *buf, u16 len)
 
yHash yHashPutStr (const char *str)
 
int yHashSameHub (yUrlRef url_a, yUrlRef url_b)
 
yHash yHashTestBuf (const u8 *buf, u16 len)
 
yHash yHashTestStr (const char *str)
 
yUrlRef yHashUrl (const char *host, const char *rootUrl, u8 testonly, char *errmsg)
 
yUrlRef yHashUrlAPI (void)
 
yUrlRef yHashUrlFromRef (yUrlRef urlref, const char *rootUrl)
 
yUrlRef yHashUrlUSB (yHash serial)
 
s16 ypFindBootloaders (yStrRef *serials, u16 maxSerials)
 
int ypGetAttributes (yBlkHdl hdl, yStrRef *serial, yStrRef *funcId, yStrRef *funcName, Notification_funydx *funcInfo, char *funcVal)
 
int ypGetAttributesByYdx (u8 devYdx, u8 funYdx, yStrRef *serial, yStrRef *logicalName, yStrRef *funcId, yStrRef *funcName, Notification_funydx *funcInfo, char *funcVal)
 
int ypGetBootDevHdl (const char *serial)
 
void ypGetCategory (yBlkHdl hdl, char *name, yBlkHdl *entries)
 
int ypGetFunctionInfo (YAPI_FUNCTION fundesc, char *serial, char *funcId, char *baseType, char *funcName, char *funcVal)
 
int ypGetFunctions (const char *class_str, YAPI_DEVICE devdesc, YAPI_FUNCTION prevfundesc, YAPI_FUNCTION *buffer, int maxsize, int *neededsize)
 
int ypGetFunctionsEx (yStrRef categref, YAPI_DEVICE devdesc, YAPI_FUNCTION prevfundesc, YAPI_FUNCTION *buffer, int maxsize, int *neededsize)
 
int ypGetType (yBlkHdl hdl)
 
int ypRegister (yStrRef categ, yStrRef serial, yStrRef funcId, yStrRef funcName, int funClass, int funYdx, const char *funcVal)
 
int ypRegisterByYdx (u8 devYdx, Notification_funydx funInfo, const char *funcVal, YAPI_FUNCTION *fundesc)
 
YAPI_FUNCTION ypSearch (const char *class_str, const char *func_str)
 

Variables

char SerialNumberStr [YOCTO_SERIAL_LEN]
 
yStrRef SerialRef
 
yBlkHdl yWpListHead
 
yBlkHdl yYpListHead
 

Macro Definition Documentation

#define HASH_BUF_POW   5 /* HASH_BUF_POW = log_2(HASH_BUF_SIZE+2+2) */

Definition at line 53 of file yhash.h.

#define HASH_BUF_SIZE   28

Definition at line 52 of file yhash.h.

#define NB_MAX_DEVICES   256

Definition at line 59 of file yhash.h.

#define NB_MAX_HASH_ENTRIES   8192

Definition at line 58 of file yhash.h.

#define WORD_TEXT_OG   0x474f

Definition at line 70 of file yhash.h.

#define WORD_TEXT_PR   0x5250

Definition at line 69 of file yhash.h.

#define wpAllowUnregister ( )    wpAllowUnregisterEx()

Definition at line 244 of file yhash.h.

#define wpPreventUnregister ( )    wpPreventUnregisterEx()

Definition at line 243 of file yhash.h.

#define YBLKID_WPENTRY   0xf0

Definition at line 86 of file yhash.h.

#define YBLKID_YPARRAY   0xf2

Definition at line 88 of file yhash.h.

#define YBLKID_YPCATEG   0xf1

Definition at line 87 of file yhash.h.

#define YBLKID_YPENTRY   0xf3

Definition at line 89 of file yhash.h.

#define YBLKID_YPENTRYEND   (YBLKID_YPENTRY+YOCTO_N_BASECLASSES-1)

Definition at line 90 of file yhash.h.

#define YMAX_HUB_URL_DEEP   8

Definition at line 170 of file yhash.h.

#define YOCTO_HOSTNAME_NAME   (HASH_BUF_SIZE*2+2)

Definition at line 171 of file yhash.h.

#define YSTRREF_EMPTY_STRING   0x00ff /* yStrRef value for the empty string */

Definition at line 62 of file yhash.h.

#define YSTRREF_HUBPORT_STRING   0x00d6 /* yStrRef value for the string 'HubPort' */

Definition at line 65 of file yhash.h.

#define YSTRREF_MODULE_STRING   0x0020 /* yStrRef value for the string 'Module' */

Definition at line 63 of file yhash.h.

#define YSTRREF_mODULE_STRING   0x00a3 /* yStrRef value for the string 'module' */

Definition at line 64 of file yhash.h.

#define YSTRREF_SENSOR_STRING   0x0001 /* yStrRef value for the string 'Sensor' */

Definition at line 66 of file yhash.h.

#define YWP_BEACON_ON   0x01

Definition at line 106 of file yhash.h.

#define YWP_MARK_FOR_UNREGISTER   0x02

Definition at line 105 of file yhash.h.

Enumeration Type Documentation

Enumerator
PROTO_AUTO 
PROTO_HTTP 
PROTO_WEBSOCKET 

Definition at line 179 of file yhash.h.

Enumerator
USB_URL 
IP_URL 
NAME_URL 

Definition at line 173 of file yhash.h.

Enumerator
Y_WP_SERIALNUMBER 
Y_WP_LOGICALNAME 
Y_WP_PRODUCTNAME 
Y_WP_PRODUCTID 
Y_WP_NETWORKURL 
Y_WP_BEACON 
Y_WP_INDEX 

Definition at line 76 of file yhash.h.

Function Documentation

int decodeNetFuncValV2 ( const u8 *  p,
Notification_funydx funInfo,
char *  funcVal 
)

Definition at line 2056 of file yhash.c.

void wpAllowUnregisterEx ( void  )

Definition at line 741 of file yhash.c.

u16 wpEntryCount ( void  )

Definition at line 963 of file yhash.c.

int wpGetAllDevUsingHubUrl ( yUrlRef  hubUrl,
yStrRef buffer,
int  sizeInStrRef 
)

Definition at line 1072 of file yhash.c.

yStrRef wpGetAttribute ( yBlkHdl  hdl,
yWPAttribute  attridx 
)

Definition at line 880 of file yhash.c.

int wpGetDeviceInfo ( YAPI_DEVICE  devdesc,
u16 *  deviceid,
char *  productname,
char *  serial,
char *  logicalname,
u8 *  beacon 
)

Definition at line 1220 of file yhash.c.

int wpGetDeviceUrl ( YAPI_DEVICE  devdesc,
char *  roothubserial,
char *  request,
int  requestsize,
int *  neededsize 
)

Definition at line 1124 of file yhash.c.

yUrlRef wpGetDeviceUrlRef ( YAPI_DEVICE  devdesc)

Definition at line 1102 of file yhash.c.

int wpGetDevYdx ( yStrRef  serial)

Definition at line 968 of file yhash.c.

void wpGetLogicalName ( yBlkHdl  hdl,
char *  logicalName 
)

Definition at line 910 of file yhash.c.

void wpGetSerial ( yBlkHdl  hdl,
char *  serial 
)

Definition at line 901 of file yhash.c.

int wpMarkForUnregister ( yStrRef  serial)

Definition at line 919 of file yhash.c.

void wpPreventUnregisterEx ( void  )

Definition at line 733 of file yhash.c.

int wpRegister ( int  devYdx,
yStrRef  serial,
yStrRef  logicalName,
yStrRef  productName,
u16  productId,
yUrlRef  devUrl,
s8  beacon 
)

Definition at line 783 of file yhash.c.

YAPI_DEVICE wpSearch ( const char *  device_str)

Definition at line 1014 of file yhash.c.

YAPI_DEVICE wpSearchByNameHash ( yStrRef  strref)

Definition at line 1023 of file yhash.c.

YAPI_DEVICE wpSearchByUrl ( const char *  host,
const char *  rootUrl 
)

Definition at line 1048 of file yhash.c.

YAPI_DEVICE wpSearchEx ( yStrRef  strref)

Definition at line 988 of file yhash.c.

u16 yBlkListLength ( yBlkHdl  hdl)

Definition at line 136 of file yhash.c.

yBlkHdl yBlkListSeek ( yBlkHdl  hdl,
u16  pos 
)

Definition at line 147 of file yhash.c.

void yHashFree ( void  )

Definition at line 240 of file yhash.c.

void yHashGetBuf ( yHash  yhash,
u8 *  destbuf,
u16  bufsize 
)

Definition at line 342 of file yhash.c.

void yHashGetStr ( yHash  yhash,
char *  destbuf,
u16  bufsize 
)

Definition at line 365 of file yhash.c.

u16 yHashGetStrLen ( yHash  yhash)

Definition at line 377 of file yhash.c.

char* yHashGetStrPtr ( yHash  yhash)

Definition at line 401 of file yhash.c.

yAsbUrlType yHashGetUrlPort ( yUrlRef  urlref,
char *  url,
u16 *  port,
yAsbUrlProto proto,
yStrRef user,
yStrRef password 
)

Definition at line 579 of file yhash.c.

void yHashInit ( void  )

Definition at line 189 of file yhash.c.

yHash yHashPutBuf ( const u8 *  buf,
u16  len 
)

Definition at line 312 of file yhash.c.

yHash yHashPutStr ( const char *  str)

Definition at line 318 of file yhash.c.

int yHashSameHub ( yUrlRef  url_a,
yUrlRef  url_b 
)

Definition at line 619 of file yhash.c.

yHash yHashTestBuf ( const u8 *  buf,
u16  len 
)

Definition at line 327 of file yhash.c.

yHash yHashTestStr ( const char *  str)

Definition at line 333 of file yhash.c.

yUrlRef yHashUrl ( const char *  url,
const char *  rootUrl,
u8  testonly,
char *  errmsg 
)

if testonly is non zero it do not add the hash if the hash has not been already recorded in this case we return INVALID_HASH_IDX

Definition at line 474 of file yhash.c.

yUrlRef yHashUrlAPI ( void  )

Definition at line 650 of file yhash.c.

yUrlRef yHashUrlFromRef ( yUrlRef  urlref,
const char *  rootUrl 
)

create and register a new url with the host form urlref and the path from rootUrl. return: the yUrlRef for the new created url

Definition at line 454 of file yhash.c.

yUrlRef yHashUrlUSB ( yHash  serial)

Definition at line 637 of file yhash.c.

s16 ypFindBootloaders ( yStrRef serials,
u16  maxSerials 
)

Definition at line 1964 of file yhash.c.

int ypGetAttributes ( yBlkHdl  hdl,
yStrRef serial,
yStrRef funcId,
yStrRef funcName,
Notification_funydx funcInfo,
char *  funcVal 
)

Definition at line 1515 of file yhash.c.

int ypGetAttributesByYdx ( u8  devYdx,
u8  funYdx,
yStrRef serial,
yStrRef logicalName,
yStrRef funcId,
yStrRef funcName,
Notification_funydx funcInfo,
char *  funcVal 
)

Definition at line 1450 of file yhash.c.

int ypGetBootDevHdl ( const char *  serial)
void ypGetCategory ( yBlkHdl  hdl,
char *  name,
yBlkHdl entries 
)

Definition at line 1508 of file yhash.c.

int ypGetFunctionInfo ( YAPI_FUNCTION  fundesc,
char *  serial,
char *  funcId,
char *  baseType,
char *  funcName,
char *  funcVal 
)

Definition at line 1866 of file yhash.c.

int ypGetFunctions ( const char *  class_str,
YAPI_DEVICE  devdesc,
YAPI_FUNCTION  prevfundesc,
YAPI_FUNCTION buffer,
int  maxsize,
int *  neededsize 
)

Definition at line 1763 of file yhash.c.

int ypGetFunctionsEx ( yStrRef  categref,
YAPI_DEVICE  devdesc,
YAPI_FUNCTION  prevfundesc,
YAPI_FUNCTION buffer,
int  maxsize,
int *  neededsize 
)

Definition at line 1906 of file yhash.c.

int ypGetType ( yBlkHdl  hdl)

Definition at line 1551 of file yhash.c.

int ypRegister ( yStrRef  categ,
yStrRef  serial,
yStrRef  funcId,
yStrRef  funcName,
int  funClass,
int  funYdx,
const char *  funcVal 
)

Definition at line 1253 of file yhash.c.

int ypRegisterByYdx ( u8  devYdx,
Notification_funydx  funInfo,
const char *  funcVal,
YAPI_FUNCTION fundesc 
)

Definition at line 1395 of file yhash.c.

YAPI_FUNCTION ypSearch ( const char *  class_str,
const char *  func_str 
)

Definition at line 1603 of file yhash.c.

Variable Documentation

char SerialNumberStr[YOCTO_SERIAL_LEN]

Definition at line 80 of file yhash.c.

yStrRef SerialRef

Definition at line 82 of file yhash.c.

yBlkHdl yWpListHead

Definition at line 84 of file yhash.c.

yBlkHdl yYpListHead

Definition at line 85 of file yhash.c.



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