#include PLATFORM_HEADER
#include EMBER_AF_API_EMBER_TYPES
#include "app/util/ezsp/ezsp-enum.h"

// Callback from the EZSP layer indicating that the transaction with the NCP
// could not be completed due to a serial protocol error or that the response
// received from the NCP reported an error. The status parameter provides more
// information about the error.
void ezspErrorHandler(
      // The error condition.
      EzspStatus status)
{
}

// The EZSP layer calls this function after sending a command while waiting for
// the response. The Host application can use this function to perform any tasks
// that do not involve the NCP.
void ezspWaitingForResponse(void)
{
}

// Indicates that there are currently no pending callbacks.
void ezspNoCallbacks(void)
{
}

// A callback invoked to inform the application that a stack token has changed.
void ezspStackTokenChangedHandler(
      // The address of the stack token that has changed.
      uint16_t tokenAddress)
{
}

// A callback from the timer.
void ezspTimerHandler(
      // Which timer generated the callback (0 or 1).
      uint8_t timerId)
{
}

// This call is fired when a counter exceeds its threshold
void ezspCounterRolloverHandler(
      // Type of Counter
      EmberCounterType type)
{
}

// A callback indicating a custom EZSP message has been received.
void ezspCustomFrameHandler(
      // The length of the custom frame payload.
      uint8_t payloadLength,
      // The payload of the custom frame.
      uint8_t *payload)
{
}

// A callback invoked when the status of the stack changes. If the status
// parameter equals EMBER_NETWORK_UP, then the getNetworkParameters command can
// be called to obtain the new network parameters. If any of the parameters are
// being stored in nonvolatile memory by the Host, the stored values should be
// updated.
void ezspStackStatusHandler(
      // Stack status. One of the following: EMBER_NETWORK_UP,
      // EMBER_NETWORK_DOWN, EMBER_JOIN_FAILED, EMBER_MOVE_FAILED
      EmberStatus status)
{
}

// Reports the result of an energy scan for a single channel. The scan is not
// complete until the scanCompleteHandler callback is called.
void ezspEnergyScanResultHandler(
      // The 802.15.4 channel number that was scanned.
      uint8_t channel,
      // The maximum RSSI value found on the channel.
      int8_t maxRssiValue)
{
}

// Reports that a network was found as a result of a prior call to startScan.
// Gives the network parameters useful for deciding which network to join.
void ezspNetworkFoundHandler(
      // The parameters associated with the network found.
      EmberZigbeeNetwork *networkFound,
      // The link quality from the node that generated this beacon.
      uint8_t lastHopLqi,
      // The energy level (in units of dBm) observed during the reception.
      int8_t lastHopRssi)
{
}

// Returns the status of the current scan of type EZSP_ENERGY_SCAN or
// EZSP_ACTIVE_SCAN. EMBER_SUCCESS signals that the scan has completed. Other
// error conditions signify a failure to scan on the channel specified.
void ezspScanCompleteHandler(
      // The channel on which the current error occurred. Undefined for the case
      // of EMBER_SUCCESS.
      uint8_t channel,
      // The error condition that occurred on the current channel. Value will be
      // EMBER_SUCCESS when the scan has completed.
      EmberStatus status)
{
}

// This function returns an unused panID and channel pair found via the find
// unused panId scan procedure.
void ezspUnusedPanIdFoundHandler(
      // The unused panID which has been found.
      EmberPanId panId,
      // The channel that the unused panID was found on.
      uint8_t channel)
{
}

// Indicates that a child has joined or left.
void ezspChildJoinHandler(
      // The index of the child of interest.
      uint8_t index,
      // True if the child is joining. False the child is leaving.
      bool joining,
      // The node ID of the child.
      EmberNodeId childId,
      // The EUI64 of the child.
      EmberEUI64 childEui64,
      // The node type of the child.
      EmberNodeType childType)
{
}

// Callback fires when the duty cycle state has changed
void ezspDutyCycleHandler(
      // The channel page whose duty cycle state has changed.
      uint8_t channelPage,
      // The channel number whose duty cycle state has changed.
      uint8_t channel,
      // The current duty cycle state.
      EmberDutyCycleState state,
      // The total number of connected end devices that are being monitored for
      // duty cycle.
      uint8_t totalDevices,
      // Consumed duty cycles of end devices that are being monitored. The first
      // entry always be the local stack's nodeId, and thus the total aggregate
      // duty cycle for the device.
      EmberPerDeviceDutyCycle *arrayOfDeviceDutyCycles)
{
}

