private void ReadInitialValues()
        {
            LowpanIdentity   = new LowpanIdentity(wpanApi);
            LowpanCredential = new LowpanCredential(wpanApi);
            LowpanScanner    = new LowpanScanner(wpanApi);

            ncpVersion            = wpanApi.GetPropNcpVersion();
            protocolVersion       = wpanApi.GetPropProtocolVersion();
            interfaceType         = (SpinelProtocolType)wpanApi.GetPropInterfaceType();
            vendor                = wpanApi.GetPropVendorId().ToString();
            capabilities          = wpanApi.GetPropCaps();
            supportedChannels     = wpanApi.GetPhyChanSupported();
            networkInterfaceState = wpanApi.GetNetIfUp();
            threadStackState      = wpanApi.GetNetStackUp();
            netRole               = (SpinelNetRole)wpanApi.GetNetRole();
            extendedAddress       = new HardwareAddress(wpanApi.GetMac_15_4_Laddr().bytes);
            hardwareAddress       = new HardwareAddress(wpanApi.GetPropHwaddr().bytes);
            ipAddresses           = NetUtilities.SpinelIPtoSystemIP(wpanApi.GetIPv6AddressTable());

            ipLinkLocal = new IPAddress(wpanApi.GetIPv6LLAddr().bytes);
            ipMeshLocal = new IPAddress(wpanApi.GetIPv6MLAddr().bytes);
            lastStatus  = (SpinelStatus)wpanApi.GetPropLastStatus();
        }
示例#2
0
        private void ReadInitialValues()
        {
            LowpanIdentity   = new LowpanIdentity(wpanApi);
            LowpanCredential = new LowpanCredential(wpanApi);

            ncpVersion        = wpanApi.DoNCPVersion();
            protocolVersion   = wpanApi.DoProtocolVersion();
            interfaceType     = (InterfaceType)wpanApi.DoInterfaceType();
            vendor            = wpanApi.DoVendor();
            capabilities      = wpanApi.DoCaps();
            supportedChannels = wpanApi.DoChannels();
            scanMask          = wpanApi.DoChannelsMask();

            networkInterfaceState = wpanApi.DoInterfaceConfig();
            threadStackState      = wpanApi.DoThread();
            state           = (State)wpanApi.DoState();
            extendedAddress = new HardwareAddress(wpanApi.DoExtendedAddress().bytes);
            hardwareAddress = new HardwareAddress(wpanApi.DoPhysicalAddress().bytes);
            ipAddresses     = NetUtilities.SpinelIPtoSystemIP(wpanApi.DoIPAddresses());

            ipLinkLocal = new IPv6Address(wpanApi.DoIPLinkLocal64().bytes);
            ipMeshLocal = new IPv6Address(wpanApi.DoIPMeshLocal64().bytes);
        }