DefaultVISABoolDecoder

public struct DefaultVISABoolDecoder : VISADecoder

The default VISADecoder for Bool.

This decoder tries to convert the ASCII message into a boolean.

  • Declaration

    Swift

    public typealias DecodingType = Bool
  • Decodes the NI-VISA ASCII message into a Bool.

    Throws

    If the message could not be converted to a boolean.

    Declaration

    Swift

    public func decode(_ string: String) throws -> Bool

    Parameters

    string

    The ASCII message returned from the instrument.

    Return Value

    The message converted to a boolean.