Logo
UNICENS V2.1.0-3491
User Manual and API Reference
Ucs_Return_t Ucs_Xrm_Stream_GetPortConfig ( Ucs_Inst_t self,
uint16_t  destination_address,
uint8_t  index,
Ucs_Xrm_Stream_PortCfgResCb_t  result_fptr 
)

This function requests the configurations of a Streaming Port.

 This function corresponds with the INIC function INIC.StreamPortConfiguration.
Parameters
selfThe UNICENS instance pointer
destination_addressDevice address of the target. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
indexStreaming Port instance.
 Index
result_fptrRequired result callback
Returns
Possible return values are shown in the table below.
Value Description
UCS_RET_SUCCESS No error
UCS_RET_ERR_PARAM At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW No message buffer available
UCS_RET_ERR_API_LOCKED API is currently locked
UCS_RET_ERR_NOT_INITIALIZED UNICENS is not initialized


Example

// Main function
void main()
{
(void)Ucs_Xrm_Stream_GetPortConfig(ucs_inst_ptr, 0x555U, 0x0U, &App_XrmStreamPortCfgResCb);
}
// The streaming port result callback function
static void App_XrmStreamPortCfgResCb(uint16_t node_address,
uint8_t index,
void *user_ptr)
{
if (result.code == UCS_RES_SUCCESS)
{
// Read Streaming ports configuration here...
}
}