tac.platform.protocols.tac package

Submodules

tac.platform.protocols.tac.message module

This module contains the default message definition.

class tac.platform.protocols.tac.message.TACMessage(tac_type: Optional[tac.platform.protocols.tac.message.TACMessage.Type] = None, **kwargs)

Bases: aea.protocols.base.message.Message

The TAC message class.

class ErrorCode

Bases: enum.Enum

This class defines the error codes.

AGENT_NAME_ALREADY_REGISTERED = 3
AGENT_NAME_NOT_IN_WHITELIST = 7
AGENT_NOT_REGISTERED = 4
AGENT_PBK_ALREADY_REGISTERED = 2
COMPETITION_NOT_RUNNING = 8
DIALOGUE_INCONSISTENT = 9
GENERIC_ERROR = 0
REQUEST_NOT_VALID = 1
TRANSACTION_NOT_MATCHING = 6
TRANSACTION_NOT_VALID = 5
class Type

Bases: enum.Enum

TAC Message types.

CANCELLED = 'cancelled'
GAME_DATA = 'game_data'
GET_STATE_UPDATE = 'get_state_update'
REGISTER = 'register'
STATE_UPDATE = 'state_update'
TAC_ERROR = 'tac_error'
TRANSACTION = 'transaction'
TRANSACTION_CONFIRMATION = 'transaction_confirmation'
UNREGISTER = 'unregister'
check_consistency() → bool

Check that the data is consistent.

protocol_id = 'tac'

tac.platform.protocols.tac.serialization module

Serialization for the TAC protocol.

class tac.platform.protocols.tac.serialization.TACSerializer

Bases: aea.protocols.base.serialization.Serializer

Serialization for the TAC protocol.

decode(obj: bytes) → aea.protocols.base.message.Message

Decode the message.

Parameters

obj – the bytes object

Returns

the message

encode(msg: aea.protocols.base.message.Message) → bytes

Decode the message.

Parameters

msg – the message object

Returns

the bytes

tac.platform.protocols.tac.tac_pb2 module

Module contents

This module contains the support resources for the TAC protocol.