AudioScience HPI Version_4.10.
Functions

Cobranet control

Controls

A cobranet adapter has one cobranet control for each cobranet interface (usually only one). More...

Functions

hpi_err_t HPI_Cobranet_HmiWrite (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t dwHmiAddress, uint32_t dwByteCount, uint8_t *pbData)
 Write to an HMI variable.
hpi_err_t HPI_Cobranet_HmiRead (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t dwHmiAddress, uint32_t dwMaxByteCount, uint32_t *pdwByteCount, uint8_t *pbData)
 Read from an HMI variable.
hpi_err_t HPI_Cobranet_HmiGetStatus (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwStatus, uint32_t *pdwReadableSize, uint32_t *pdwWriteableSize)
 Get the status of the last cobranet operation.
hpi_err_t HPI_Cobranet_GetIPaddress (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwIPaddress)
 Get the CobraNet node's current IP address.
hpi_err_t HPI_Cobranet_SetIPaddress (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t dwIPaddress)
 Set the CobraNet node's current IP address.
hpi_err_t HPI_Cobranet_GetStaticIPaddress (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwIPaddress)
 Get the CobraNet node's static IP address.
hpi_err_t HPI_Cobranet_SetStaticIPaddress (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t dwIPaddress)
 Set the CobraNet node's static IP address.
hpi_err_t HPI_Cobranet_GetMACaddress (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwMAC_MSBs, uint32_t *pdwMAC_LSBs)
 Get the CobraNet node's MAC address.

Detailed Description

A cobranet adapter has one cobranet control for each cobranet interface (usually only one).

The cobranet control is located on (HPI_SOURCENODE_COBRANET,0,HPI_DESTNODE_COBRANET,0) The cobranet control allows reading and writing of the cobranet HMI variables (See Cirrus cobranet documentation @ www.cobranet.info for details)


Function Documentation

hpi_err_t HPI_Cobranet_HmiWrite ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t  dwHmiAddress,
uint32_t  dwByteCount,
uint8_t *  pbData 
)

Write to an HMI variable.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROLif type is not cobranet
HPI_ERROR_INVALID_OPERATIONif HMI variable is not writeable
HPI_ERROR_INVALID_DATASIZEif requested size is greater than the HMI variable size
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle of a Cobranet control
dwHmiAddressdwHmiAddress HMI address
dwByteCountNumber of bytes to send to the control
pbDatapointer to data to send

References HPI_ERROR_MESSAGE_BUFFER_TOO_SMALL.

Referenced by HPI_Cobranet_SetIPaddress(), and HPI_Cobranet_SetStaticIPaddress().

hpi_err_t HPI_Cobranet_HmiRead ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t  dwHmiAddress,
uint32_t  dwMaxByteCount,
uint32_t *  pdwByteCount,
uint8_t *  pbData 
)

Read from an HMI variable.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROLif type is not cobranet

The amount of data returned will be the minimum of the input dwMaxByteCount and the actual size of the variable reported by the HMI

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle of a cobranet control
dwHmiAddressHMI address
dwMaxByteCountmaximum number of bytes to return (<= buffer size of pbData)
pdwByteCountactual number of bytes returned
pbDatadata read from HMI variable

References HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL.

Referenced by HPI_Cobranet_GetIPaddress(), HPI_Cobranet_GetMACaddress(), and HPI_Cobranet_GetStaticIPaddress().

hpi_err_t HPI_Cobranet_HmiGetStatus ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  pdwStatus,
uint32_t *  pdwReadableSize,
uint32_t *  pdwWriteableSize 
)

Get the status of the last cobranet operation.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle of a cobranet control
pdwStatusthe raw status word from the HMI
pdwReadableSizethe reported readable size from the last variable access
pdwWriteableSizethe reported writeable size from the last variable access
hpi_err_t HPI_Cobranet_GetIPaddress ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  pdwIPaddress 
)

Get the CobraNet node's current IP address.

Allows the user to get the current IP address of the CobraNet node.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROLif type is not cobranet
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle of a cobranet control
pdwIPaddressthe current IP address

References HPI_Cobranet_HmiRead().

hpi_err_t HPI_Cobranet_SetIPaddress ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t  dwIPaddress 
)

Set the CobraNet node's current IP address.

Allows the user to set the current IP address of the CobraNet node.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROLif type is not cobranet
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle of a cobranet control
dwIPaddressthe new current IP address

References HPI_Cobranet_HmiWrite().

hpi_err_t HPI_Cobranet_GetStaticIPaddress ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  pdwIPaddress 
)

Get the CobraNet node's static IP address.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROLif type is not cobranet

Allows the user to get the static IP address of the CobraNet node.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle of a cobranet control
pdwIPaddressthe static IP address

References HPI_Cobranet_HmiRead().

hpi_err_t HPI_Cobranet_SetStaticIPaddress ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t  dwIPaddress 
)

Set the CobraNet node's static IP address.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROLif type is not cobranet

Allows the user to set the static IP address of the CobraNet node.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle of a cobranet control
dwIPaddressthe new static IP address

References HPI_Cobranet_HmiWrite().

hpi_err_t HPI_Cobranet_GetMACaddress ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  pdwMAC_MSBs,
uint32_t *  pdwMAC_LSBs 
)

Get the CobraNet node's MAC address.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROLif type is not cobranet

Allows the user to get the MAC address of the CobraNet node.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle of a cobranet control
pdwMAC_MSBsthe first 4 bytes of the MAC address.
pdwMAC_LSBsthe last 2 bytes of the MAC address returned in the upper 2 bytes.

References HPI_Cobranet_HmiRead().