AudioScience HPI Version_4.18.

Status

Blocks

The Status block is used for reporting adapter status information. More...

The Status block is used for reporting adapter status information.

The Status block is an implementation of a universal control (see Universal Control).

Data types

The list of supported datatypes is as follows:

entity_type_cstring

ASCII character.

entity_type_sequence

Sequence of potentially heterogeneous entities.

Conceptually similar to C struct.

entity_type_int

A 32 bit integer.

entity_type_float

An ieee754 binary 32 bit float.

Status

Status
    Adapter status block parameters report status information
CPU Utilization
    A measure of how busy the processor is
Temperature
    The adapter's temperature
Power Source
    The adapter's power source

Parameter list

Name Status
DescriptionAdapter status block parameters report status information. The Temperature and Power Source Parameters are optional.
OptionalNo
Typesequence / entity_type_sequence / a sequence of parameters follow
Count3
Attributesread
Added in version4.10.00
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,
                        entity_type_cstring, entity_role_classname,
                        name, &size, &items);
        if (err)
                HandleError(err);
        printf(" %s", name);

        // count
        size = sizeof(count);
        err = HPI_Object_GetInfo( hControl,
                        entity_type_int, entity_role_value,
                        &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);
                err = HPI_Object_BlockParameters(
                        hMixer,
                        hControl,
                        params,
                        &number);
                if (err)
                        HandleError(err);

                for ( i=0 ; i<number ; i++ ) {
                        if (i > 0)
                                printf(", ");
                        printf("%d",params[i]);
                }
                printf("]");
        }
}


Name CPU Utilization
DescriptionA measure of how busy the processor is.
OptionalNo
Typeinteger / entity_type_int / C99 type int32_t
Count1
Attributesread volatile value
Added in version4.10.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
size_t value_size;
size_t value_items;
int CPU_Utilization;
/* set source and destination node */
asihpi_control.wSrcNodeType = HPI_SOURCENODE_ADAPTER;
asihpi_control.wSrcNodeIndex = 0;
asihpi_control.wDstNodeType = 0;
asihpi_control.wDstNodeIndex = 0;
err = HPI_Object_BlockHandle(hMixer,
                asihpi_control.wSrcNodeType, asihpi_control.wSrcNodeIndex,
                asihpi_control.wDstNodeType, asihpi_control.wDstNodeIndex,
                "Status",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "CPU Utilization", &param);
if (!err)
{
        err = HPI_Object_GetInfo( param,
                        entity_type_int, entity_role_value,
                        NULL, &value_size, &value_items);
}

err = HPI_Object_GetValue(param, entity_type_int, 1,
            &CPU_Utilization, sizeof(CPU_Utilization) );
Units%


Name Temperature
DescriptionThe adapter's temperature. This parameter is optional.
OptionalYes
Typefloat / entity_type_float / IEEE745 32 bit float
Count1
Attributesread volatile value
Added in version4.10.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
size_t value_size;
size_t value_items;
float Temperature;
/* set source and destination node */
asihpi_control.wSrcNodeType = HPI_SOURCENODE_ADAPTER;
asihpi_control.wSrcNodeIndex = 0;
asihpi_control.wDstNodeType = 0;
asihpi_control.wDstNodeIndex = 0;
err = HPI_Object_BlockHandle(hMixer,
                asihpi_control.wSrcNodeType, asihpi_control.wSrcNodeIndex,
                asihpi_control.wDstNodeType, asihpi_control.wDstNodeIndex,
                "Status",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "Temperature", &param);
if (!err)
{
        err = HPI_Object_GetInfo( param,
                        entity_type_float, entity_role_value,
                        NULL, &value_size, &value_items);
}

err = HPI_Object_GetValue(param, entity_type_float, 1,
            &Temperature, sizeof(Temperature) );
Unitsdegrees C


Name Power Source
Description

The adapter's power source. This parameter is optional.

Valid enumeration strings are

  • None
  • PoE
  • External
  • External (PoE present)
OptionalYes
Typeenumerated / #entity_type_enumerated / contains string enumerations
Count1
Attributesread volatile value
Added in version4.10.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
size_t value_size;
size_t value_items;
uint32_t Power_Source;
/* set source and destination node */
asihpi_control.wSrcNodeType = HPI_SOURCENODE_ADAPTER;
asihpi_control.wSrcNodeIndex = 0;
asihpi_control.wDstNodeType = 0;
asihpi_control.wDstNodeIndex = 0;
err = HPI_Object_BlockHandle(hMixer,
                asihpi_control.wSrcNodeType, asihpi_control.wSrcNodeIndex,
                asihpi_control.wDstNodeType, asihpi_control.wDstNodeIndex,
                "Status",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "Power Source", &param);
if (!err)
{
        err = HPI_Object_GetInfo( param,
                        entity_type_int, entity_role_value,
                        NULL, &value_size, &value_items);
}

Power_Source = 1;
/* TODO */
/* TODO */
/* TODO */
/* TODO */
err = HPI_Object_GetValue(param, entity_type_int, 1,
            &Power_Source, sizeof(Power_Source));