コード例 #1
0
        public static Connector CreateConnector(string name, ConnectorTypes connectorType)
        {
            Connector connector = new Connector
            {
                ConnectorType = connectorType,
                Name = name
            };

            return connector;
        }
コード例 #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;
        }