// The NCP used the external binding modification policy to decide how to handle
// a remote set binding request. The Host cannot change the current decision,
// but it can change the policy for future decisions using the setPolicy
// command.
void ezspRemoteSetBindingHandler(
      // The requested binding.
      EmberBindingTableEntry *entry,
      // The index at which the binding was added.
      uint8_t index,
      // EMBER_SUCCESS if the binding was added to the table and any other
      // status if not.
      EmberStatus policyDecision)
{
}

// The NCP used the external binding modification policy to decide how to handle
// a remote delete binding request. The Host cannot change the current decision,
// but it can change the policy for future decisions using the setPolicy
// command.
void ezspRemoteDeleteBindingHandler(
      // The index of the binding whose deletion was requested.
      uint8_t index,
      // EMBER_SUCCESS if the binding was removed from the table and any other
      // status if not.
      EmberStatus policyDecision)
{
}

// A callback indicating the stack has completed sending a message.
void ezspMessageSentHandler(
      // The type of message sent.
      EmberOutgoingMessageType type,
      // The destination to which the message was sent, for direct unicasts, or
      // the address table or binding index for other unicasts. The value is
      // unspecified for multicasts and broadcasts.
      uint16_t indexOrDestination,
      // The APS frame for the message.
      EmberApsFrame *apsFrame,
      // The value supplied by the Host in the ezspSendUnicast,
      // ezspSendBroadcast or ezspSendMulticast command.
      uint8_t messageTag,
      // An EmberStatus value of EMBER_SUCCESS if an ACK was received from the
      // destination or EMBER_DELIVERY_FAILED if no ACK was received.
      EmberStatus status,
      // The length of the messageContents parameter in bytes.
      uint8_t messageLength,
      // The unicast message supplied by the Host. The message contents are only
      // included here if the decision for the messageContentsInCallback policy
      // is messageTagAndContentsInCallback.
      uint8_t *messageContents)
{
}

// Indicates the result of a data poll to the parent of the local node.
void ezspPollCompleteHandler(
      // An EmberStatus value: EMBER_SUCCESS - Data was received in response to
      // the poll. EMBER_MAC_NO_DATA - No data was pending.
      // EMBER_DELIVERY_FAILED - The poll message could not be sent.
      // EMBER_MAC_NO_ACK_RECEIVED - The poll message was sent but not
      // acknowledged by the parent.
      EmberStatus status)
{
}

// Indicates that the local node received a data poll from a child.
void ezspPollHandler(
      // The node ID of the child that is requesting data.
      EmberNodeId childId)
{
}

// A callback indicating a message has been received containing the EUI64 of the
// sender. This callback is called immediately before the incomingMessageHandler
// callback. It is not called if the incoming message did not contain the EUI64
// of the sender.
void ezspIncomingSenderEui64Handler(
      // The EUI64 of the sender
      EmberEUI64 senderEui64)
{
}

// A callback indicating a message has been received.
void ezspIncomingMessageHandler(
      // The type of the incoming message. One of the following:
      // EMBER_INCOMING_UNICAST, EMBER_INCOMING_UNICAST_REPLY,
      // EMBER_INCOMING_MULTICAST, EMBER_INCOMING_MULTICAST_LOOPBACK,
      // EMBER_INCOMING_BROADCAST, EMBER_INCOMING_BROADCAST_LOOPBACK
      EmberIncomingMessageType type,
      // The APS frame from the incoming message.
      EmberApsFrame *apsFrame,
      // The link quality from the node that last relayed the message.
      uint8_t lastHopLqi,
      // The energy level (in units of dBm) observed during the reception.
      int8_t lastHopRssi,
      // The sender of the message.
      EmberNodeId sender,
      // The index of a binding that matches the message or 0xFF if there is no
      // matching binding.
      uint8_t bindingIndex,
      // The index of the entry in the address table that matches the sender of
      // the message or 0xFF if there is no matching entry.
      uint8_t addressIndex,
      // The length of the messageContents parameter in bytes.
      uint8_t messageLength,
      // The incoming message.
      uint8_t *messageContents)
{
}

