public static Connector CreateConnector(string name, ConnectorTypes connectorType)
        {
            Connector connector = new Connector
            {
                ConnectorType = connectorType,
                Name = name
            };

            return connector;
        }
Exemplo n.º 2
0
        private byte GetLogicConfiguration(Connector connector, HomeDevice homeDevice)
        {
            PinPortConfiguration ppc = connector.GetPinPortConfiguration(homeDevice);
            byte res = 0x00;
            if (ppc.Output)
                res |= (byte)(0x01 << 3);
            if (ppc.DefaultValueD)
                res |= (byte)(0x01 << 2);
            res |= (byte)ppc.ChangeTypeD;

            return res;
        }