AudioScience HPI Version_4.10.

About

Blocks

The About block is used for reading device information. More...

The About block is used for reading device information.

All parameters in the About block are read-only strings. As outlined below, the About block contains model information and revision information for both the hardware and software.

The About 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.

About

About
    About block parameters contain information about a device
Model Name
    The AudioScience model name of the device
Model Number
    The AudioScience model number of the device
Serial Number
    The serial number of the device
Hardware Revision
    The hardware revision of the device
Firmware Revision
    The firmware revision running on the device
Running Firmware Image
    The firmware image currently running on the device

Parameter list

Name About
DescriptionAbout block parameters contain information about a device. The last parameter, reporting the running firmware image, is optional.
OptionalNo
Typesequence / entity_type_sequence / a sequence of parameters follow
Count6
Attributesread
Added in version4.08.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 Model Name
DescriptionThe AudioScience model name of the device.
OptionalNo
Typecstring / entity_type_cstring / ASCII characters
Count32
Attributesread
Added in version4.08.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
char Model_Name[32];
/* 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,
                "About",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "Model Name", &param);

err = HPI_Object_GetValue(param, entity_type_cstring, 32,
            &Model_Name, sizeof(Model_Name) );
            
printf("Model Name: %s\n", Model_Name);


Name Model Number
DescriptionThe AudioScience model number of the device.
OptionalNo
Typecstring / entity_type_cstring / ASCII characters
Count32
Attributesread
Added in version4.08.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
char Model_Number[32];
/* 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,
                "About",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "Model Number", &param);

err = HPI_Object_GetValue(param, entity_type_cstring, 32,
            &Model_Number, sizeof(Model_Number) );
            
printf("Model Number: %s\n", Model_Number);


Name Serial Number
DescriptionThe serial number of the device.
OptionalNo
Typecstring / entity_type_cstring / ASCII characters
Count32
Attributesread
Added in version4.08.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
char Serial_Number[32];
/* 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,
                "About",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "Serial Number", &param);

err = HPI_Object_GetValue(param, entity_type_cstring, 32,
            &Serial_Number, sizeof(Serial_Number) );
            
printf("Serial Number: %s\n", Serial_Number);


Name Hardware Revision
DescriptionThe hardware revision of the device.
OptionalNo
Typecstring / entity_type_cstring / ASCII characters
Count32
Attributesread
Added in version4.08.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
char Hardware_Revision[32];
/* 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,
                "About",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "Hardware Revision", &param);

err = HPI_Object_GetValue(param, entity_type_cstring, 32,
            &Hardware_Revision, sizeof(Hardware_Revision) );
            
printf("Hardware Revision: %s\n", Hardware_Revision);


Name Firmware Revision
DescriptionThe firmware revision running on the device.
OptionalNo
Typecstring / entity_type_cstring / ASCII characters
Count32
Attributesread
Added in version4.08.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
char Firmware_Revision[32];
/* 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,
                "About",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "Firmware Revision", &param);

err = HPI_Object_GetValue(param, entity_type_cstring, 32,
            &Firmware_Revision, sizeof(Firmware_Revision) );
            
printf("Firmware Revision: %s\n", Firmware_Revision);


Name Running Firmware Image
DescriptionThe firmware image currently running on the device. Displayed values are either Upate or Factory. The device contains two firmware images and will normally run the Update image unless that image is corrupted, in which case the Factory image is run.
OptionalYes
Typecstring / entity_type_cstring / ASCII characters
Count32
Attributesread
Added in version4.10.00
Example
struct hpi_control_t asihpi_control;
hpi_handle_t block;
hpi_handle_t param;
char Running_Firmware_Image[32];
/* 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,
                "About",
                &block );
err = HPI_Object_ParameterHandle( hMixer, block, "Running Firmware Image", &param);

err = HPI_Object_GetValue(param, entity_type_cstring, 32,
            &Running_Firmware_Image, sizeof(Running_Firmware_Image) );
            
printf("Running Firmware Image: %s\n", Running_Firmware_Image);