seo – Google search console address change: 301 redirect failure of the home page test

I'm trying to change the address of my site on the search console and I can not …

The console returned an error: "301-redirect from the home page: can not retrieve the page http://myoldwebsite.example "

  • The verification for both sites is OK!
  • I've implemented 301 redirect on my old website and works for ALL pages …

What is the problem?
Thanks for your help.enter the description of the image here

data – How to store a test in memory in a Spring Boot application?

I have a spring start app, which simply does, takes a set of characters and enumerates possible English words.
Now, as everyone knows, it's pretty easy to create a three-data structure to load a dictionary.

Now, the problem is, say, 170,000 words in the English dictionary, you have to be in memory, how can I do it?

I've mostly used databases in memory like H2 with Spring Boot, but I'm not sure how to save a file in a database.

Other caches (like redis) store the key-value data structure, since sorting is not a key-value pair, I do not know how to store it.

Any suggestion would be welcome.

google sheets – Multiple IF (AND) statements to determine whether a test succeeds

I use Google sheets to try to generate a positive / negative result in a cell based on two different parameters;

If (R2) is less than 85% AND (I2) is equal to "T1", "T2 or" T3 ", a failure is necessary.

likewise for the same cell;

If (R2) is less than 95% AND (I2) is equal to "Broker Audit", a failure is necessary.

My problem is that if it is a broker audit and less than 95%, I need a failure. However, if it is a T2 or T3 T1 audit, it must fail at 85%. Can I put this together?

javascript – I have a problem with the reporter when I try to run the test cases in the Microsoft browser. I receive an error

Thank you for contributing an answer to Stack Overflow!

  • Please make sure to respond to the question. Provide details and share your research!

But to avoid

  • Ask for help, clarification, or answer other answers.
  • Make statements based on the opinion; save them with references or personal experience.

To learn more, read our tips for writing good answers.

Test plan for the Android team

I plan to implement tests in my company for our Android apps.

We have 2-3 applications, 3 developers, 1 QA.

I hope everyone can start learning to write tests and use test tools. Our QA can not encode.

Let me share the flow that I came up with:

1) Three amigos (Product owner, QA and dev) meet and define the specifications

2) Developers write the program using TDD (Test Driven Development). Along the way, they make sure to handle the cases of tests written in specification with:

a. Unit tests (for example, a phone number starting with 08) with Junit

b. Integration tests (for example, adding a "phone" to the database also creates a "client" entity) with the help of Junit and Mockito

vs. and user interface tests (for example, when you click the "Contacts" button, it displays "ContactsFragment" with Espresso.

3) In the meantime, QA has already written the complete end-to-end test sheet and has verified it once the devs are complete. I really want this phase to be as automated as possible.

Now my questions are:

1) What do you think about this plan? (how do / do you do it?)

2) For our quality assurance, are there tools to automate end-to-end testing without writing code? I have only found MonkeyRunner up until now.

Can someone test the registration process at InnoHostings? Can not save anything

Hello,

I'm trying to register with Innohosting, but their registration process seems interrupted. He continues to repeat the process of domain selection …

Can anyone else test it for me please? I see that when submitting the form, the console log shows:

http://prntscr.com/pikdvw

I already informed them Friday, but they have not done so yet.

security – Websites that test the IPv6 DNS server that I use?

DNS hijacking worries me when I am connected to a DNS server with an IPv6 address.

Is there a website that is testing the IPv6 DNS server I'm using?

By "IPv6 DNS server", I am not talking about IPv4 DNS servers that resolve IPv6 addresses, but DNS servers that accept connections to an IPv6 address.

DNSLeakTest.com detects only IPv4 DNS leaks.

sound – the speaker test returns the 6 channels to the front speakers

OS: KUBUNTU 19.04
Sound card: Creative Soundblaster ZxR
Sound configuration: front (left / right), center, bass, rear (left / right)

My problem is that all the speaker outputs are read by the front speakers.

