agentsociety.environment.syncer.syncer

Module Contents

Classes

Data

API

agentsociety.environment.syncer.syncer.__all__

[‘Syncer’]

class agentsociety.environment.syncer.syncer.Syncer(addr: str)

Bases: pycityproto.city.sync.v2.sync_service_pb2_grpc.SyncServiceServicer

Initialization

  • Args:

    • addr (str): The address of the syncer

async init() None
async close() None
__del__()
async SetURL(request: pycityproto.city.sync.v2.sync_service_pb2.SetURLRequest, context: grpc.aio.ServicerContext) pycityproto.city.sync.v2.sync_service_pb2.SetURLResponse

Set the URL of the syncer

async GetURL(request: pycityproto.city.sync.v2.sync_service_pb2.GetURLRequest, context: grpc.aio.ServicerContext) pycityproto.city.sync.v2.sync_service_pb2.GetURLResponse

Get the URL of the syncer

async EnterStepSync(request: pycityproto.city.sync.v2.sync_service_pb2.EnterStepSyncRequest, context: grpc.aio.ServicerContext) pycityproto.city.sync.v2.sync_service_pb2.EnterStepSyncResponse
async ExitStepSync(request: pycityproto.city.sync.v2.sync_service_pb2.ExitStepSyncRequest, context: grpc.aio.ServicerContext) pycityproto.city.sync.v2.sync_service_pb2.ExitStepSyncResponse
async step(close: bool = False) bool

Directly execute sync step without gRPC call

  • Args:

    • close (bool): Whether to close this participant

  • Returns:

    • bool: Whether this participant needs to be closed