Transmits an application message.
- Parameters
-
self | The instance |
msg_ptr | Reference to the related Tx message object |
tx_complete_fptr | Callback function that is invoked as soon as the transmission was finished and the transmission result is available. The application must assign a callback function if the transmission result is required or the Tx message object uses external payload which needs to be reused or freed by the application. Otherwise the application is allowed to pass NULL . |
- Note
- It is important that
msg_ptr
is the reference to an object which was previously obtained from Ucs_AmsTx_AllocMsg(). The application must not pass the reference of a self-created Tx message object to this function.
- Returns
- Possible return values are shown in the table below.
Value | Description |
UCS_RET_SUCCESS | No error |
UCS_RET_ERR_PARAM | Invalid parameter is given. Possible reasons are:
msg_ptr is NULL
destination_address is smaller than 0x10 (reserved for internal communication)
data_size of a broad or group-cast message is larger than 45
Either the application must modify the message and retry the function call, or must free the message object via Ucs_AmsTx_FreeUnusedMsg(). |
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized.
Message objects that have been allocated during initialized state are no longer valid. |