Go to the source code of this file.
Macros | |
#define | __eds__ |
#define | __FILE_ID__ "yhash" |
#define | BLK(hdl) (yHashTable[(hdl)>>1].blk[(hdl)&1]) |
#define | HLOGF(x) |
#define | WP(hdl) (BLK(hdl).wpEntry) |
#define | YA(hdl) (BLK(hdl).ypArray) |
#define | YC(hdl) (BLK(hdl).ypCateg) |
#define | YP(hdl) (BLK(hdl).ypEntry) |
Functions | |
int | decodeNetFuncValV2 (const u8 *p, Notification_funydx *funInfo, char *funcVal) |
static u16 | fletcher16 (const u8 *data, u16 len, u16 virtlen) |
static yBlkHdl | functionSearch (YAPI_FUNCTION fundesc) |
void | wpAllowUnregisterEx (void) |
u16 | wpEntryCount (void) |
static void | wpExecuteUnregisterUnsec (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) |
static yBlkHdl | yBlkAlloc (void) |
static void | yBlkFree (yBlkHdl hdl) |
u16 | yBlkListLength (yBlkHdl hdl) |
yBlkHdl | yBlkListSeek (yBlkHdl hdl, u16 pos) |
static int | yComputeRelPath (yAbsUrl *absurl, const char *rootUrl, u8 testonly) |
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) |
static yHash | yHashPut (const u8 *buf, u16 len, u8 testonly) |
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 *url, 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) |
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_or_name) |
static void | ypUnregister (yStrRef serial) |
Variables | |
static yBlkHdl | devYdxPtr [NB_MAX_DEVICES] |
yBlkHdl | freeBlks = INVALID_BLK_HDL |
static yBlkHdl | funYdxPtr [NB_MAX_DEVICES] |
static u8 | nextCatYdx = 1 |
static u16 | nextDevYdx = 0 |
static u16 | nextHashEntry = 256 |
char | SerialNumberStr [YOCTO_SERIAL_LEN] = "" |
yStrRef | SerialRef = INVALID_HASH_IDX |
static u16 | usedDevYdx [NB_MAX_DEVICES/16] |
static int | wpLockCount = 0 |
static int | wpSomethingUnregistered = 0 |
yCRITICAL_SECTION | yFreeMutex |
yCRITICAL_SECTION | yHashMutex |
static YHashSlot | yHashTable [NB_MAX_HASH_ENTRIES] |
yBlkHdl | yWpListHead = INVALID_BLK_HDL |
yCRITICAL_SECTION | yWpMutex |
yBlkHdl | yYpListHead = INVALID_BLK_HDL |
yCRITICAL_SECTION | yYpMutex |
#define BLK | ( | hdl | ) | (yHashTable[(hdl)>>1].blk[(hdl)&1]) |
int decodeNetFuncValV2 | ( | const u8 * | p, |
Notification_funydx * | funInfo, | ||
char * | funcVal | ||
) |
|
static |
|
static |
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 | ) |
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 | ) |
|
static |
void yHashGetStr | ( | yHash | yhash, |
char * | destbuf, | ||
u16 | bufsize | ||
) |
yAsbUrlType yHashGetUrlPort | ( | yUrlRef | urlref, |
char * | url, | ||
u16 * | port, | ||
yAsbUrlProto * | proto, | ||
yStrRef * | user, | ||
yStrRef * | password | ||
) |
|
static |
yUrlRef yHashUrl | ( | const char * | url, |
const char * | rootUrl, | ||
u8 | testonly, | ||
char * | errmsg | ||
) |
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 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 ypRegisterByYdx | ( | u8 | devYdx, |
Notification_funydx | funInfo, | ||
const char * | funcVal, | ||
YAPI_FUNCTION * | fundesc | ||
) |
YAPI_FUNCTION ypSearch | ( | const char * | class_str, |
const char * | func_or_name | ||
) |
|
static |
yBlkHdl freeBlks = INVALID_BLK_HDL |
|
static |
char SerialNumberStr[YOCTO_SERIAL_LEN] = "" |
yStrRef SerialRef = INVALID_HASH_IDX |
|
static |
yCRITICAL_SECTION yFreeMutex |
yCRITICAL_SECTION yHashMutex |
|
static |
yBlkHdl yWpListHead = INVALID_BLK_HDL |
yCRITICAL_SECTION yWpMutex |
yBlkHdl yYpListHead = INVALID_BLK_HDL |
yCRITICAL_SECTION yYpMutex |