VISADecodable

public protocol VISADecodable

A type that can be decoded from a NI-VISA ASCII message.

  • decode(visaString:with:) Extension method

    Decodes the NI-VISA ASCII message using the given decoder.

    Throws

    If the value could not be decoded.

    Declaration

    Swift

    public func decode<D>(visaString string: String, with decoder: D) throws -> Self where Self == D.DecodingType, D : VISADecoder

    Parameters

    string

    The ASCII message to decode.

    decoder

    The decoder to use.

    Return Value

    The decoded value.

  • decode(visaString:) Extension method

    Decodes the NI-VISA ASCII message using the default decoder for this type.

    Throws

    If the value could not be decoded.

    Declaration

    Swift

    public func decode(visaString string: String) throws -> Self

    Parameters

    string

    The ASCII message to decode.

    Return Value

    The decoded value.

  • init(visaString:decoder:) Extension method

    Creates a new value by decoding a NI-VISA ASCII message using the given decoder.

    Throws

    If the value could not be decoded.b

    Declaration

    Swift

    public init<D>(visaString string: String, decoder: D) throws where Self == D.DecodingType, D : VISADecoder

    Parameters

    string

    The ASCII message to decode.

    decoder

    The decoder to use.

    Return Value

    The decoded value.

  • init(visaString:) Extension method

    Creates a new value by decoding a NI-VISA ASCCI message using the default decoder.

    Throws

    If the value could not be decoded.

    Declaration

    Swift

    public init(visaString string: String) throws

    Parameters

    string

    The ASCII message to decode.