I did the following:

  • Set the speaker configuration in its plasma settings to "Analog 5.1 Surround Output + Analog Stereo Input"
  • If I click on one of the rear speakers to test the audio output, they are played back on the front speakers. The configuration seems very defective:
    • right rear: left and right front out at the same time
    • left rear: exit at the front left and right at the same time
    • center: exit left and right at the same time
    • left front: exit on the front left (one of the two correct speakers)
    • right front: right front output (one of the two correct speakers)
  • I then executed alsamixer and noticed that my NVIDIA graphics card was initially selected. I've switched with F6 on my ZxR and I configured it as follows:
    enter the description of the image here
  • I ran speaker-test -Dplug:surround51 -c6 -twav. An error message appeared and I was unable to execute the following command: Error opening device: -2
  • I've searched on Google how to set the default device and that's what I've done. cat /proc/asound/cards:
 0 (NVidia         ): HDA-Intel - HDA NVidia
                      HDA NVidia at 0xdf080000 irq 17
 1 (Creative       ): HDA-Intel - HDA Creative
                      HDA Creative at 0xdf204000 irq 19

with kate ~/.asoundrc I set my default device:

defaults.pcm.card 1
defaults.ctl.card 1
defaults.timer.card 1
  • after a reboot speaker-test -Dplug:surround51 -c6 -twav worked: the left rear output is unfortunately at the front left, the right rear output at the front right, the center seems to be on both front speakers (left / right)

Does anyone have any idea of ​​how I can solve this problem?

penetration test – nmap: same IP address, different domain names, different results?

I scan a network (whose name will not be indicated). It has> 1 IP addresses. When I tried to analyze its subdomains, several subdomains are translated into the same IP address but return different scan reports (such as different ports being reported).

For example:

nmap subdomain1
nmap subdomain2
nmap i.p.v.4
# The IPv4 that both subdomains translate to

nmap subdomain1 -A -p-
nmap subdomain2 -A -p-
nmap i.p.v.4 -A -p-
# This also returns different results

These 3 all return results from different ports.

From what I know, the URL / domain name should simply be translated into IP and then scanned. So I think that they should all return the same results.

Why are different results being returned? Is it because of the domain translation (something I missed?) Or is it something else?

In addition, if I get the IP address of a domain and its subdomains with the same IP address, should I just scan the IP address (save time and resources) or should I also analyze each subdomain?

c # – Implementation of SCPI for control of test instruments

I work with electronic test equipment. I like being able to automate testing with the help of their remote control interfaces. I've built a template, some basic classes, that I can apply to all devices that follow the SCPI protocol. I would like to avoid implementing half of the implementation like every time. I do not want to bite the bullet and do it the right way once and for all. I do not use LabView, so I can not download their drivers.

I've released something that brought me closer, but it's not all the way. If it sounds like crazy ramblings, ignore it. Any pointer to the right design template will really help!

I designed it as you see it because I want usability to be nice and clean like:

double instantaneousCurrent = instrument.Measurement.Current.Instantaneous.Get();

or

double powerSetPoint = double.Parse(Console.ReadLine());
instrument.Load.ConstantPower.Set(powerSetPoint);

Ideally, each node of your statement would put your statement in a different form "" deeper object instrument.

Code:

Base class SCPI, BaseClass, Subsystem, and SystemProperty BaseClass:

/// 
/// Provides serial object creation services and ensures the correct device is on the other end.
/// 
public abstract class ScpiDeviceBaseClass : IDisposable
{
    private List PossibleBaudRates = new List() { 115200, 57600, 38400, 19200, 9600, 4800};

    protected SerialPort serialPort;

    protected string DeviceName;


    #region Constructors

    /// 
    /// Takes the device name and provided serial port and ensures the port is open and the device on the other end responds with the correct identifier.
    /// 
    /// A string that can be used to verify the connected device is the expected one by checking if  is contained in the response to an *IDN? request.
    /// A preconfigured .
    public ScpiDeviceBaseClass(string deviceName, SerialPort port)
    {
        this.DeviceName = deviceName;
        serialPort = port;
        if (!serialPort.IsOpen)
        {
            try
            {
                serialPort.Open();
            }
            catch (UnauthorizedAccessException)
            {
                throw new Exception($"Failed to open {serialPort.PortName} because it was already open elsewhere.");
            }
            catch (Exception ex)
            {
                throw new Exception($"Failed to open {serialPort.PortName}. Reason: rn{ex.Message}");
            }
        }
        serialPort.ReadTimeout = 2000;
        CheckIdn();
    }

