User-Defined Type Functions
User-Defined Type Functions Overview
User-Defined Type Functions
You can use the user-defined type functions to create, modify, delete, and browse user-defined data types that contain multiple fields. You must add user-defined data types to the Data Archiver before you can use them in tags.
ihuUserDefinedTypeAdd
Prototype
Use the ihuUserDefineTypeAdd
function to create or add MultiField
type tags. The user-defined type you pass to this function can have multiple fields defined, or you can add fields later by using ihUserDefinedTypeSetProperties().
You can also use this function to modify user-defined data types. To modify an existing type, add a user-defined data type with the same name.
ihuUserDefinedTypeAdd
(
long serverhandle, // [in] connected server handle
ihuUserDefinedTypeProperties *InUserDefinedType //[in] UserDefined type that needs to be added / modified
)
Remarks
Existing types are overwritten by new types with the same names. You must be a member of the ihTag Admin group to add or modify a type.
Returns
-
ihuSTATUS_OK
: on success ihuSTATUS_INVALID_PARAMETER
:NULL
value or invalid server handleihuSTATUS_FAILED
: on any error
ihuUserDefinedTypeDelete
Prototype
Use the ihuUserDefinedTypeDelete
function to delete a user-defined type that you no longer use.
ihuUserDefinedTypeDelete
(
long serverhandle, // [in] connected server handle
MSO_Char * UserDefinedTypeName //[in] UserDefined type name to be deleted
)
Remarks
You must be a member of the ihTag Admin group to delete a type.
Returns
-
ihuSTATUS_OK
: on success ihuSTATUS_INVALID_PARAMETER
:NULL
value or invalid server handleihuSTATUS_FAILED
: on any error
ihuUserDefinedTypeRename
Prototype
Use the ihuUserDefinedTypeRename
function to rename a user-defined type.
ihuUserDefinedTypeRename
(
long serverhandle, // [in] connected server handle
MSO_Char * UserDefinedTypeName, //[in] UserDefined type name which needs to be renamed
MSO_Char *NewUserDefinedTypeName //[in] new UserDefined type name
)
Remarks
You must be a member of the ihTag Admin group to rename a type.
Returns
-
ihuSTATUS_OK
: on success ihuSTATUS_INVALID_PARAMETER
:NULL
value or invalid server handleihuSTATUS_FAILED
: on any error
ihuUserDefinedTypeExists
Prototype
Use the ihuUserDefinedTypeExists
function to check whether a specific user-defined type exists.
ihuUserDefinedTypeExists
(
long serverhandle, // [in] connected server handle
MSO_Char * UserDefinedTypeName // [in] UserDefined type name
)
Returns
-
ihuSTATUS_OK
: if the type exists ihuSTATUS_INVALID_PARAMETER
:NULL
value or invalid server handleihuSTATUS_FAILED
: if the type does not exist or the server cannot be reached
ihuGetUserDefinedTypes
Prototype
Use the ihuGetUserDefinedTypes
function to return a list of user-defined types and their values. After you call this function, you must call ihuUserDefinedTypeFreeProperties()
to release memory allocations.
ihuGetUserDefinedTypes
(
long serverhandle, // [in] connected server handle
MSO_Char *StructSetMask, //[in] Pass * to get the all the Structure or pass the name of the structure you want
long *numberofrecords, //[out] Number of records
ihuUserDefinedTypeRecordSet *RecordSet //[out] returns the records for the UserDefined defined types
)
Remarks
You must be a member of the ihReader group to get a list of user-defined types. The list is returned in the RecordSet
parameter.
Returns
-
ihuSTATUS_OK
: on success ihuSTATUS_INVALID_PARAMETER
:NULL
value passed forStructSetMask
orRecordSet
ornumberofrecords
ihuSTATUS_FAILED
: on any error
ihuUserDefinedTypeSetProperties
Prototype
Use the ihuUserDefinedTypeSetProperties
function to set user-defined type properties after you add types by using ihuUserDefinedTypeAdd().
ihuUserDefinedTypeSetProperties
(
long serverhandle, // [in] connected server handle
ihuUserDefinedTypeProperties *UserDefinedType //[in] UserDefined type that needs to be added / created
)
Remarks
You must be a member of the ihTag Admin group to set type properties.
Returns
-
ihuSTATUS_OK
: on success ihuSTATUS_INVALID_PARAMETER
: invalid server handle orNULL
property pointer value passedihuSTATUS_FAILED
: on any error
ihuUserDefinedTypeFreeProperties
Prototype
Use the ihuUserDefinedTypeFreeProperties
function to free the memory allocated by the ihuGetUserDefinedTypes() function.
ihuUserDefinedTypeFreeProperties
(
ihuUserDefinedTypeRecordSet *UserDefinedTypeRecordSet //[in] UserDefinedTypeRecordSet that needs to be fr
)
Remarks
Call the ihuUserDefinedTypeFreeProperties
function once to release all memory in the recordset returned by ihuGetUserDefinedTypes()
. Do not free the memory in your program.
Returns
Void