Prepayment Server#

API and Callbacks for the Prepayment Cluster Server Component.

This component implements the server-side functionality of the Smart Energy 1.2 Prepayment cluster.

Modules#

Prepayment Server

API#

void
sl_zigbee_af_prepayment_server_publish_prepay_snapshot(sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint32_t snapshotId, uint32_t snapshotTime, uint8_t totalSnapshotsFound, uint8_t commandIndex, uint8_t totalNumberOfCommands, uint32_t snapshotCause, uint8_t snapshotPayloadType, uint8_t *snapshotPayload)

Send a publish prepay snapshot command sent in response to the get prepay snapshot command.

void
sl_zigbee_af_prepayment_server_publish_top_up_log(sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t commandIndex, uint8_t totalNumberOfCommands, sl_zigbee_zcl_top_up_payload_t *topUpPayload)

Send a publish top up log command, sent when a top up is performed or in response to a get top up log command.

void
sl_zigbee_af_prepayment_server_publish_debt_log(sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t commandIndex, uint8_t totalNumberOfCommands, sl_zigbee_zcl_debt_payload_t *debtPayload)

Send a publish debt log command.

Enumerations#

enum
SNAPSHOT_PAYLOAD_TYPE_DEBT_OR_CREDIT_STATUS = 0x00
}

Macros#

API Documentation#

sl_zigbee_af_prepayment_server_publish_prepay_snapshot#

void sl_zigbee_af_prepayment_server_publish_prepay_snapshot (sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint32_t snapshotId, uint32_t snapshotTime, uint8_t totalSnapshotsFound, uint8_t commandIndex, uint8_t totalNumberOfCommands, uint32_t snapshotCause, uint8_t snapshotPayloadType, uint8_t * snapshotPayload)

Send a publish prepay snapshot command sent in response to the get prepay snapshot command.

Parameters
N/AnodeId

The short address of the destination device.

N/AsrcEndpoint

The source endpoint used in the ZigBee transmission.

N/AdstEndpoint

The destination endpoint used in the ZigBee transmission.

N/AsnapshotId

A unique identifier allocated by the device that created the snapshot.

N/AsnapshotTime

The UTC time when the snapshot was taken.

N/AtotalSnapshotsFound

The number of snapshots that matched the criteria in the received Get Prepay Snapshot command.

N/AcommandIndex

Indicates a fragment number if the entire payload won't fit into 1 message.

N/AtotalNumberOfCommands

The total number of subcommands that will be sent.

N/AsnapshotCause

A 32-bit bitmap that indicates the cause of the snapshot.

N/AsnapshotPayloadType

An 8-bit enumeration that defines the format of the snapshot payload.

N/AsnapshotPayload

Data that was created with the snapshot.


Definition at line 70 of file app/framework/plugin/prepayment-server/prepayment-server.h

sl_zigbee_af_prepayment_server_publish_top_up_log#

void sl_zigbee_af_prepayment_server_publish_top_up_log (sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t commandIndex, uint8_t totalNumberOfCommands, sl_zigbee_zcl_top_up_payload_t * topUpPayload)

Send a publish top up log command, sent when a top up is performed or in response to a get top up log command.

Parameters
N/AnodeId

The short address of the destination device.

N/AsrcEndpoint

The source endpoint used in the ZigBee transmission.

N/AdstEndpoint

The destination endpoint used in the ZigBee transmission.

N/AcommandIndex

Indicates a fragment number if the entire payload won't fit into 1 message.

N/AtotalNumberOfCommands

The total number of subcommands that will be sent.

N/AtopUpPayload

Information that is sent from each top up log entry.


Definition at line 89 of file app/framework/plugin/prepayment-server/prepayment-server.h

sl_zigbee_af_prepayment_server_publish_debt_log#

void sl_zigbee_af_prepayment_server_publish_debt_log (sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t commandIndex, uint8_t totalNumberOfCommands, sl_zigbee_zcl_debt_payload_t * debtPayload)

Send a publish debt log command.

Parameters
N/AnodeId

The short address of the destination device.

N/AsrcEndpoint

The source endpoint used in the ZigBee transmission.

N/AdstEndpoint

The destination endpoint used in the ZigBee transmission.

N/AcommandIndex

Indicates a fragment number if the entire payload won't fit into 1 message.

N/AtotalNumberOfCommands

The total number of subcommands that will be sent.

N/AdebtPayload

Includes the contents of a debt record from the log.


Definition at line 103 of file app/framework/plugin/prepayment-server/prepayment-server.h

Enumeration Documentation#

SnapshotPayloadType#

SnapshotPayloadType
Enumerator
SNAPSHOT_PAYLOAD_TYPE_DEBT_OR_CREDIT_STATUS

Definition at line 38 of file app/framework/plugin/prepayment-server/prepayment-server.h

Macro Definition Documentation#

SNAPSHOT_PAYLOAD_LEN#

#define SNAPSHOT_PAYLOAD_LEN
Value:
24

Definition at line 46 of file app/framework/plugin/prepayment-server/prepayment-server.h