Esempio n. 1
0
        public XmlOldGpib()
        {
            xmlNode = new SelfManagedXmlElement("GPIB");

            systemControllerElement = new BooleanXmlElement("SystemController", true);
            xmlNode.AddChild(systemControllerElement);

            boardIndexElement = new IntegerXmlElement("BoardIndex", 0);
            xmlNode.AddChild(boardIndexElement);

            boardPrimaryAddressElement = new IntegerXmlElement("BoardPrimaryAddress", 0);
            xmlNode.AddChild(boardPrimaryAddressElement);

            boardSecondaryAddressElement = new IntegerXmlElement("BoardSecondaryAddress", 0); // 0 is NONE
            xmlNode.AddChild(boardSecondaryAddressElement);

            devicePrimaryAddressElement = new IntegerXmlElement("DevicePrimaryAddress", 1);
            xmlNode.AddChild(devicePrimaryAddressElement);

            deviceSecondaryAddressElement = new IntegerXmlElement("DeviceSecondaryAddress", 0); // 0 is NONE
            xmlNode.AddChild(deviceSecondaryAddressElement);

            isEoiElement = new BooleanXmlElement("IsEOI", true);
            xmlNode.AddChild(isEoiElement);

            isEosElement = new BooleanXmlElement("IsEOS", false);
            xmlNode.AddChild(isEosElement);

            eightBitEosElement = new BooleanXmlElement("EightBitEOS", false);
            xmlNode.AddChild(eightBitEosElement);

            eosCharElement = new IntegerXmlElement("EowChar", 0);
            xmlNode.AddChild(eosCharElement);
        }
Esempio n. 2
0
        public XmlOldTcpIp()
        {
            xmlNode = new SelfManagedXmlElement("TcpIp");

            hostNameElement = new StringXmlElement("Hostname", "localhost");
            xmlNode.AddChild(hostNameElement);

            portElement = new IntegerXmlElement("Port", 4000);
            xmlNode.AddChild(portElement);
        }
Esempio n. 3
0
        public XmlOldSerial()
        {
            xmlNode = new SelfManagedXmlElement("SerialPort");

            portNameElement = new StringXmlElement("PortName", "COM1");
            xmlNode.AddChild(portNameElement);

            baudRateElement = new IntegerXmlElement("BaudRate", 19200);
            xmlNode.AddChild(baudRateElement);

            parityElement = new EnumXmlElement<Parity>("Parity", Parity.None);
            xmlNode.AddChild(parityElement);

            dataBitsElement = new IntegerXmlElement("DataBits", 7);
            xmlNode.AddChild(dataBitsElement);

            stopBitsElement = new EnumXmlElement<StopBits>("StopBit", StopBits.One);
            xmlNode.AddChild(stopBitsElement);

            separatorElement = new StringXmlElement("Separator", "\\LF");
            xmlNode.AddChild(separatorElement);
        }