Ejemplo n.º 1
0
 def __init__(self, interface, database_name, cluster_name, frame):
     "http://zone.ni.com/reference/en-XX/help/372841N-01/nixnet/nxcreatesession/"
     flattened_list = _utils.flatten_items(frame)
     SessionBase.__init__(self, database_name, cluster_name, flattened_list,
                          interface,
                          constants.CreateSessionMode.FRAME_OUT_QUEUED)
     self._frames = session_frames.OutFrames(self._handle)
Ejemplo n.º 2
0
    def __init__(
            self,
            interface_name,
            database_name=':memory:',
            cluster_name=''):
        """Create a Frame Input Stream session.

        This function creates a Frame Output Stream session using the named
        references to database objects.

        Args:
            interface_name: A string representing the XNET Interface to use for
                this session.
            database_name: A string representing the XNET database to use for
                interface configuration. The database name must use the <alias>
                or <filepath> syntax (refer to Databases).
            cluster_name: A string representing the XNET cluster to use for
                interface configuration. The name must specify a cluster from
                the database given in the database_name parameter.

        Returns:
            A Frame Output Stream session object.
        """
        flattened_list = _utils.flatten_items(None)
        base.SessionBase.__init__(
            self,
            database_name,
            cluster_name,
            flattened_list,
            interface_name,
            constants.CreateSessionMode.FRAME_OUT_STREAM)
        self._frames = session_frames.OutFrames(self._handle)
Ejemplo n.º 3
0
    def __init__(
            self,
            interface_name,
            database_name,
            cluster_name,
            frame):
        """Create a Frame Output Queued session.

        This function creates a Frame Output Stream session using the named
        references to database objects.

        Args:
            interface_name: A string representing the XNET Interface to use for
                this session.
            database_name: A string representing the XNET database to use for
                interface configuration. The database name must use the <alias>
                or <filepath> syntax (refer to Databases).
            cluster_name: A string representing the XNET cluster to use for
                interface configuration. The name must specify a cluster from
                the database given in the database_name parameter. If it is left
                blank, the cluster is extracted from the 'frame' parameter.
            frame: A string describing one XNET Frame or PDU name. This name
                must be one of the following options, whichever uniquely
                identifies a frame within the database given:

                    -<Frame>
                    -<Cluster>.<Frame>
                    -<PDU>
                    -<Cluster>.<PDU>

        Returns:
            A Frame Output Queued session object.
        """
        flattened_list = _utils.flatten_items(frame)
        base.SessionBase.__init__(
            self,
            database_name,
            cluster_name,
            flattened_list,
            interface_name,
            constants.CreateSessionMode.FRAME_OUT_QUEUED)
        self._frames = session_frames.OutFrames(self._handle)
Ejemplo n.º 4
0
    def __init__(
            self,
            interface_name,  # type: typing.Text
            database_name,  # type: typing.Text
            cluster_name,  # type: typing.Text
            frame,  # type: typing.Text
    ):
        # type: (...) -> None
        """Create a Frame Output Queued session.

        This function creates a Frame Output Stream session using the named
        references to database objects.

        Args:
            interface_name(str): XNET Interface name to use for
                this session.
            database_name(str): XNET database name to use for
                interface configuration. The database name must use the <alias>
                or <filepath> syntax (refer to Databases).
            cluster_name(str): XNET cluster name to use for
                interface configuration. The name must specify a cluster from
                the database given in the database_name parameter. If it is left
                blank, the cluster is extracted from the ``frame`` parameter.
            frame(str): XNET Frame or PDU name. This name
                must be one of the following options, whichever uniquely
                identifies a frame within the database given:

                    - ``<Frame>``
                    - ``<Cluster>.<Frame>``
                    - ``<PDU>``
                    - ``<Cluster>.<PDU>``
        """
        flattened_list = _utils.flatten_items(frame)
        base.SessionBase.__init__(
            self,
            database_name,
            cluster_name,
            flattened_list,
            interface_name,
            constants.CreateSessionMode.FRAME_OUT_QUEUED)
        self._frames = session_frames.OutFrames(self._handle)