    /// 
    /// Takes the device name and provided serial port name (COM Port), creates a  using all possible baud rates until the device responds with a correct identifier.
    /// 
    /// A string that can be used to verify the connected device is the expected one by checking if  is contained in the response to an *IDN? request.
    /// A string with the name of the COM port to be used i.e. "COM12".
    public ScpiDeviceBaseClass(string deviceName, string portName)
    {
        this.DeviceName = deviceName;
        // Make sure the port name given looks valid.
        if (portName == null || portName == "" || !portName.StartsWith("COM"))
        {
            if (portName == null)
            {
                portName = "null";
            }
            else if (portName == "")
            {
                portName = "blank";
            }
            throw new Exception($"Unable to connect to {DeviceName}. Bad port provided. Port provided was {portName}.");
        }

        ScanSelectedPortWithAllBaudRates(portName);
    }

    /// 
    /// Takes the device name and checks all available COM ports with all possible baud rates until the device responds with the correct identifier.
    /// 
    /// A string that can be used to verify the connected device is the expected one by checking if  is contained in the response to an *IDN? request.
    /// An optional parameter that can be used to shorten the list of possible combinations to check.
    public ScpiDeviceBaseClass(string deviceName, int baudRate = -1)
    {
        this.DeviceName = deviceName;

        if (baudRate != -1)
        {
            ScanPortsWithSelectedBaudRate(baudRate);
        }
        else
        {
            ScanAllPortsWithAllBaudRates();
        }

    }

    /// 
    /// Ensures the device can respond with the current serial port configuration and that the response contains the expected response.
    /// 
    private void CheckIdn()
    {
        int tries = 0;
        // Try to read the identification of the device connected and ensure it is the device expected.
        try
        {
            while (true)
            {
                try
                {
                    ReadUntilInBufferEmpty();
                    serialPort.WriteLine("*IDN?");
                    string idn = serialPort.ReadLine();
                    if (!idn.Contains(DeviceName))
                    {
                        throw new Exception($"Identification request returned "{idn}". Are you connected to the correct com port?");
                    }
                    return;
                }
                catch (Exception)
                {
                    if (tries > 3)
                    {
                        throw; 
                    }
                }
                tries++;
            }
        }
        catch (Exception ex)
        {
            if (ex is TimeoutException)
            {
                throw new Exception($"Connection to {DeviceName} failed due to read timeout.");
            }
            else if (ex is InvalidOperationException)
            {
                throw new Exception($"Error connecting to {DeviceName}. Error: " + ex.Message);
            }
            else
            {
                throw;
            }
        }
    }

    /// 
    /// Loops through all available COM ports and tries to connect using the specified baud rate.
    /// 
    /// The baud rate to check each COM port with.
    private void ScanPortsWithSelectedBaudRate(int baudRate)
    {
        string() ports = SerialPort.GetPortNames();
        if (ports.Count() == 0)
        {
            throw new Exception($"No com ports found to connect to {DeviceName}.");
        }

        // Try all ports using the specified baud rate.
        for (int i = 0; i < ports.Count(); i++)
        {
            try
            {
                serialPort = new SerialPort(ports(0), baudRate);
                serialPort.DtrEnable = true;
                serialPort.RtsEnable = true;
                serialPort.Open();
                serialPort.ReadTimeout = 2000;
                CheckIdn();
                return ;
            }
            catch (Exception)
            {
                if (i == ports.Count() - 1)
                {
                    throw;
                }
            }
        }
    }

    /// 
    /// Loops through all available COM ports and tries to connect with all possible baud rates.
    /// 
    private void ScanAllPortsWithAllBaudRates()
    {
        string() ports = SerialPort.GetPortNames();
        if (ports.Count() == 0)
        {
            throw new Exception($"No com ports found to connect to {DeviceName}.");
        }

        // Try all ports with any baud rate.
        for (int i = 0; i < ports.Count(); i++)
        {
            try
            {
                // Try all possible baud rates on this port.
                for (int j = 0; j < PossibleBaudRates.Count; j++)
                {
                    try
                    {
                        int baud = PossibleBaudRates(j);
                        serialPort = new SerialPort(ports(0), baud);
                        serialPort.DtrEnable = true;
                        serialPort.RtsEnable = true;
                        serialPort.Open();
                        serialPort.ReadTimeout = 2000;
                        CheckIdn();
                        break;
                    }
                    catch (Exception)
                    {
                        serialPort.Dispose();
                        serialPort = null;
                    }
                }
                if (serialPort == null)
                {
                    throw new Exception("Failed to connect to device.");
                }
                break;
            }
            catch (Exception)
            {
                if (i == ports.Count() - 1)
                {
                    throw;
                }
            }
        }
    }

    /// 
    /// Loops through all possible baud rates and tries to connect on the specified COM port.
    /// 
    /// 
    private void ScanSelectedPortWithAllBaudRates(string portName)
    {
        // Try all possible baud rates on this port.
        for (int j = 0; j < PossibleBaudRates.Count; j++)
        {
            try
            {
                int baud = PossibleBaudRates(j);
                serialPort = new SerialPort(portName, baud);
                serialPort.DtrEnable = true;
                serialPort.RtsEnable = true;
                serialPort.Open();
                serialPort.ReadTimeout = 2000;
                CheckIdn();
                break;
            }
            catch (Exception)
            {
                serialPort.Dispose();
                serialPort = null;
            }
        }
        if (serialPort == null)
        {
            throw new Exception("Failed to connect to device.");
        }
    }

    #endregion Constructors


    /// 
    /// Read the comport until we are sure it is empty.
    /// By reading the com port until we get a read timeout three times in a row we can feel confident there is no more data left to be read.
    /// 
    private void ReadUntilInBufferEmpty()
    {
        int previousReadTimeout = serialPort.ReadTimeout;
        serialPort.ReadTimeout = 100;
        int timeoutExceptions = 0;
        while (timeoutExceptions < 3)
        {
            try
            {
                serialPort.ReadLine();
                // If the read does not fail we reset the counter.
                timeoutExceptions = 0;
            }
            catch (TimeoutException)
            {
                // If the exception thrown is a timeout exception we increment the exception counter and then read again if we are not over the try limit of 3.
                timeoutExceptions++;
            }
            catch (Exception)
            {
                serialPort.ReadTimeout = previousReadTimeout;
                // If the exception thrown is not a read timeout exception we want to throw it up.
                throw;
            }
        }
        serialPort.ReadTimeout = previousReadTimeout;
    }


    public void Dispose()
    {
        if (this.serialPort != null)
        {
            this.serialPort.Dispose();
            this.serialPort = null;
        }
    }

