get_msg_type
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Obtains the registered message type based on the type definition.
Prototype
1 | get_msg_type(clz) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
clz |
Type definition |
Type definition, such as int, str, or customized class. |
Returns
ID of the registered message type. If no message type is registered, None is returned.
Examples
1 2 3 4 5 6 | import dataflow as df class TestClass(): def __init__(self, name, val): self.name = name self.val = val msg_type = df.msg_type_register.get_msg_type(TestClass) |
Constraints
None
Parent topic: dataflow.MsgTypeRegister