// Reports the arrival of a route record command frame.
void ezspIncomingRouteRecordHandler(
      // The source of the route record.
      EmberNodeId source,
      // The EUI64 of the source.
      EmberEUI64 sourceEui,
      // The link quality from the node that last relayed the route record.
      uint8_t lastHopLqi,
      // The energy level (in units of dBm) observed during the reception.
      int8_t lastHopRssi,
      // The number of relays in relayList.
      uint8_t relayCount,
      // The route record. Each relay in the list is an uint16_t node ID. The
      // list is passed as uint8_t * to avoid alignment problems.
      uint8_t *relayList)
{
}

// Change the source route entry in a source route table
void ezspChangeSourceRouteHandler(
      // The source/neighbor for which the source route entry is changed
      EmberNodeId newChildId,
      // The parent of the source/neighbor for which the source route entry is
      // changed
      EmberNodeId newParentId,
      // Is the source our child?
      bool ourChild)
{
}

// A callback indicating that a many-to-one route to the concentrator with the
// given short and long id is available for use.
void ezspIncomingManyToOneRouteRequestHandler(
      // The short id of the concentrator.
      EmberNodeId source,
      // The EUI64 of the concentrator.
      EmberEUI64 longId,
      // The path cost to the concentrator. The cost may decrease as additional
      // route request packets for this discovery arrive, but the callback is
      // made only once.
      uint8_t cost)
{
}

// A callback invoked when a route error message is received. The error
// indicates that a problem routing to or from the target node was encountered.
void ezspIncomingRouteErrorHandler(
      // EMBER_SOURCE_ROUTE_FAILURE or EMBER_MANY_TO_ONE_ROUTE_FAILURE.
      EmberStatus status,
      // The short id of the remote node.
      EmberNodeId target)
{
}

// A callback invoked by the EmberZNet stack when an id conflict is discovered,
// that is, two different nodes in the network were found to be using the same
// short id. The stack automatically removes the conflicting short id from its
// internal tables (address, binding, route, neighbor, and child tables). The
// application should discontinue any other use of the id.
void ezspIdConflictHandler(
      // The short id for which a conflict was detected
      EmberNodeId id)
{
}

// A callback invoked by the EmberZNet stack when a MAC passthrough message is
// received.
void ezspMacPassthroughMessageHandler(
      // The type of MAC passthrough message received.
      EmberMacPassthroughType messageType,
      // The link quality from the node that last relayed the message.
      uint8_t lastHopLqi,
      // The energy level (in units of dBm) observed during reception.
      int8_t lastHopRssi,
      // The length of the messageContents parameter in bytes.
      uint8_t messageLength,
      // The raw message that was received.
      uint8_t *messageContents)
{
}

// A callback invoked by the EmberZNet stack when a raw MAC message that has
// matched one of the application's configured MAC filters.
void ezspMacFilterMatchMessageHandler(
      // The index of the filter that was matched.
      uint8_t filterIndexMatch,
      // The type of MAC passthrough message received.
      EmberMacPassthroughType legacyPassthroughType,
      // The link quality from the node that last relayed the message.
      uint8_t lastHopLqi,
      // The energy level (in units of dBm) observed during reception.
      int8_t lastHopRssi,
      // The length of the messageContents parameter in bytes.
      uint8_t messageLength,
      // The raw message that was received.
      uint8_t *messageContents)
{
}

// A callback invoked by the EmberZNet stack when the MAC has finished
// transmitting a raw message.
void ezspRawTransmitCompleteHandler(
      // EMBER_SUCCESS if the transmission was successful, or
      // EMBER_DELIVERY_FAILED if not
      EmberStatus status)
{
}

// A callback to inform the application that the Network Key has been updated
// and the node has been switched over to use the new key. The actual key being
// used is not passed up, but the sequence number is.
void ezspSwitchNetworkKeyHandler(
      // The sequence number of the new network key.
      uint8_t sequenceNumber)
{
}

