Skip to content

FXI implementation #27

@mrakitin

Description

@mrakitin
    ...
    async def _get_current_dataset(self, *args, **kwargs):  # pylint: disable=unused-argument
        # , frame, external_pv="enc1"):
        # client_context = Context()
        # (pvobject,) = await client_context.get_pvs(self._external_pvs[external_pv])
        # print(f"{pvobject = }")
        # # pvobject = pvobjects[0]
        # ret = await pvobject.read()

        if self.dev_type.value == DevTypes.ZEBRA.value:
            pvnames = {"enc1": "enc1_pi_r", "zebra_time": "zebra_time"}
        else:
            pvnames = {"i0": "i0", "im": "im", "it": "it", "sis_time": "sis_time"}

        dataset = {}
        for pvname, alias in pvnames.items():
            dataset[alias] = getattr(self, pvname).value

        print(f"{now()}:\n{dataset}")

        return dataset
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions