Modules#

EmberAfPrepaymentSnapshotPayload

EmberAfPrepaymentSnapshotSchedulePayload

Prepayment Snapshot Storage

Prepayment Snapshot Storage#

API and Callbacks for the Prepayment Snapshot Storage Component.

This component implements storage for the prepayment snapshots.

API#

EmberStatus
emberAfPluginPrepaymentSnapshotStoragePublishSnapshot(EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint32_t snapshotTableIndex)

publish prepayment snapshot

uint32_t
emberAfPluginPrepaymentSnapshotStorageTakeSnapshot(uint8_t endpoint, uint32_t snapshotCause)

Take prepayment snapshot.

Enumerations#

enum
SNAPSHOT_CAUSE_GENERAL = ( ((uint32_t)1) << 0)
SNAPSHOT_CAUSE_END_OF_BILLING_PERIOD = ( ((uint32_t)1) << 1)
SNAPSHOT_CAUSE_CHANGE_OF_TARIFF_INFO = ( ((uint32_t)1) << 3)
SNAPSHOT_CAUSE_CHANGE_OF_PRICE_MATRIX = ( ((uint32_t)1) << 4)
SNAPSHOT_CAUSE_MANUALLY_TRIGGERED_FROM_CLIENT = ( ((uint32_t)1) << 10)
SNAPSHOT_CAUSE_CHANGE_OF_TENANCY = ( ((uint32_t)1) << 12)
SNAPSHOT_CAUSE_CHANGE_OF_SUPPLIER = ( ((uint32_t)1) << 13)
SNAPSHOT_CAUSE_CHANGE_OF_METER_MODE = ( ((uint32_t)1) << 14)
SNAPSHOT_CAUSE_TOP_UP_ADDITION = ( ((uint32_t)1) << 18)
SNAPSHOT_CAUSE_DEBT_OR_CREDIT_ADDITION = ( ((uint32_t)1) << 19)
}

Defined snapshot causes.

Macros#

#define
INVALID_SNAPSHOT_ID 0
#define
INVALID_SNAPSHOT_SCHEDULE_ID 0
#define
SNAPSHOT_CAUSE_ALL_SNAPSHOTS 0xFFFFFFFF

API Documentation#

emberAfPluginPrepaymentSnapshotStoragePublishSnapshot#

EmberStatus emberAfPluginPrepaymentSnapshotStoragePublishSnapshot (EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint32_t snapshotTableIndex)

publish prepayment snapshot

Parameters
TypeDirectionArgument NameDescription
EmberNodeIdN/AnodeId

Ver.: always

uint8_tN/AsrcEndpoint

Ver.: always

uint8_tN/AdstEndpoint

Ver.: always

uint32_tN/AsnapshotTableIndex

Ver.: always

Returns

  • EmberStatus status code


emberAfPluginPrepaymentSnapshotStorageTakeSnapshot#

uint32_t emberAfPluginPrepaymentSnapshotStorageTakeSnapshot (uint8_t endpoint, uint32_t snapshotCause)

Take prepayment snapshot.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aendpoint

Ver.: always

uint32_tN/AsnapshotCause

Ver.: always

Returns

  • uin32_t snapshot ID


Enumeration Documentation#

SnapshotCause#

SnapshotCause

Defined snapshot causes.

Enumerator
SNAPSHOT_CAUSE_GENERAL
SNAPSHOT_CAUSE_END_OF_BILLING_PERIOD
SNAPSHOT_CAUSE_CHANGE_OF_TARIFF_INFO
SNAPSHOT_CAUSE_CHANGE_OF_PRICE_MATRIX
SNAPSHOT_CAUSE_MANUALLY_TRIGGERED_FROM_CLIENT
SNAPSHOT_CAUSE_CHANGE_OF_TENANCY
SNAPSHOT_CAUSE_CHANGE_OF_SUPPLIER
SNAPSHOT_CAUSE_CHANGE_OF_METER_MODE
SNAPSHOT_CAUSE_TOP_UP_ADDITION
SNAPSHOT_CAUSE_DEBT_OR_CREDIT_ADDITION