Ejemplo n.º 1
0
        public int GetZigBeeNodeMode()
        {
            ZB_READ_CONFIGURATION_RSP response = (ZB_READ_CONFIGURATION_RSP)SendSynchronous(new ZB_READ_CONFIGURATION(ZB_WRITE_CONFIGURATION.CONFIG_ID.ZCD_NV_LOGICAL_TYPE));

            if (response != null && response.Status == 0)
            {
                return(response.Value[0]);
            }
            else
            {
                return(-1);
            }
        }
Ejemplo n.º 2
0
        public ZigBeeKey GetZigBeeNetworkKey()
        {
            ZB_READ_CONFIGURATION_RSP response = (ZB_READ_CONFIGURATION_RSP)SendSynchronous(new ZB_READ_CONFIGURATION(ZB_WRITE_CONFIGURATION.CONFIG_ID.ZCD_NV_PRECFGKEY));

            if (response != null && response.Status == 0)
            {
                byte[] data = new byte[16];

                Array.Copy(response.Value, data, 16);

                return(new ZigBeeKey(data));
            }
            else
            {
                Log.Error("Error reading zigbee network key: {Status}" + response.Status);
                return(null);
            }
        }