    /// 
    /// Used to represent all nodes in an SCPI command tree that are not leafs.
    /// This makes the case where a non-leaf node is a request clunky. How can I fix this?
    /// 
    public abstract class DeviceSubsystem
    {
        // Used to quickly identify a root node.
        protected bool IsRoot
        {
            get
            {
                if (this.Parent == null)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }
        // The parent of this node.
        protected DeviceSubsystem Parent;
        // This nodes children.
        protected List Children;
        // This node's name.
        protected string NodeName;
        // The serial port to use.
        protected SerialPort ComPort;

        public DeviceSubsystem(string nodeName, DeviceSubsystem parent, SerialPort comPort)
        {
            NodeName = nodeName;
            Parent = parent;
            ComPort = comPort;
            Children = new List();
        }

        /// 
        /// Used to represent all nodes in the SCPI command tree that are leafs.
        /// This leaf can be written to and read from.
        /// 
        /// The  of this leaf.
        public abstract class SubSystemProperty : SubSystemPropertyBase, SubSystemReader, SubSystemWritter
        {
            /// 
            /// Creates a leaf node that can read and write.
            /// 
            /// The name of the node. This is used to create commands so it must match the exact text the device expects at this node.
            /// This nodes  parent.
            /// Indicates that this is not really a leaf, but rather the request implementation of a . Some non-leaf nodes are also requests. The current implementation does not handle this case gracefully. This is a hack.
            public SubSystemProperty(string name, DeviceSubsystem parent, bool isRootResquest = false) : base(name, parent, isRootResquest)
            {
            }

            public PropertyType Get()
            {
                string response = GetString(Name);
                return ConvertToType(response);
            }

            public void Set(PropertyType value)
            {
                string valueString = value.ToString();
                // If the value is a bool we need to represent it differently.
                if (value.GetType() == typeof(bool))
                {
                    bool boolValue = bool.Parse(valueString);
                    if (boolValue == true)
                    {
                        valueString = "1";
                    }
                    else
                    {
                        valueString = "0";
                    }
                }

                SetString(this.Name, valueString);
            }
        }

        /// 
        /// Used to represent all nodes in the SCPI command tree that are leafs.
        /// This leaf can only be read from.
        /// 
        /// The  of this leaf.
        public abstract class SubsytemPropertyReadonly : SubSystemPropertyBase, SubSystemReader
        {
            /// 
            /// Creates a leaf node that can read.
            /// 
            /// The name of the node. This is used to create commands so it must match the exact text the device expects at this node.
            /// This nodes  parent.
            /// Indicates that this is not really a leaf, but rather the request implementation of a . Some non-leaf nodes are also requests. The current implementation does not handle this case gracefully. This is a hack.
            public SubsytemPropertyReadonly(string name, DeviceSubsystem parent, bool isRootResquest = false) : base(name, parent, isRootResquest)
            {
            }

            public PropertyType Get()
            {
                string response = GetString(Name);
                return ConvertToType(response);
            }
        }

        /// 
        /// Used to represent all nodes in the SCPI command tree that are leafs.
        /// This leaf can only be written to.
        /// 
        /// The  of this leaf.
        public abstract class SubSystemPropertyWriteOnly : SubSystemPropertyBase, SubSystemWritter
        {
            /// 
            /// Creates a leaf node that can write.
            /// 
            /// The name of the node.
            /// This nodes  parent.
            /// Indicates that this is not really a leaf, but rather the request implementation of a . Some non-leaf nodes are also requests. The current implementation does not handle this case gracefully. This is a hack.
            public SubSystemPropertyWriteOnly(string name, DeviceSubsystem parent, bool isRootResquest = false) : base(name, parent, isRootResquest)
            {
            }

            public void Set(PropertyType value)
            {
                string valueString = value.ToString();
                if (value.GetType() == typeof(bool))
                {
                    bool boolValue = bool.Parse(valueString);
                    if (boolValue == true)
                    {
                        valueString = "1";
                    }
                    else
                    {
                        valueString = "0";
                    }
                }

                SetString(this.Name, valueString);
            }
        }

        /// 
        /// Provides the ability to write to leafs.
        /// 
        /// The  of this leaf.
        public interface SubSystemWritter
        {
            void Set(PropertyType value);
        }

        /// 
        /// Provides the ability to read from leafs.
        /// 
        /// The  of this leaf.
        public interface SubSystemReader
        {
            PropertyType Get();
        }

        /// 
        /// Provides the basic leaf functionality.
        /// 
        /// The  of this leaf.
        public abstract class SubSystemPropertyBase
        {
            protected string Name;
            protected DeviceSubsystem Parent;

            /// 
            /// Creates the base leaf node. It can neither read nor write.
            /// 
            /// The name of the node. This is used to create commands so it must match the exact text the device expects at this node.
            /// This nodes  parent.
            /// Indicates that this is not really a leaf, but rather the request implementation of a . Some non-leaf nodes are also requests. The current implementation does not handle this case gracefully. This is a hack.
            public SubSystemPropertyBase(string name, DeviceSubsystem parent, bool isRootResquest = false)
            {
                Parent = parent;

                if (!isRootResquest)
                {
                    // If isRootRequest is false, we just use the provided name.
                    Name = name;
                }
                else
                {
                    // If isRootRequest is true, we use an empty name. This fixes the case where a non-leaf node can make requests. This is a hack.
                    Name = "";
                }
            }

            #region ResponseConversions

            protected PropertyType ConvertToType(string response)
            {
                switch (Type.GetTypeCode(typeof(PropertyType)))
                {
                    case TypeCode.Boolean:
                        {
                            return (PropertyType)Convert.ChangeType(ToBool(response), typeof(PropertyType));
                        }
                    case TypeCode.Int16:
                        {
                            return (PropertyType)Convert.ChangeType(ToInt(response), typeof(PropertyType));
                        }
                    case TypeCode.UInt16:
                        {
                            return (PropertyType)Convert.ChangeType(ToUint(response), typeof(PropertyType));
                        }
                    case TypeCode.Int32:
                        {
                            return (PropertyType)Convert.ChangeType(ToInt(response), typeof(PropertyType));
                        }
                    case TypeCode.UInt32:
                        {
                            return (PropertyType)Convert.ChangeType(ToUint(response), typeof(PropertyType));
                        }
                    case TypeCode.Double:
                        {
                            return (PropertyType)Convert.ChangeType(ToDouble(response), typeof(PropertyType));
                        }
                    case TypeCode.String:
                        {
                            return (PropertyType)Convert.ChangeType(response, typeof(PropertyType));
                        }
                    default:
                        throw new Exception($"Invalid type of '{typeof(PropertyType).Name}' specified in SubsytemProperty.");
                }
            }

            private bool ToBool(string response)
            {
                if (response == null || response == "")
                {
                    MethodBase method = System.Reflection.MethodBase.GetCurrentMethod();
                    throw new ArgumentException($"Null or empty value passed to {method.Name}.");
                }

                if (response == "0")
                {
                    return false;
                }
                else if (response == "1")
                {
                    return true;
                }
                else
                {
                    MethodBase method = System.Reflection.MethodBase.GetCurrentMethod();
                    throw new ArgumentException($"Invalid value of '{response}' passed to {method.Name}.");
                }
            }

            private double ToDouble(string response)
            {
                if (response == null || response == "")
                {
                    MethodBase method = System.Reflection.MethodBase.GetCurrentMethod();
                    throw new ArgumentException($"Null or empty value passed to {method.Name}.");
                }

                if (double.TryParse(response, out double value))
                {
                    return value;
                }
                else
                {
                    MethodBase method = System.Reflection.MethodBase.GetCurrentMethod();
                    throw new ArgumentException($"Invalid value of '{response}' passed to {method.Name}.");
                }
            }

            private int ToInt(string response)
            {
                if (response == null || response == "")
                {
                    MethodBase method = System.Reflection.MethodBase.GetCurrentMethod();
                    throw new ArgumentException($"Null or empty value passed to {method.Name}.");
                }

                if (int.TryParse(response, out int value))
                {
                    return value;
                }
                else
                {
                    MethodBase method = System.Reflection.MethodBase.GetCurrentMethod();
                    throw new ArgumentException($"Invalid value of '{response}' passed to {method.Name}.");
                }
            }

            private uint ToUint(string response)
            {
                if (response == null || response == "")
                {
                    MethodBase method = System.Reflection.MethodBase.GetCurrentMethod();
                    throw new ArgumentException($"Null or empty value passed to {method.Name}.");
                }

                if (uint.TryParse(response, out uint value))
                {
                    return value;
                }
                else
                {
                    MethodBase method = System.Reflection.MethodBase.GetCurrentMethod();
                    throw new ArgumentException($"Invalid value of '{response}' passed to {method.Name}.");
                }
            }

            #endregion ResponseConversions

            #region Messaging

            protected string GetString(string command)
            {
                string fullCommand = CreateFullCommand(command);
                Write(fullCommand);
                string response = Read();
                return response;
            }

            protected void SetString(string command, string value)
            {
                string fullCommand = CreateFullCommand(command, value);
                Write(fullCommand);
            }

            private string ConvertBoolToValue(bool boolValue)
            {
                if (boolValue == true)
                {
                    return "1";
                }
                else
                {
                    return "0";
                }
            }

            private string CreateFullCommand(string command, string value = null)
            {
                StringBuilder sb = new StringBuilder();
                // Get the path from this subsystem to the root. This is used to create the full command string.
                List pathToRoot = new List();
                DeviceSubsystem currentSubSystem = this.Parent;
                // starting from the subsystem we are in check to see if we are at the root, if no look at our parent.
                while (true)
                {
                    pathToRoot.Add(currentSubSystem);
                    if (currentSubSystem.IsRoot)
                    {
                        break;
                    }
                    else
                    {
                        currentSubSystem = currentSubSystem.Parent;
                    }
                }

                // Reverse the list so we go from root to the node of interest.
                pathToRoot.Reverse();
                foreach (DeviceSubsystem subsystem in pathToRoot)
                {
                    sb.Append($":{subsystem.NodeName}");
                }

                // Add our command to the end of our request.
                if (value == null)
                {
                    // if the value param is null this is a request for data
                    sb.Append($":{command}?");
                }
                else
                {
                    // if the value param is not null we are sending information to be set
                    sb.Append($":{command} {value}");
                }

                return sb.ToString();
            }

            private void Write(string message)
            {
                int tries = 0;
                while (true)
                {
                    try
                    {
                        this.Parent.ComPort.WriteLine(message);
                        break;
                    }
                    catch (Exception)
                    {
                        tries++;
                        if (tries > 3)
                        {
                            throw;
                        }
                    }
                }
            }

            private string Read()
            {
                int tries = 0;
                while (true)
                {
                    try
                    {
                        string response = this.Parent.ComPort.ReadLine();
                        return response;
                    }
                    catch (Exception)
                    {
                        tries++;
                        if (tries > 3)
                        {
                            throw;
                        }
                    }
                }
            }

            #endregion Messaging
        }
    }
}

Implementation:

public class TestInstrument : ScpiDeviceBaseClass
{
    #region Constructors