// This is a callback that indicates the success or failure of an attempt to
// establish a key with a partner device.
void ezspZigbeeKeyEstablishmentHandler(
      // This is the IEEE address of the partner that the device successfully
      // established a key with. This value is all zeros on a failure.
      EmberEUI64 partner,
      // This is the status indicating what was established or why the key
      // establishment failed.
      EmberKeyStatus status)
{
}

// The NCP used the trust center behavior policy to decide whether to allow a
// new node to join the network. The Host cannot change the current decision,
// but it can change the policy for future decisions using the setPolicy
// command.
void ezspTrustCenterJoinHandler(
      // The Node Id of the node whose status changed
      EmberNodeId newNodeId,
      // The EUI64 of the node whose status changed.
      EmberEUI64 newNodeEui64,
      // The status of the node: Secure Join/Rejoin, Unsecure Join/Rejoin,
      // Device left.
      EmberDeviceUpdate status,
      // An EmberJoinDecision reflecting the decision made.
      EmberJoinDecision policyDecision,
      // The parent of the node whose status has changed.
      EmberNodeId parentOfNewNodeId)
{
}

// A callback by the Crypto Engine indicating that a new ephemeral
// public/private key pair has been generated. The public/private key pair is
// stored on the NCP, but only the associated public key is returned to the
// host. The node's associated certificate is also returned.
void ezspGenerateCbkeKeysHandler(
      // The result of the CBKE operation.
      EmberStatus status,
      // The generated ephemeral public key.
      EmberPublicKeyData *ephemeralPublicKey)
{
}

// A callback to indicate that the NCP has finished calculating the Secure
// Message Authentication Codes (SMAC) for both the initiator and responder. The
// associated link key is kept in temporary storage until the host tells the NCP
// to store or discard the key via emberClearTemporaryDataMaybeStoreLinkKey().
void ezspCalculateSmacsHandler(
      // The Result of the CBKE operation.
      EmberStatus status,
      // The calculated value of the initiator's SMAC
      EmberSmacData *initiatorSmac,
      // The calculated value of the responder's SMAC
      EmberSmacData *responderSmac)
{
}

// A callback by the Crypto Engine indicating that a new 283k1 ephemeral
// public/private key pair has been generated. The public/private key pair is
// stored on the NCP, but only the associated public key is returned to the
// host. The node's associated certificate is also returned.
void ezspGenerateCbkeKeysHandler283k1(
      // The result of the CBKE operation.
      EmberStatus status,
      // The generated ephemeral public key.
      EmberPublicKey283k1Data *ephemeralPublicKey)
{
}

// A callback to indicate that the NCP has finished calculating the Secure
// Message Authentication Codes (SMAC) for both the initiator and responder for
// the CBKE 283k1 Library. The associated link key is kept in temporary storage
// until the host tells the NCP to store or discard the key via
// emberClearTemporaryDataMaybeStoreLinkKey().
void ezspCalculateSmacsHandler283k1(
      // The Result of the CBKE operation.
      EmberStatus status,
      // The calculated value of the initiator's SMAC
      EmberSmacData *initiatorSmac,
      // The calculated value of the responder's SMAC
      EmberSmacData *responderSmac)
{
}

// The handler that returns the results of the signing operation. On success,
// the signature will be appended to the original message (including the
// signature type indicator that replaced the startIndex field for the signing)
// and both are returned via this callback.
void ezspDsaSignHandler(
      // The result of the DSA signing operation.
      EmberStatus status,
      // The length of the messageContents parameter in bytes.
      uint8_t messageLength,
      // The message and attached which includes the original message and the
      // appended signature.
      uint8_t *messageContents)
{
}

// This callback is executed by the stack when the DSA verification has
// completed and has a result. If the result is EMBER_SUCCESS, the signature is
// valid. If the result is EMBER_SIGNATURE_VERIFY_FAILURE then the signature is
// invalid. If the result is anything else then the signature verify operation
// failed and the validity is unknown.
void ezspDsaVerifyHandler(
      // The result of the DSA verification operation.
      EmberStatus status)
{
}

