Ejemplo n.º 1
0
    def write_bytes(
            self,
            frame_bytes,
            timeout=10):
        # type: (bytes, float) -> None
        """Write a list of raw bytes (frame data).

        The raw bytes encode one or more frames using the Raw Frame Format.

        Args:
            frame_bytes(bytes): Frames to transmit.
            timeout(float): The time in seconds to wait for number to read
                frame bytes to become available.

                If 'timeout' is positive, this function waits up to that 'timeout'
                for space to become available in queues. If the space is not
                available prior to the 'timeout', a 'timeout' error is returned.

                If 'timeout' is 'constants.TIMEOUT_INFINITE', this functions
                waits indefinitely for space to become available in queues.

                If 'timeout' is 'constants.TIMEOUT_NONE', this function does not
                wait and immediately returns with a 'timeout' error if all data
                cannot be queued. Regardless of the 'timeout' used, if a 'timeout'
                error occurs, none of the data is queued, so you can attempt to
                call this function again at a later time with the same data.
        """
        _funcs.nx_write_frame(self._handle, bytes(frame_bytes), timeout)
Ejemplo n.º 2
0
    def write_bytes(self, frame_bytes):
        """Write a list of raw bytes (frame data).

        The raw bytes encode one or more frames using the Raw Frame Format.

        Args:
            frame_bytes: List of bytes, representing frames to transmit.
        """
        _funcs.nx_write_frame(self._handle, bytes(frame_bytes),
                              constants.TIMEOUT_NONE)
Ejemplo n.º 3
0
 def write_bytes(self, frame_bytes):
     "http://zone.ni.com/reference/en-XX/help/372841N-01/nixnet/nxwriteframe/"
     _funcs.nx_write_frame(self._handle, bytes(frame_bytes),
                           constants.TIMEOUT_NONE)
Ejemplo n.º 4
0
 def write_bytes(self, frame_bytes, timeout=10):
     "http://zone.ni.com/reference/en-XX/help/372841N-01/nixnet/nxwriteframe/"
     _funcs.nx_write_frame(self._handle, bytes(frame_bytes), timeout)