Endpoint functions

The AF Endpoint functions are used to control and monitor the states of endpoints on the local node.

The functions are listed below.

  1. ZPS_vAplAfSetEndpointState

  2. ZPS_eAplAfGetEndpointState

  3. ZPS_eAplAfSetEndpointDiscovery

  4. ZPS_eAplAfGetEndpointDiscovery

ZPS_vAplAfSetEndpointState

ZPS\_teStatus ZPS\_eAplAfSetEndpointState\(
                                      uint8 u8Endpoint,
                                      bool bEnabled);

Description

This function puts the specified endpoint on the local node into the specified state (enabled or disabled).

Parent topic:ZPS_vAplAfSetEndpointState

Parameters

  • u8Endpoint: Endpoint number (on local node)

  • bEnabled: State in which to put endpoint, one of:

    • TRUE: enable endpoint

    • FALSE: disable endpoint

Parent topic:ZPS_vAplAfSetEndpointState

Returns

  • ZPS_E_SUCCESS (endpoint state successfully set)

  • APS return codes, listed and described in Section 11.2.2

  • NWK return codes, listed and described in Section 11.2.3

  • MAC return codes, listed and described in Section 11.2.4

Parent topic:ZPS_vAplAfSetEndpointState

Parent topic:Endpoint functions

ZPS_eAplAfGetEndpointState

ZPS\_teStatus ZPS\_eAplAfGetEndpointState\(
                                  uint8 u8Endpoint,
                                  bool *pbEnabled);

Description

This function obtains the current state (enabled or disabled) of the specified endpoint on the local node.

Parent topic:ZPS_eAplAfGetEndpointState

Parameters

  • u8Endpoint: Endpoint number (on local node)

  • *pbEnabled: Pointer to location to receive endpoint state. The returned state is one of:

    • TRUE: endpoint enabled

    • FALSE: endpoint disabled

Parent topic:ZPS_eAplAfGetEndpointState

Returns

Parent topic:ZPS_eAplAfGetEndpointState

Parent topic:Endpoint functions

ZPS_eAplAfSetEndpointDiscovery

ZPS\_teStatus ZPS\_eAplAfSetEndpointDiscovery\(
                                    uint8 u8Endpoint,
                                    uint16 u16ClusterId,
                                    bool bOutput,
                                    bool bDiscoverable);

Description

This function sets the discoverable state of the specified cluster of the specified endpoint on the local node - that is, whether the cluster/endpoint will be included in ‘device discoveries’ initiated on the network.

If the cluster/endpoint is discoverable, it appears in the Simple descriptor of the local node and is also included in match results requested using the function ZPS_eAplZdpMatchDescRequest().

The initial discoverable state of the cluster/endpoint is pre-set using the ZPS Configuration Editor (see Chapter 13).

Parent topic:ZPS_eAplAfSetEndpointDiscovery

Parameters

  • u8Endpoint: Endpoint number (on local node)

  • u16ClusterId: Cluster ID

  • bOutput: Type of cluster (output or input), one of:

    • TRUE: Output cluster

    • FALSE: Input cluster

  • bDiscoverable: Discoverable state to set, one of:

    • TRUE: Discoverable

    • FALSE: Not discoverable

Parent topic:ZPS_eAplAfSetEndpointDiscovery

Returns

Parent topic:ZPS_eAplAfSetEndpointDiscovery

Parent topic:Endpoint functions

ZPS_eAplAfGetEndpointDiscovery

ZPS\_teStatus ZPS\_eAplAfGetEndpointDiscovery\(
                                  uint8 u8Endpoint,
                                  uint16 u16ClusterId,
                                  bool bOutput,
                                  bool\_t *pbDiscoverable);

Description

This function obtains the discoverable state of the specified cluster of the specified endpoint on the local node - that is, whether the cluster/endpoint will be included in ‘device discoveries’ initiated on the network.

If the cluster/endpoint is discoverable, it appears in the Simple descriptor of the local node and is also included in match results requested using the function ZPS_eAplZdpMatchDescRequest().

The initial discoverable state of the cluster/endpoint is pre-set using the ZPS Configuration Editor (see Chapter 13). The state can subsequently be changed at runtime using the function ZPS_eAplAfSetEndpointDiscovery().

Parent topic:ZPS_eAplAfGetEndpointDiscovery

Parameters

  • u8Endpoint: Endpoint number (on local node)

  • u16ClusterId: Cluster ID

  • bOutput: Type of cluster (output or input), one of:

    • TRUE: Output cluster

    • FALSE: Input cluster

  • *pbDiscoverable: Pointer to location to receive discoverable state, which is one of the below:

    • TRUE: Discoverable

    • FALSE: Not discoverable

Parent topic:ZPS_eAplAfGetEndpointDiscovery

Returns

Parent topic:ZPS_eAplAfGetEndpointDiscovery

Parent topic:Endpoint functions

Parent topic:AF API functions