set_user_data
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Sets user information.
Prototype
1 | set_user_data(self, user_data: bytearray, offset: int = 0) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
user_data |
bytearray |
User-defined data. |
offset |
int |
Offset of the user data, which must comply with the following restriction: Value range: [0, 64); size + offset ≤ 64 |
Returns
None is returned in normal scenarios.
The dataflow.DfException exception is reported in abnormal scenarios. For details, see DataFlow Error Codes.
Examples
1 2 3 4 5 | import dataflow as df flow_info = FlowInfo(...) user_data_str = "UserData123" user_data_array = bytearray(user_data_str, 'utf-8') flow_info.set_user_data(user_data_array) |
Constraints
None
Parent topic: dataflow.FlowInfo