    public MeasurmentsSubSystem Measurement;
    public LoadSubSystem Load;

    public TestInstrument(SerialPort port) : base("TestInstrumentIdentifier", port)
    {
        ConstructSystemRootNodes();
    }

    public TestInstrument(string portName) : base("TestInstrumentIdentifier", portName)
    {
        ConstructSystemRootNodes();
    }

    public TestInstrument() : base("TestInstrumentIdentifier", 57600)
    {
        ConstructSystemRootNodes();
    }

    /// 
    /// Handles the construction of all root subsystem nodes.
    /// 
    private void ConstructSystemRootNodes()
    {
        Measurement = new MeasurmentsSubSystem("Measure", null, this.serialPort);
        Load = new LoadSubSystem("Load", null, this.serialPort);
    }

    #endregion Constructors

    /// 
    /// Represents the measurements subsystem.
    /// 
    public class MeasurmentsSubSystem : DeviceSubsystem
    {
        #region Nodes

        /// 
        /// The sub-subsystem of measurements, the current measurement subsystem.
        /// 
        public CurrentMeasurements Current;

        #endregion Nodes

        #region Constructors

        /// 
        /// Constructs this subsystem.
        /// 
        /// The node name is used to construct commands sent to the device.
        /// This subsystem's parent subsystem. Null if this is a root node.
        /// The serial port used to communicate with the device.
        public MeasurmentsSubSystem(string nodeName, DeviceSubsystem parent, SerialPort serialPort) : base(nodeName, parent, serialPort)
        {
            ConstructChildren();
            ConstructLeafs();
        }

