AudioScience HPI  Version_4.33.01
Functions
Cobranet control

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

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_Cobranet_HmiWrite()

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

◆ HPI_Cobranet_HmiRead()

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

◆ HPI_Cobranet_HmiGetStatus()

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_Cobranet_GetIPaddress()

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

◆ HPI_Cobranet_SetIPaddress()

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

◆ HPI_Cobranet_GetStaticIPaddress()

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

◆ HPI_Cobranet_SetStaticIPaddress()

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

◆ HPI_Cobranet_GetMACaddress()

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.