// A callback indicating a packet with a valid CRC has been received.
void ezspMfglibRxHandler(
      // The link quality observed during the reception
      uint8_t linkQuality,
      // The energy level (in units of dBm) observed during the reception.
      int8_t rssi,
      // The length of the packetContents parameter in bytes. Will be greater
      // than 3 and less than 123.
      uint8_t packetLength,
      // The received packet. The last two bytes are the 16-bit CRC.
      uint8_t *packetContents)
{
}

// A callback invoked by the EmberZNet stack when a bootload message is
// received.
void ezspIncomingBootloadMessageHandler(
      // The EUI64 of the sending node.
      EmberEUI64 longId,
      // The link quality from the node that last relayed the message.
      uint8_t lastHopLqi,
      // The energy level (in units of dBm) observed during the reception.
      int8_t lastHopRssi,
      // The length of the messageContents parameter in bytes.
      uint8_t messageLength,
      // The bootload message that was sent.
      uint8_t *messageContents)
{
}

// A callback invoked by the EmberZNet stack when the MAC has finished
// transmitting a bootload message.
void ezspBootloadTransmitCompleteHandler(
      // An EmberStatus value of EMBER_SUCCESS if an ACK was received from the
      // destination or EMBER_DELIVERY_FAILED if no ACK was received.
      EmberStatus status,
      // The length of the messageContents parameter in bytes.
      uint8_t messageLength,
      // The message that was sent.
      uint8_t *messageContents)
{
}

// This call is fired when a ZLL network scan finds a ZLL network.
void ezspZllNetworkFoundHandler(
      // Information about the network.
      EmberZllNetwork *networkInfo,
      // Used to interpret deviceInfo field.
      bool isDeviceInfoNull,
      // Device specific information.
      EmberZllDeviceInfoRecord *deviceInfo,
      // The link quality from the node that last relayed the message.
      uint8_t lastHopLqi,
      // The energy level (in units of dBm) observed during reception.
      int8_t lastHopRssi)
{
}

// This call is fired when a ZLL network scan is complete.
void ezspZllScanCompleteHandler(
      // Status of the operation.
      EmberStatus status)
{
}

// This call is fired when network and group addresses are assigned to a remote
// mode in a network start or network join request.
void ezspZllAddressAssignmentHandler(
      // Address assignment information.
      EmberZllAddressAssignment *addressInfo,
      // The link quality from the node that last relayed the message.
      uint8_t lastHopLqi,
      // The energy level (in units of dBm) observed during reception.
      int8_t lastHopRssi)
{
}

// This call is fired when the device is a target of a touch link.
void ezspZllTouchLinkTargetHandler(
      // Information about the network.
      EmberZllNetwork *networkInfo)
{
}

// A callback to the GP endpoint to indicate the result of the GPDF
// transmission.
void ezspDGpSentHandler(
      // An EmberStatus value indicating success or the reason for failure.
      EmberStatus status,
      // The handle of the GPDF.
      uint8_t gpepHandle)
{
}

// A callback invoked by the ZigBee GP stack when a GPDF is received.
void ezspGpepIncomingMessageHandler(
      // The status of the GPDF receive.
      EmberStatus status,
      // The gpdLink value of the received GPDF.
      uint8_t gpdLink,
      // The GPDF sequence number.
      uint8_t sequenceNumber,
      // The address of the source GPD.
      EmberGpAddress *addr,
      // The security level of the received GPDF.
      EmberGpSecurityLevel gpdfSecurityLevel,
      // The securityKeyType used to decrypt/authenticate the incoming GPDF.
      EmberGpKeyType gpdfSecurityKeyType,
      // Whether the incoming GPDF had the auto-commissioning bit set.
      bool autoCommissioning,
      // Whether the incoming GPDF had the rxAfterTx bit set.
      bool rxAfterTx,
      // The security frame counter of the incoming GDPF.
      uint32_t gpdSecurityFrameCounter,
      // The gpdCommandId of the incoming GPDF.
      uint8_t gpdCommandId,
      // The received MIC of the GPDF.
      uint32_t mic,
      // The proxy table index of the corresponding proxy table entry to the
      // incoming GPDF.
      uint8_t proxyTableIndex,
      // The length of the GPD command payload.
      uint8_t gpdCommandPayloadLength,
      // The GPD command payload.
      uint8_t *gpdCommandPayload)
{
}
