AudioScience HPI  Version_4.33.01
Passwords

The passwords block supports reading and writing Admin and User strings to the device that are used as passwords in ASIControl. More...

The passwords block supports reading and writing Admin and User strings to the device that are used as passwords in ASIControl.

The password interface is a block control which is in turn an implementation of a universal control (see Universal Control).

Data types

The list of supported datatypes is as follows:

entity_type_cstring

ASCII character.
Note
An array of these (i.e. a string) may or may not be zero terminated within the encoded entity

Passwords

Passwords
    General purpose output block
Admin
    Use this parameter to read and write the administrator password
User
    Use this parameter to read and write the user password

Parameter list

NamePasswords
DescriptionGeneral purpose output block.
OptionalNo
Typesequence / entity_type_sequence / a sequence of parameters follow
Count2
Attributesread
Added in versionfuture
Example
static void print_block_control(
hpi_hsubsys_t *hSubSys,
hpi_handle_t hMixer,
hpi_handle_t hControl
)
{
enum e_entity_role r;
hpi_err_t err;
char name[256];
size_t size, items;
int count;
err = HPI_Object_GetRole(hControl, &r);
if (err)
HandleError(err);
// name
size = sizeof(name);
err = HPI_Object_GetInfo( hControl,
name, &size, &items);
if (err)
HandleError(err);
printf(" %s", name);
// count
size = sizeof(count);
err = HPI_Object_GetInfo( hControl,
&count, &size, &items);
if (err)
HandleError(err);
printf(", count %d", count);
// fetch parameter handles
if ( r == entity_role_block ) {
hpi_handle_t params[16]; /* should really use count */
int i;
size_t number;
printf(" [");
number = sizeof(params)/sizeof(hpi_handle_t);
hMixer,
hControl,
params,
&number);
if (err)
HandleError(err);
for ( i=0 ; i<number ; i++ ) {
if (i > 0)
printf(", ");
printf("%d",params[i]);
}
printf("]");
}
}


NameAdmin
DescriptionUse this parameter to read and write the administrator password.
OptionalNo
Typecstring / entity_type_cstring / ASCII characters
CountPASSWORD_LEN
Attributesread/write
Added in versionfuture
Example
struct hpi_control_t asihpi_control;
size_t value_size;
size_t value_items;
char Admin[PASSWORD_LEN];
/* set source and destination node */
asihpi_control.wSrcNodeType = HPI_SOURCENODE_ADAPTER;
asihpi_control.wSrcNodeIndex = 0;
asihpi_control.wDstNodeType = 0;
asihpi_control.wDstNodeIndex = 0;
asihpi_control.wSrcNodeType, asihpi_control.wSrcNodeIndex,
asihpi_control.wDstNodeType, asihpi_control.wDstNodeIndex,
"Passwords",
&block );
err = HPI_Object_ParameterHandle( hMixer, block, "Admin", &param);
if (!err)
{
err = HPI_Object_GetInfo( param,
NULL, &value_size, &value_items);
}
&Admin, sizeof(Admin) );
strcpy(Admin, "abcd");
err = HPI_Object_SetValue(param, entity_type_cstring, PASSWORD_LEN,
&Admin, sizeof(Admin));


NameUser
DescriptionUse this parameter to read and write the user password.
OptionalNo
Typecstring / entity_type_cstring / ASCII characters
CountPASSWORD_LEN
Attributesread/write
Added in versionfuture
Example
struct hpi_control_t asihpi_control;
size_t value_size;
size_t value_items;
char User[PASSWORD_LEN];
/* set source and destination node */
asihpi_control.wSrcNodeType = HPI_SOURCENODE_ADAPTER;
asihpi_control.wSrcNodeIndex = 0;
asihpi_control.wDstNodeType = 0;
asihpi_control.wDstNodeIndex = 0;
asihpi_control.wSrcNodeType, asihpi_control.wSrcNodeIndex,
asihpi_control.wDstNodeType, asihpi_control.wDstNodeIndex,
"Passwords",
&block );
err = HPI_Object_ParameterHandle( hMixer, block, "User", &param);
if (!err)
{
err = HPI_Object_GetInfo( param,
NULL, &value_size, &value_items);
}
&User, sizeof(User) );
strcpy(User, "abcd");
err = HPI_Object_SetValue(param, entity_type_cstring, PASSWORD_LEN,
&User, sizeof(User));