Exemplo n.º 1
0
        /// <summary>
        /// Converts a ZigBee Logical Type value to an Ember Node Type value
        /// </summary>
        /// <param name="type">The Logical Type</param>
        /// <returns>The equivalent Ember Node Type</returns>
        // Revision History
        // MM/DD/YY who Version Issue# Description
        // -------- --- ------- ------ ---------------------------------------
        // 06/24/13 RCG 2.71.00        Created

        private EmberNodeType ConvertLogicalTypeToEmberType(ZigbeeLogicalType type)
        {
            EmberNodeType EmberType = EmberNodeType.EndDevice;

            switch (type)
            {
            case ZigbeeLogicalType.COORDINATOR:
            {
                EmberType = EmberNodeType.Coordinator;
                break;
            }

            case ZigbeeLogicalType.ENDDEVICE:
            {
                EmberType = EmberNodeType.EndDevice;
                break;
            }

            case ZigbeeLogicalType.ROUTER:
            {
                EmberType = EmberNodeType.Router;
                break;
            }
            }

            return(EmberType);
        }
Exemplo n.º 2
0
 public EzspGetNetworkParametersResponse(int[] inputBuffer) :
     base(inputBuffer)
 {
     _status     = deserializer.DeserializeEmberStatus();
     _nodeType   = deserializer.DeserializeEmberNodeType();
     _parameters = deserializer.DeserializeEmberNetworkParameters();
 }
Exemplo n.º 3
0
 public EzspGetChildDataResponse(int[] inputBuffer) :
     base(inputBuffer)
 {
     _status     = deserializer.DeserializeEmberStatus();
     _childId    = deserializer.DeserializeUInt16();
     _childEui64 = deserializer.DeserializeEmberEui64();
     _childType  = deserializer.DeserializeEmberNodeType();
 }
Exemplo n.º 4
0
 public EzspChildJoinHandler(int[] inputBuffer) :
     base(inputBuffer)
 {
     _index      = deserializer.DeserializeUInt8();
     _joining    = deserializer.DeserializeBool();
     _childId    = deserializer.DeserializeUInt16();
     _childEui64 = deserializer.DeserializeEmberEui64();
     _childType  = deserializer.DeserializeEmberNodeType();
 }
Exemplo n.º 5
0
        /// <summary>
        /// Rejoins the meter
        /// </summary>
        /// <param name="nodeType">The type of device to join as.</param>
        /// <param name="extendedPanID">The extended PAN ID of the network to join</param>
        /// <param name="channel">The channel that the network is on</param>
        /// <param name="networkKey">The network key to use during the rejoin</param>
        //  Revision History
        //  MM/DD/YY Who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  10/17/12 PGH 2.70.36        Created

        public override void Rejoin(EmberNodeType nodeType, ulong extendedPanID, byte channel, byte[] networkKey)
        {
            base.Rejoin(nodeType, extendedPanID, channel, networkKey);

            // We are currently joined with the meter we need to continue with the key establishment process
            if (IsJoined)
            {
                PerformKeyEstablishment(TRUST_CENTER_NODE_ID, false, KeyEstablishmentState.Established);

                if (m_KeyEstablishmentState != KeyEstablishmentState.Established)
                {
                    IsJoined = false;
                    m_Logger.WriteLine(EZSPLogLevels.ApplicationLayer, "Key establishment process failed. Result: " + m_KeyEstablishmentState.ToString());
                }
            }
        }
Exemplo n.º 6
0
 public void SerializeEmberNodeType(EmberNodeType nodeType)
 {
     _buffer[_length++] = (int)nodeType;
 }
Exemplo n.º 7
0
 /// <summary>
 /// The childType to set as <see cref="EmberNodeType"/> </summary>
 public void SetChildType(EmberNodeType childType)
 {
     _childType = childType;
 }
Exemplo n.º 8
0
 /// <summary>
 /// The nodeType to set as <see cref="EmberNodeType"/> </summary>
 public void SetNodeType(EmberNodeType nodeType)
 {
     _nodeType = nodeType;
 }