        /// 
        /// Used to construct all non-leaf nodes below this subsystem.
        /// 
        protected override void ConstructChildren()
        {
            this.Children.Add(Current = new CurrentMeasurements("Current", this, this.serialPort));
        }

        /// 
        /// Used to construct all leaf nodes directly below this subsystem.
        /// 
        protected override void ConstructLeafs()
        {

        }

        #endregion Constructors

        #region DeviceSubsystem Node Definitions

        /// 
        /// Represents the subsystem responsible for current measurement.
        /// 
        public class CurrentMeasurements : DeviceSubsystem
        {
            #region Nodes

            /// 
            /// The Amplitude measurement subsystem.
            /// 
            public AmplitudeMeasurements Amplitude;
            /// 
            /// Used to access the instantaneous current measurement.
            /// 
            public Instantaneous instantaneous;

            #endregion Nodes

            #region Constructors

            /// 
            /// Constructs this subsystem.
            /// 
            /// The node name is used to construct commands sent to the device.
            /// This subsystem's parent subsystem. Null if this is a root node.
            /// The serial port used to communicate with the device.
            public CurrentMeasurements(string nodeName, DeviceSubsystem parent, SerialPort serialPort) : base(nodeName, parent, serialPort)
            {
                ConstructChildren();
                ConstructLeafs();
            }

