![]() |
gxPL
1.0
Tools, Application and Framework for xPL
|
![]() |
Functions | |
int | gxPLGenerateUniqueId (const gxPLApplication *app, char *id, int len) |
Generates a fairly unique identifier. More... | |
int | gxPLIdCmp (const gxPLId *id1, const gxPLId *id2) |
Compare two identifiers. More... | |
int | gxPLIdCopy (gxPLId *dst, const gxPLId *src) |
Copy two identifiers. More... | |
int | gxPLIdDeviceIdSet (gxPLId *id, const char *device_id) |
Sets device identifier. More... | |
int | gxPLIdFromString (gxPLId *dest, char *src) |
Gets an identifier from a string. More... | |
int | gxPLIdInstanceIdSet (gxPLId *id, const char *instance_id) |
Sets instance identifier. More... | |
int | gxPLIdSet (gxPLId *id, const char *vendor_id, const char *device_id, const char *instance_id) |
Sets an identifier. More... | |
int | gxPLIdVendorIdSet (gxPLId *id, const char *vendor_id) |
Sets vendor identifier. More... | |
int gxPLGenerateUniqueId | ( | const gxPLApplication * | app, |
char * | id, | ||
int | len | ||
) |
Generates a fairly unique identifier.
The identifier consists only of valid characters in xPL (0-9,a-z). The algorithm uses the hardware address of the host and the time of day. Two spaced successive calls of less than one millisecond give the same result.
app | pointer to a gxPLApplication object |
id | the generated id string |
len | length of the generated string not including the terminating null character |
Compare two identifiers.
id1 | first id |
id2 | second id |
Copy two identifiers.
dst | destination |
src | source |
int gxPLIdDeviceIdSet | ( | gxPLId * | id, |
const char * | device_id | ||
) |
Sets device identifier.
id | pointer to the identifier |
device_id | device identifier as string |
int gxPLIdFromString | ( | gxPLId * | dest, |
char * | src | ||
) |
Gets an identifier from a string.
dest | destination |
src | source string vendor-device.instance\0, this string is modified by the function and is no longer valid after call. |
int gxPLIdInstanceIdSet | ( | gxPLId * | id, |
const char * | instance_id | ||
) |
Sets instance identifier.
id | pointer to the identifier |
instance_id | instance identifier as string |
int gxPLIdSet | ( | gxPLId * | id, |
const char * | vendor_id, | ||
const char * | device_id, | ||
const char * | instance_id | ||
) |
Sets an identifier.
id | pointer to the identifier |
vendor_id | vendor identifier as string |
device_id | device identifier as string |
instance_id | instance identifier as string |
int gxPLIdVendorIdSet | ( | gxPLId * | id, |
const char * | vendor_id | ||
) |
Sets vendor identifier.
id | pointer to the identifier |
vendor_id | vendor identifier as string |