atomiq.components.basics.datasink module

class atomiq.components.basics.datasink.DataSink(*args, **kwargs)[source]

Bases: Component

Represent an abstract data sink and define methods it must provide.

submit_env(point, identifier=None, *args, **kwargs)[source]
submit_data(field_names, values, identifier=None, *args, **kwargs)[source]
Parameters:
  • field_names (TList)

  • values (TList)

class atomiq.components.basics.datasink.RPCPublisherSink(rpc_publisher, topic_prefix='', default_topic='newData', *args, **kwargs)[source]

Bases: DataSink

Represent a data sink that calls an RPC to publish data. What happens to the data strongly depends on the other end of the RPC, i.e. the service that handles the RPC. Examples could be writing to a pubsub service or dumping to a database.

Parameters:
  • rpc_publisher (Component) -- (Component) an RPC device that can handle the function publish()

  • topic_prefix (TStr)

  • default_topic (TStr)

kernel_invariants = {'default_topic', 'rpc_publisher', 'topic_prefix'}
submit_env(point, identifier=None, *args, **kwargs)[source]
submit_data(field_names, values, identifier=None, topic=None)[source]
Parameters:
  • field_names (TList)

  • values (TList)

class atomiq.components.basics.datasink.DatabaseSink(*args, **kwargs)[source]

Bases: DataSink

submit_data(field_names, values, identifier=None, *args, **kwargs)
Parameters:
  • field_names (TList)

  • values (TList)

submit_env(point, identifier=None, *args, **kwargs)
class atomiq.components.basics.datasink.ARTIQDatasetSink(*args, **kwargs)[source]

Bases: DataSink

submit_data(field_names, values, identifier=None, *args, **kwargs)
Parameters:
  • field_names (TList)

  • values (TList)

submit_env(point, identifier=None, *args, **kwargs)