get_msg_type

Applicable Products

Product

Supported

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Function Description

Obtains the registered message type based on the type definition.

Prototype

1
get_msg_type(clz)

Parameters

Parameter

Data Type

Value 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