get_msg_type

Applicability

Product

Supported

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

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