// Note: A constructor summary is auto-generated by the doc builder. /// <summary></summary> /// <remarks>This automatically checks that the socket supports Type O, and reserves the pin. /// An exception will be thrown if there is a problem with these checks.</remarks> /// <param name="socket">The analog output capable socket.</param> /// <param name="pin">The pin to assign to the analog output.</param> /// <param name="module">The module using this analog output interface, which can be null if unspecified.</param> public AnalogOutput(Socket socket, Socket.Pin pin, Module module) { this.socket = socket; socket.EnsureTypeIsSupported('O', module); port = socket.AnalogOutput; if (port == null) { // this is a mainboard error but should not happen since we check for this, but it doesnt hurt to double-check throw new Socket.InvalidSocketException("Socket " + socket + " has an error with its Analog Output functionality. Please try a different socket."); } socket.ReservePin(pin, module); }