            /// 
            /// Used to construct all non-leaf nodes below this subsystem.
            /// 
            protected override void ConstructChildren()
            {
                this.Children.Add(Amplitude = new AmplitudeMeasurements("Amplitude", this, this.serialPort));
            }

            /// 
            /// Used to construct all leaf nodes directly below this subsystem.
            /// 
            protected override void ConstructLeafs()
            {
                instantaneous = new Instantaneous(this);
            }

            #endregion Constructors

            #region DeviceSubsystem Node Definitions

            public class AmplitudeMeasurements : DeviceSubsystem
            {
                #region Nodes

                public Hold hold;
                public Max max;

                #endregion Nodes

                #region Constructors

                public AmplitudeMeasurements(string nodeName, DeviceSubsystem parent, SerialPort comPort) : base(nodeName, parent, comPort)
                {
                    ConstructChildren();
                    ConstructLeafs();
                }

                /// 
                /// Used to construct all non-leaf nodes below this subsystem.
                /// 
                protected override void ConstructChildren()
                {

                }

                /// 
                /// Used to construct all leaf nodes directly below this subsystem.
                /// 
                protected override void ConstructLeafs()
                {
                    hold = new Hold(this);
                    max = new Max(this);
                }

                #endregion Constructors

                #region SubSystemProperty Node Definitions

                public class Hold : SubSystemProperty
                {
                    public Hold(DeviceSubsystem parent) : base(typeof(Hold).Name, parent) { }
                }

                public class Max : SubSystemProperty
                {
                    public Max(DeviceSubsystem parent) : base(typeof(Max).Name, parent) { }
                }

                #endregion SubSystemProperty Node Definitions
            }

            #endregion DeviceSubsystem Node Definitions

            #region SubsytemProperty Node Definitions

            public class Instantaneous : SubsytemPropertyReadonly
            {
                public Instantaneous(DeviceSubsystem parent) : base(typeof(Instantaneous).Name, parent, true) { }
            }

            #endregion SubsytemProperty Node Definitions
        }

        #endregion DeviceSubsystem Node Definitions
    }

    public class LoadSubSystem : DeviceSubsystem
    {
        #region Nodes

        public Status status;

        #endregion Nodes

        #region Constructors

        public LoadSubSystem(string nodeName, DeviceSubsystem parent, SerialPort comPort) : base(nodeName, parent, comPort)
        {
            ConstructChildren();
            ConstructLeafs();
        }

        /// 
        /// Used to construct all non-leaf nodes below this subsystem.
        /// 
        protected override void ConstructChildren()
        {

        }

        /// 
        /// Used to construct all leaf nodes directly below this subsystem.
        /// 
        protected override void ConstructLeafs()
        {
            status = new Status(this);
        }

        #endregion Constructors

        #region SubSystemProperty Node Definitions

        public class Status : SubSystemProperty
        {
            public Status(DeviceSubsystem parent) : base(typeof(Status).Name, parent) { }
        }

        #endregion SubSystemProperty Node Definitions
    }
}