Plugin Commands: Prepayment Server
Detailed Description
The prepayment server handles all implemented commands of the prepayment cluster server.
Macro Definition Documentation
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_ADD_SNAPSHOT_EVENT
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_ADD_SNAPSHOT_EVENT |
plugin prepayment-server addSnapshotEvent [endpoint:1] [snapshotCause:4]
-
Add a snapshot event to the prepayment server.
- endpoint - INT8U - Endpoint of the device from which the snapshot will be taken
- snapshotCause - INT32U - A bitmask indicating the cause of the snapshot
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_CHECK_CALENDAR
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_CHECK_CALENDAR |
plugin prepayment-server checkCalendar [utcTime:4]
-
Check that UTC time and calendar dates can be interchanged correctly.
- utcTime - INT32U - The UTC time that should be tested.
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_GET_TOP_UP_PERCENT
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_GET_TOP_UP_PERCENT |
plugin prepayment-server getTopUpPercent [endpoint:1] [topUpValue:4]
-
Determine the total top up percentage required for debt reduction.
- endpoint - INT8U - The endpoint from which the debt attribute set will be read.
- topUpValue - INT32U - The current top up value from which a percentage may be required for debt reduction
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_GET_WEEKDAY_FROM_UTC
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_GET_WEEKDAY_FROM_UTC |
plugin prepayment-server getWeekdayFromUtc [utcTime:4]
-
Read the day of the week for a given UTC time.
- utcTime - INT32U - The UTC time that should be converted.
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_INIT
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_INIT |
plugin prepayment-server init [endpoint:1]
-
Initialize the prepayment server and snapshot table.
- endpoint - INT8U - Endpoint of the prepayment server.
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_PUBLISH_PREPAY_SNAPSHOT
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_PUBLISH_PREPAY_SNAPSHOT |
plugin prepayment-server publishPrepaySnapshot [nodeId:2] [srcEndpoint:1] [dstEndpoint:1] [snapshotTableIndex:4]
-
Send the publish prepay snapshot command.
- nodeId - INT16U - NodeId of the destination device
- srcEndpoint - INT8U - The source endpoint of the sending device
- dstEndpoint - INT8U - The destination endpoint of the receiving device
- snapshotTableIndex - INT32U - A unique identifier assigned by the device creating the snapshot
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_READ_DEBT_ATTRIBS
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_READ_DEBT_ATTRIBS |
plugin prepayment-server readDebtAttribs [endpoint:1] [index:1]
-
Read the values from the debt attribute set for a given index (1,2,3).
- endpoint - INT8U - The endpoint from which the debt attribute set will be read.
- index - INT8U - The index of the debt attribute set to read - 1, 2, or 3.
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_READ_DEBT_LOG
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_READ_DEBT_LOG |
plugin prepayment-server readDebtLog [index:1]
-
Read the values from the debt log from a specified index.
- index - INT8U - The index of the debt log to read.
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_SCHED_DEBT_REPAY
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_SCHED_DEBT_REPAY |
plugin prepayment-server schedDebtRepay [endpoint:1] [issuerEvtId:4] [debtType:1] [collectTime:2] [startTime:4] [collectFreq:1]
-
Check that debt repayment handling correctly calculates and schedules various attributes.
- endpoint - INT8U - The endpoint of the prepayment server.
- issuerEvtId - INT32U - The issuer event ID for the debt.
- debtType - INT8U - The type of debt (0,1,2) that will be set.
- collectTime - INT16U - The time in mins from midnight when the debt should be collected.
- startTime - INT32U - The starting UTC time when debt should be collected.
- collectFreq - INT8U - The frequency at which debt should be collected. 0=hourly, 1=daily, 2=weekly, 3=monthly, 4=quarterly.
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_VERIFY_ATTRIBUTE
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_VERIFY_ATTRIBUTE |
plugin prepayment-server verifyAttribute [endpoint:1] [attributeId:2] [attributeSize:1] [expectedAttributeValue:4]
-
Verify the prepayment attribute value matches an expected value.
- endpoint - INT8U - Metering endpoint whose payment mode value is being queried.
- attributeId - INT16U - Attribute ID of the attribute that will be verified.
- attributeSize - INT8U - Size of the attribute in bytes.
- expectedAttributeValue - INT32U - Expected payment mode value.
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_VERIFY_PAYMENT_MODE
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_VERIFY_PAYMENT_MODE |
plugin prepayment-server verifyPaymentMode [endpoint:1] [expectedPaymentModeValue:2]
-
Verify the payment mode matches an expected payment mode value.
- endpoint - INT8U - Metering endpoint whose payment mode value is being queried.
- expectedPaymentModeValue - INT16U - Expected payment mode value.
◆ EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_WRITE_ATTRIBUTE
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_PREPAYMENT_SERVER_PLUGIN_PREPAYMENT_SERVER_WRITE_ATTRIBUTE |
plugin prepayment-server writeAttribute [endpoint:1] [attributeId:2] [attributeType:1] [numBytes:1] [value:4]
-
Write the value of a local prepayment attribute (1-4 byte attribute value supported).
- endpoint - INT8U - Endpoint whose prepayment attribute is being written.
- attributeId - INT16U - The attribute ID that should be written.
- attributeType - INT8U - The attribute type (eg 0x23=U32)
- numBytes - INT8U - The number of bytes (1-4) of data to write.
- value - INT32U - The data that should be written to the attribute.