Price Server#

API and Callbacks for the Price Cluster Server Component.

This component provides an implementation of a Smart Energy price server. The price server holds a table of prices locally and answers requests to retrieve the list of commodity prices. It requires extension to add / remove prices from the table and to send out new prices to those devices that have subscribed to the ESI for price updates.

Modules#

EmberAfPriceBlockPeriod

EmberAfPriceBillingPeriod

EmberAfPriceCppEvent

EmberAfPriceConsolidatedBills

EmberAfPriceCreditPayment

EmberAfPriceConversionFactor

EmberAfPriceCalorificValue

EmberAfPriceCancelTariff

EmberAfPriceCo2Value

EmberAfPriceCurrencyConversion

EmberAfPriceTierLabelValue

EmberAfPriceTierLabelTable

EmberAfPriceBlockPeriodTable

EmberAfPriceBillingPeriodTable

EmberAfPriceCppTable

EmberAfPriceConsolidatedBillsTable

EmberAfPriceCreditPaymentTable

EmberAfPriceConversionFactorTable

EmberAfPriceCalorificValueTable

EmberAfPriceCO2Table

EmberAfPriceCurrencyConversionTable

EmberAfPriceCancelTariffTable

EmberAfScheduledBlockThresholds

EmberAfScheduledBlockThresholdsTable

EmberAfScheduledTariff

EmberAfScheduledTariffTable

EmberAfScheduledPriceMatrix

EmberAfScheduledPriceMatrixTable

EmberAfPriceServerInfo

Price Server

API#

void

Send the next get scheduled prices command.

uint32_t

Return the number of seconds until the next get scheduled prices command should be sent.

void
emberAfPriceClearPriceTable(uint8_t endpoint)

Clear all prices in the price table.

void

Clear all tariffs in the tariff table.

void

Clear all price matrices in the price matrix table.

void

Clear all block thresholds in the block thresholds table.

bool
emberAfPriceGetPriceTableEntry(uint8_t endpoint, uint8_t index, EmberAfScheduledPrice *price)

Get a price used by the price server plugin.

void
emberAfPluginPriceServerBlockPeriodAdd(uint8_t endpoint, uint32_t providerId, uint32_t issuerEventId, uint32_t blockPeriodStartTime, uint32_t blockPeriodDuration, uint8_t blockPeriodControl, uint8_t blockPeriodDurationType, uint32_t thresholdMultiplier, uint32_t thresholdDivisor, uint8_t tariffType, uint8_t tariffResolutionPeriod)

Set values in the block period table.

void
emberAfPluginPriceServerBlockPeriodPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish block period command.

void
emberAfPluginPriceServerBlockPeriodPrint(uint8_t endpoint, uint8_t index)

Print data in the specified index of the block period table.

uint32_t

Return the number of seconds until the next block period event occurs.

void
emberAfPriceServerRefreshBlockPeriod(uint8_t endpoint, bool repeat)

Update block period attributes to match the current block period.

bool
emberAfPriceGetTariffTableEntry(uint8_t endpoint, uint8_t index, EmberAfPriceCommonInfo *info, EmberAfScheduledTariff *tariff)

Get a tariff used by the price server plugin.

bool
emberAfPriceGetPriceMatrix(uint8_t endpoint, uint8_t index, EmberAfPriceCommonInfo *info, EmberAfScheduledPriceMatrix *pm)

Retrieve a price matrix entry by index.

bool
emberAfPriceGetBlockThresholdsTableEntry(uint8_t endpoint, uint8_t index, EmberAfScheduledBlockThresholds *bt)

Get the block thresholds used by the Price server plugin.

bool
emberAfPriceGetTariffByIssuerTariffId(uint8_t endpoint, uint32_t issuerTariffId, EmberAfPriceCommonInfo *info, EmberAfScheduledTariff *tariff)

Get a tariff by issuer tariff ID and endpoint.

bool
emberAfPriceGetPriceMatrixByIssuerTariffId(uint8_t endpoint, uint32_t issuerTariffId, EmberAfPriceCommonInfo *info, EmberAfScheduledPriceMatrix *pm)

Get a price matrix by issuer tariff ID and endpoint.

bool
emberAfPriceGetBlockThresholdsByIssuerTariffId(uint8_t endpoint, uint32_t issuerTariffId, EmberAfPriceCommonInfo *info, EmberAfScheduledBlockThresholds *bt)

Get the block thresholds by issuer tariff ID and endpoint.

bool
emberAfPriceSetPriceTableEntry(uint8_t endpoint, uint8_t index, const EmberAfScheduledPrice *price)

Set a price used by the price server plugin.

bool
emberAfPriceSetTariffTableEntry(uint8_t endpoint, uint8_t index, EmberAfPriceCommonInfo *info, const EmberAfScheduledTariff *tariff)

Set a tariff used by the price server plugin.

bool
emberAfPriceSetPriceMatrix(uint8_t endpoint, uint8_t index, EmberAfPriceCommonInfo *info, const EmberAfScheduledPriceMatrix *pm)

Set a price matrix entry by index.

bool
emberAfPriceSetBlockThresholdsTableEntry(uint8_t endpoint, uint8_t index, const EmberAfPriceCommonInfo *info, const EmberAfScheduledBlockThresholds *bt)

Set the block thresholds used by the price server plugin.

bool
emberAfGetCurrentPrice(uint8_t endpoint, EmberAfScheduledPrice *price)

Get the current price used by the price server plugin.

uint8_t

Find the first free index in the price table.

void
emberAfPricePrint(const EmberAfScheduledPrice *price)

function to print price

void
emberAfPricePrintPriceTable(uint8_t endpoint)
void
emberAfPricePrintTariff(const EmberAfPriceCommonInfo *info, const EmberAfScheduledTariff *tariff)
void

Print tariff table.

void
emberAfPricePrintPriceMatrix(uint8_t endpoint, const EmberAfPriceCommonInfo *info, const EmberAfScheduledPriceMatrix *pm)

Print price matrix.

void

Print price matrix table.

void
emberAfPricePrintBlockThresholds(uint8_t endpoint, const EmberAfPriceCommonInfo *info, const EmberAfScheduledBlockThresholds *bt)

Print block thresholds.

void

Print block threshold table.

void
emberAfPluginPriceServerPublishPriceMessage(EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t priceIndex)

Publish price message.

emberAfPluginPriceServerConversionFactorAdd(uint8_t endpoint, uint32_t issuerEventId, uint32_t startTime, uint32_t conversionFactor, uint8_t conversionFactorTrailingDigit)

Set parameters in the conversion factors table.

void

Clear the conversion factors table and invalidates all entries.

void
emberAfPluginPriceServerConversionFactorPub(uint8_t tableIndex, EmberNodeId dstAddr, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a Publish Conversion Factor command using data at the specified table index.

uint32_t

Return the number of seconds until the next conversion factor event becomes active.

void

Refresh the conversion factor information if necessary. If the second conversion factor event is active, the first is inactivated and the array is re-sorted.

emberAfPluginPriceServerCalorificValueAdd(uint8_t endpoint, uint32_t issuerEventId, uint32_t startTime, uint32_t calorificValue, uint8_t calorificValueUnit, uint8_t calorificValueTrailingDigit)

Set values in the calorific value table.

uint32_t

Return the number of seconds until the next calorific value event will become active.

void

Refresh the caloric value information if necessary. If the second calorific value event is active, the first is inactivated and the array is re-sorted.

void

Clear the calorific value table and invalidates all entries.

void
emberAfPluginPriceServerPublishTariffMessage(EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t tariffIndex)

Send a publish tariff information command.

void
emberAfPrintConversionTable(uint8_t endpoint)

Print data in the conversion factor table.

void

Print data in the calorific values table.

uint32_t

Return the number of seconds until the next CO2 value event becomes active.

void

Refresh the CO2 value information if necessary. If the second CO2 value event is active, the first is inactivated and the array is re-sorted.

void
emberAfPluginPriceServerCo2ValueAdd(uint8_t endpoint, uint32_t issuerEventId, uint32_t startTime, uint32_t providerId, uint8_t tariffType, uint32_t co2Value, uint8_t co2ValueUnit, uint8_t co2ValueTrailingDigit)

Set values in the CO2 value table.

void

Clear the CO2 value table and invalidates all entries.

void
emberAfPrintCo2ValuesTable(uint8_t endpoint)

Print data in the CO2 values table.

void
emberAfPluginPriceServerCo2LabelPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish CO2 value command.

void
emberAfPluginPriceServerTierLabelSet(uint8_t endpoint, uint8_t index, uint8_t valid, uint32_t providerId, uint32_t issuerEventId, uint32_t issuerTariffId, uint8_t tierId, uint8_t *tierLabel)

Set values in the tier label table.

void

Send the next get scheduled prices command.

void
emberAfPluginPriceServerTierLabelAddLabel(uint8_t endpoint, uint32_t issuerTariffId, uint8_t tierId, uint8_t *tierLabel)

Add a tier label to the specified tier label table.

void
emberAfPrintTierLabelsTable(uint8_t endpoint)

Print the tier labels table.

void
emberAfPluginPriceServerTierLabelPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish tier labels command.

uint32_t

Return the number of seconds until the next billing period event becomes active.

void
emberAfPriceServerRefreshBillingPeriod(uint8_t endpoint, bool force)

Refresh the billing period information if necessary. If the second billing period event is active, the first is inactivated and the array is re-sorted. If the force argument is set to true, the billing period will be forced to refresh.

EmberStatus
emberAfPluginPriceServerBillingPeriodAdd(uint8_t endpoint, uint32_t startTime, uint32_t issuerEventId, uint32_t providerId, uint32_t billingPeriodDuration, uint8_t billingPeriodDurationType, uint8_t tariffType)

Set values in the billing period table.

void
emberAfPluginPriceServerBillingPeriodPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish billing period command.

void

Print data in the billing period table for the specified endpoint.

void
emberAfPrintConsolidatedBillTableEntry(uint8_t endpoint, uint8_t index)

Print data in the consolidated bills table at the specified index.

void
emberAfPluginPriceServerConsolidatedBillAdd(uint8_t endpoint, uint32_t startTime, uint32_t issuerEventId, uint32_t providerId, uint32_t billingPeriodDuration, uint8_t billingPeriodDurationType, uint8_t tariffType, uint32_t consolidatedBill, uint16_t currency, uint8_t billTrailingDigit)

Set values in the consolidated bills table.

void
emberAfPluginPriceServerConsolidatedBillPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish consolidated bill command.

void
emberAfPluginPriceServerCppEventSet(uint8_t endpoint, uint8_t valid, uint32_t providerId, uint32_t issuerEventId, uint32_t startTime, uint16_t durationInMinutes, uint8_t tariffType, uint8_t cppPriceTier, uint8_t cppAuth)

Set values of the CPP event.

void
emberAfPluginPriceServerCppEventPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a publish CPP event command.

void

Print data in the CPP Event.

void
emberAfPluginPriceServerCreditPaymentPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish credit payment command.

void
emberAfPluginPriceServerCreditPaymentSet(uint8_t endpoint, uint8_t index, uint8_t valid, uint32_t providerId, uint32_t issuerEventId, uint32_t creditPaymentDueDate, uint32_t creditPaymentOverdueAmount, uint8_t creditPaymentStatus, uint32_t creditPayment, uint32_t creditPaymentDate, uint8_t *creditPaymentRef)

Set values in the credit payment table.

void
emberAfPluginPriceServerCurrencyConversionPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a publish currency conversion command.

void
emberAfPluginPriceServerCurrencyConversionSet(uint8_t endpoint, uint8_t valid, uint32_t providerId, uint32_t issuerEventId, uint32_t startTime, uint16_t oldCurrency, uint16_t newCurrency, uint32_t conversionFactor, uint8_t conversionFactorTrailingDigit, uint32_t currencyChangeControlFlags)

Set values for the currency conversion command.

void
emberAfPluginPriceServerTariffCancellationSet(uint8_t endpoint, uint8_t valid, uint32_t providerId, uint32_t issuerTariffId, uint8_t tariffType)

Set values in the tariff cancellation command.

void
emberAfPluginPriceServerTariffCancellationPub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a cancel tariff command.

void

Refresh tariff information.

bool
emberAfPriceAddTariffTableEntry(uint8_t endpoint, EmberAfPriceCommonInfo *info, const EmberAfScheduledTariff *curTariff)

Add a tariff table entry.

bool
emberAfPriceAddPriceMatrixRaw(uint8_t endpoint, uint32_t providerId, uint32_t issuerEventId, uint32_t startTime, uint32_t issuerTariffId, uint8_t commandIndex, uint8_t numberOfCommands, uint8_t subPayloadControl, uint8_t *payload)

Add price matrix (raw).

bool
emberAfPriceAddPriceMatrix(uint8_t endpoint, EmberAfPriceCommonInfo *info, EmberAfScheduledPriceMatrix *pm)

Add price matrix.

bool
emberAfPriceAddBlockThresholdsTableEntry(uint8_t endpoint, uint32_t providerId, uint32_t issuerEventId, uint32_t startTime, uint32_t issuerTariffId, uint8_t commandIndex, uint8_t numberOfCommands, uint8_t subpayloadControl, uint8_t *payload)
void

Clean the block period table.

void
sendValidCmdEntries(uint8_t cmdId, uint8_t endpoint, uint8_t *validEntries, uint8_t validEntryCount)

Send the next get scheduled prices command.

uint32_t

Get seconds until next active price matrix event.

void

Refresh price matrix information.

uint32_t

Get seconds until next active block threshold event.

void

Refresh block threshold information.

Typedefs#

typedef uint8_t
sli_zigbee_af_price_block_threshold[ZCL_PRICE_CLUSTER_BLOCK_THRESHOLDS_PAYLOAD_SIZE]

Macros#

#define
fieldLength (field)
#define
CURRENT BIT(1)
#define
FUTURE BIT(2)
#define
PUBLISHED BIT(3)
#define
#define
#define
#define
#define
#define

API Documentation#

emberAfPriceServerSendGetScheduledPrices#

void emberAfPriceServerSendGetScheduledPrices (uint8_t endpoint)

Send the next get scheduled prices command.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 377 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilGetScheduledPricesEvent#

uint32_t emberAfPriceServerSecondsUntilGetScheduledPricesEvent (void )

Return the number of seconds until the next get scheduled prices command should be sent.

Parameters
N/A

Returns

  • The number of seconds until the next get scheduled prices command should be sent.


Definition at line 384 of file app/framework/plugin/price-server/price-server.h

emberAfPriceClearPriceTable#

void emberAfPriceClearPriceTable (uint8_t endpoint)

Clear all prices in the price table.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 391 of file app/framework/plugin/price-server/price-server.h

emberAfPriceClearTariffTable#

void emberAfPriceClearTariffTable (uint8_t endpoint)

Clear all tariffs in the tariff table.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 398 of file app/framework/plugin/price-server/price-server.h

emberAfPriceClearPriceMatrixTable#

void emberAfPriceClearPriceMatrixTable (uint8_t endpoint)

Clear all price matrices in the price matrix table.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 405 of file app/framework/plugin/price-server/price-server.h

emberAfPriceClearBlockThresholdsTable#

void emberAfPriceClearBlockThresholdsTable (uint8_t endpoint)

Clear all block thresholds in the block thresholds table.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 412 of file app/framework/plugin/price-server/price-server.h

emberAfPriceGetPriceTableEntry#

bool emberAfPriceGetPriceTableEntry (uint8_t endpoint, uint8_t index, EmberAfScheduledPrice * price)

Get a price used by the price server plugin.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index in the price table.

N/Aprice

The EmberAfScheduledPrice structure describing the price.

This function gets a price and metadata that the plugin will send to clients. For "start now" prices that are current or scheduled, the duration is adjusted to reflect how many minutes remain for the price. Otherwise, the start time and duration of "start now" prices reflect the actual start and the original duration.

Returns

  • True if the price was found or false is the index is invalid.


Definition at line 428 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerBlockPeriodAdd#

void emberAfPluginPriceServerBlockPeriodAdd (uint8_t endpoint, uint32_t providerId, uint32_t issuerEventId, uint32_t blockPeriodStartTime, uint32_t blockPeriodDuration, uint8_t blockPeriodControl, uint8_t blockPeriodDurationType, uint32_t thresholdMultiplier, uint32_t thresholdDivisor, uint8_t tariffType, uint8_t tariffResolutionPeriod)

Set values in the block period table.

Parameters
N/Aendpoint

The relevant endpoint.

N/AproviderId

A unique identifier for the commodity provider.

N/AissuerEventId

The event ID of the block period data.

N/AblockPeriodStartTime

Time at which the block period data is valid.

N/AblockPeriodDuration

The block period duration. Units are specified by the blockPeriodDurationType.

N/AblockPeriodControl

Identifies additional control options for the block period command.

N/AblockPeriodDurationType

A bitmap that indicates the units used in the block period.

N/AthresholdMultiplier

A bitmap identifying the type of tariff published in this command.

N/AthresholdDivisor

The resolution period for the block tariff.

N/AtariffType
N/AtariffResolutionPeriod

Definition at line 446 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerBlockPeriodPub#

void emberAfPluginPriceServerBlockPeriodPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish block period command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.

N/Aindex

The index of the table whose data will be used in the command.


Definition at line 461 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerBlockPeriodPrint#

void emberAfPluginPriceServerBlockPeriodPrint (uint8_t endpoint, uint8_t index)

Print data in the specified index of the block period table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index of the table whose index will be printed.


Definition at line 470 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilBlockPeriodEvent#

uint32_t emberAfPriceServerSecondsUntilBlockPeriodEvent (uint8_t endpoint)

Return the number of seconds until the next block period event occurs.

Parameters
N/Aendpoint

The relevant endpoint.

Returns

  • Returns the number of seconds until the next block period event.


Definition at line 479 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerRefreshBlockPeriod#

void emberAfPriceServerRefreshBlockPeriod (uint8_t endpoint, bool repeat)

Update block period attributes to match the current block period.

Parameters
N/Aendpoint

The relevant endpoint.

N/Arepeat

Indicates whether or not to try to repeat the current block period in the next block period. This is also controlled by a bit in the blockPeriodControl, saying whether or not the block period should repeat on expiry.


Definition at line 490 of file app/framework/plugin/price-server/price-server.h

emberAfPriceGetTariffTableEntry#

bool emberAfPriceGetTariffTableEntry (uint8_t endpoint, uint8_t index, EmberAfPriceCommonInfo * info, EmberAfScheduledTariff * tariff)

Get a tariff used by the price server plugin.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index in the tariff table.

N/Ainfo

The EmberAfPriceCommonInfo structure describing the tariff.

N/Atariff

The EmberAfScheduledTariff structure describing the tariff.

This function gets a tariff and associated metadata that the plugin will send to clients.

Returns

  • True if the tariff was found.


Definition at line 504 of file app/framework/plugin/price-server/price-server.h

emberAfPriceGetPriceMatrix#

bool emberAfPriceGetPriceMatrix (uint8_t endpoint, uint8_t index, EmberAfPriceCommonInfo * info, EmberAfScheduledPriceMatrix * pm)

Retrieve a price matrix entry by index.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index in the price matrix table.

N/Ainfo

The EmberAfScheduledPriceMatrix structure describing the price matrix.

N/Apm

This function gets a price matrix and associated metadata that the plugin will send to clients.

Returns

  • True if the price matrix was found.


Definition at line 520 of file app/framework/plugin/price-server/price-server.h

emberAfPriceGetBlockThresholdsTableEntry#

bool emberAfPriceGetBlockThresholdsTableEntry (uint8_t endpoint, uint8_t index, EmberAfScheduledBlockThresholds * bt)

Get the block thresholds used by the Price server plugin.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index in the block thresholds table.

N/Abt

The EmberAfScheduledBlockThresholds structure describing the block thresholds.

This function gets the block thresholds and associated metadata that the plugin will send to clients.

Returns

  • True if the block thresholds was found.


Definition at line 536 of file app/framework/plugin/price-server/price-server.h

emberAfPriceGetTariffByIssuerTariffId#

bool emberAfPriceGetTariffByIssuerTariffId (uint8_t endpoint, uint32_t issuerTariffId, EmberAfPriceCommonInfo * info, EmberAfScheduledTariff * tariff)

Get a tariff by issuer tariff ID and endpoint.

Parameters
N/Aendpoint

The relevant endpoint.

N/AissuerTariffId

The issuer tariff ID.

N/Ainfo

The EmberAfPriceCommonInfo structure describing the tariff.

N/Atariff

The EmberAfScheduledTariff structure describing the tariff.

Returns

  • True if the tariff was found.


Definition at line 549 of file app/framework/plugin/price-server/price-server.h

emberAfPriceGetPriceMatrixByIssuerTariffId#

bool emberAfPriceGetPriceMatrixByIssuerTariffId (uint8_t endpoint, uint32_t issuerTariffId, EmberAfPriceCommonInfo * info, EmberAfScheduledPriceMatrix * pm)

Get a price matrix by issuer tariff ID and endpoint.

Parameters
N/Aendpoint

The relevant endpoint.

N/AissuerTariffId

The issuer tariff ID.

N/Ainfo

The EmberAfScheduledPriceMatrix structure describing the price matrix.

N/Apm

Returns

  • True if the price matrix was found.


Definition at line 562 of file app/framework/plugin/price-server/price-server.h

emberAfPriceGetBlockThresholdsByIssuerTariffId#

bool emberAfPriceGetBlockThresholdsByIssuerTariffId (uint8_t endpoint, uint32_t issuerTariffId, EmberAfPriceCommonInfo * info, EmberAfScheduledBlockThresholds * bt)

Get the block thresholds by issuer tariff ID and endpoint.

Parameters
N/Aendpoint

The relevant endpoint.

N/AissuerTariffId

The issuer tariff ID.

N/Ainfo

The EmberAfScheduledBlockThresholds structure describing the block thresholds.

N/Abt

Returns

  • True if the block thresholds were found.


Definition at line 575 of file app/framework/plugin/price-server/price-server.h

emberAfPriceSetPriceTableEntry#

bool emberAfPriceSetPriceTableEntry (uint8_t endpoint, uint8_t index, const EmberAfScheduledPrice * price)

Set a price used by the price server plugin.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index in the price table.

N/Aprice

The EmberAfScheduledPrice structure describing the price. If NULL, the price is removed from the server.

This function sets a price and metadata that the plugin will send to clients. Setting the start time to zero instructs clients to start the price now. For "start now" prices, the plugin will automatically adjust the duration reported to clients based on the original start time of the price.

Returns

  • True if the price was set or removed or false is the index is invalid.


Definition at line 595 of file app/framework/plugin/price-server/price-server.h

emberAfPriceSetTariffTableEntry#

bool emberAfPriceSetTariffTableEntry (uint8_t endpoint, uint8_t index, EmberAfPriceCommonInfo * info, const EmberAfScheduledTariff * tariff)

Set a tariff used by the price server plugin.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index in the tariff table.

N/Ainfo

The EmberAfScheduledTariff structure describing the tariff. If NULL, the tariff is removed from the server.

N/Atariff

This function sets a tariff and metadata that the plugin will send to clients.

Returns

  • True if the tariff was set or removed, or false if the index is invalid.


Definition at line 612 of file app/framework/plugin/price-server/price-server.h

emberAfPriceSetPriceMatrix#

bool emberAfPriceSetPriceMatrix (uint8_t endpoint, uint8_t index, EmberAfPriceCommonInfo * info, const EmberAfScheduledPriceMatrix * pm)

Set a price matrix entry by index.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index in the price matrix table.

N/Ainfo

The EmberAfScheduledPriceMatrix structure describing the price matrix. If NULL, the price matrix is removed from the server.

N/Apm

This function sets a price matrix and metadata that the plugin will send to clients.

Returns

  • True if the price matrix was set or removed, or false if the index is invalid.


Definition at line 631 of file app/framework/plugin/price-server/price-server.h

emberAfPriceSetBlockThresholdsTableEntry#

bool emberAfPriceSetBlockThresholdsTableEntry (uint8_t endpoint, uint8_t index, const EmberAfPriceCommonInfo * info, const EmberAfScheduledBlockThresholds * bt)

Set the block thresholds used by the price server plugin.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index in the block thresholds table.

N/Ainfo

The EmberAfScheduledBlockThresholds structure describing the block thresholds. If NULL, the block thresholds entry is removed from the table.

N/Abt

This function sets the block thresholds and metadata that the plugin will send to clients.

Returns

  • True if the block thresholds was set or removed, or false if the index is invalid.


Definition at line 650 of file app/framework/plugin/price-server/price-server.h

emberAfGetCurrentPrice#

bool emberAfGetCurrentPrice (uint8_t endpoint, EmberAfScheduledPrice * price)

Get the current price used by the price server plugin.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aprice

The EmberAfScheduledPrice structure describing the price.

This function gets the current price and metadata that the plugin will send to clients. For "start now" prices, the duration is adjusted to reflect how many minutes remain for the price. Otherwise, the start time and duration reflect the actual start and the original duration.

Returns

  • True if the current price was found or false is there is no current price.


Definition at line 668 of file app/framework/plugin/price-server/price-server.h

emberAfPriceFindFreePriceIndex#

uint8_t emberAfPriceFindFreePriceIndex (uint8_t endpoint)

Find the first free index in the price table.

Parameters
N/Aendpoint

The relevant endpoint.

This function looks through the price table and determines whether the entry is in-use or scheduled to be in use. If not, it's considered "free" for the purposes of the user adding a new price entry to the server's table and the index is returned.

Returns

  • The index of the first free (unused/unscheduled) entry in the requested endpoint's price table, or ZCL_PRICE_INVALID_INDEX if no available entry could be found.


Definition at line 683 of file app/framework/plugin/price-server/price-server.h

emberAfPricePrint#

void emberAfPricePrint (const EmberAfScheduledPrice * price)

function to print price

Parameters
N/Aprice

Definition at line 689 of file app/framework/plugin/price-server/price-server.h

emberAfPricePrintPriceTable#

void emberAfPricePrintPriceTable (uint8_t endpoint)
Parameters
N/Aendpoint

relevant endpoint

Print the price table.


Definition at line 696 of file app/framework/plugin/price-server/price-server.h

emberAfPricePrintTariff#

void emberAfPricePrintTariff (const EmberAfPriceCommonInfo * info, const EmberAfScheduledTariff * tariff)
Parameters
N/Ainfo

pointer to the common info struct

N/Atariff

pointer to the scheduled tariff struct

Print tariff.


Definition at line 704 of file app/framework/plugin/price-server/price-server.h

emberAfPricePrintTariffTable#

void emberAfPricePrintTariffTable (uint8_t endpoint)

Print tariff table.

Parameters
N/Aendpoint

relevant endpoint


Definition at line 712 of file app/framework/plugin/price-server/price-server.h

emberAfPricePrintPriceMatrix#

void emberAfPricePrintPriceMatrix (uint8_t endpoint, const EmberAfPriceCommonInfo * info, const EmberAfScheduledPriceMatrix * pm)

Print price matrix.

Parameters
N/Aendpoint

relevant endpoint

N/Ainfo

pointer to common info struct

N/Apm

pointer to scheduled price matrix struct


Definition at line 721 of file app/framework/plugin/price-server/price-server.h

emberAfPricePrintPriceMatrixTable#

void emberAfPricePrintPriceMatrixTable (uint8_t endpoint)

Print price matrix table.

Parameters
N/Aendpoint

relevant endpoint


Definition at line 730 of file app/framework/plugin/price-server/price-server.h

emberAfPricePrintBlockThresholds#

void emberAfPricePrintBlockThresholds (uint8_t endpoint, const EmberAfPriceCommonInfo * info, const EmberAfScheduledBlockThresholds * bt)

Print block thresholds.

Parameters
N/Aendpoint

relevant endpoint

N/Ainfo

pointer to common info struct

N/Abt

pointer to block threshold struct


Definition at line 739 of file app/framework/plugin/price-server/price-server.h

emberAfPricePrintBlockThresholdsTable#

void emberAfPricePrintBlockThresholdsTable (uint8_t endpoint)

Print block threshold table.

Parameters
N/Aendpoint

relevant endpoint


Definition at line 748 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerPublishPriceMessage#

void emberAfPluginPriceServerPublishPriceMessage (EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t priceIndex)

Publish price message.

Parameters
N/AnodeId
N/AsrcEndpoint
N/AdstEndpoint
N/ApriceIndex

Definition at line 758 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerConversionFactorAdd#

EmberAfStatus emberAfPluginPriceServerConversionFactorAdd (uint8_t endpoint, uint32_t issuerEventId, uint32_t startTime, uint32_t conversionFactor, uint8_t conversionFactorTrailingDigit)

Set parameters in the conversion factors table.

Parameters
N/Aendpoint

The endpoint in question.

N/AissuerEventId

The event ID of the conversion factor data.

N/AstartTime

The time when the conversion factor data is valid.

N/AconversionFactor

Accounts for changes in the volume of gas based on temperature and pressure.

N/AconversionFactorTrailingDigit

Determines where the decimal point is located in the conversion factor.


Definition at line 774 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerConversionFactorClear#

void emberAfPluginPriceServerConversionFactorClear (uint8_t endpoint)

Clear the conversion factors table and invalidates all entries.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 785 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerConversionFactorPub#

void emberAfPluginPriceServerConversionFactorPub (uint8_t tableIndex, EmberNodeId dstAddr, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a Publish Conversion Factor command using data at the specified table index.

Parameters
N/AtableIndex

The index of the conversion factor table whose data should be used in the publish conversion factor command.

N/AdstAddr

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.


Definition at line 798 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilConversionFactorEvent#

uint32_t emberAfPriceServerSecondsUntilConversionFactorEvent (uint8_t endpoint)

Return the number of seconds until the next conversion factor event becomes active.

Parameters
N/Aendpoint

The endpoint in question

Returns

  • The number of seconds until the next conversion factor event becomes active.


Definition at line 812 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerRefreshConversionFactor#

void emberAfPriceServerRefreshConversionFactor (uint8_t endpoint)

Refresh the conversion factor information if necessary. If the second conversion factor event is active, the first is inactivated and the array is re-sorted.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 822 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCalorificValueAdd#

EmberAfStatus emberAfPluginPriceServerCalorificValueAdd (uint8_t endpoint, uint32_t issuerEventId, uint32_t startTime, uint32_t calorificValue, uint8_t calorificValueUnit, uint8_t calorificValueTrailingDigit)

Set values in the calorific value table.

Parameters
N/Aendpoint

The endpoint in question @issuerEventId The event ID of the calorific value data. @startTime The time at which the calorific value data is valid. @calorificValue The amount of heat generated when a given mass of fuel is burned. @calorificValueTrailingDigit Determines where the decimal point is located in the calorific value.

N/AissuerEventId
N/AstartTime
N/AcalorificValue
N/AcalorificValueUnit
N/AcalorificValueTrailingDigit

Definition at line 836 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilCalorificValueEvent#

uint32_t emberAfPriceServerSecondsUntilCalorificValueEvent (uint8_t endpoint)

Return the number of seconds until the next calorific value event will become active.

Parameters
N/Aendpoint

The endpoint in question

Returns

  • The number of seconds until the next calorific value event becomes active.


Definition at line 850 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerRefreshCalorificValue#

void emberAfPriceServerRefreshCalorificValue (uint8_t endpoint)

Refresh the caloric value information if necessary. If the second calorific value event is active, the first is inactivated and the array is re-sorted.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 860 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCalorificValueClear#

void emberAfPluginPriceServerCalorificValueClear (uint8_t endpoint)

Clear the calorific value table and invalidates all entries.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 868 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerPublishTariffMessage#

void emberAfPluginPriceServerPublishTariffMessage (EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t tariffIndex)

Send a publish tariff information command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.

N/AtariffIndex

The index of the tariff table whose data will be used in the Publish Tariff Information command.


Definition at line 880 of file app/framework/plugin/price-server/price-server.h

emberAfPrintConversionTable#

void emberAfPrintConversionTable (uint8_t endpoint)

Print data in the conversion factor table.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 891 of file app/framework/plugin/price-server/price-server.h

emberAfPrintCalorificValuesTable#

void emberAfPrintCalorificValuesTable (uint8_t endpoint)

Print data in the calorific values table.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 899 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilCO2ValueEvent#

uint32_t emberAfPriceServerSecondsUntilCO2ValueEvent (uint8_t endpoint)

Return the number of seconds until the next CO2 value event becomes active.

Parameters
N/Aendpoint

The endpoint in question.

Returns

  • The number of seconds until the next CO2 value event becomes active.


Definition at line 909 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerRefreshCO2Value#

void emberAfPriceServerRefreshCO2Value (uint8_t endpoint)

Refresh the CO2 value information if necessary. If the second CO2 value event is active, the first is inactivated and the array is re-sorted.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 919 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCo2ValueAdd#

void emberAfPluginPriceServerCo2ValueAdd (uint8_t endpoint, uint32_t issuerEventId, uint32_t startTime, uint32_t providerId, uint8_t tariffType, uint32_t co2Value, uint8_t co2ValueUnit, uint8_t co2ValueTrailingDigit)

Set values in the CO2 value table.

Parameters
N/Aendpoint

The endpoint in question.

N/AissuerEventId

The event ID of the CO2 value table data.

N/AstartTime

The time at which the CO2 value data is valid.

N/AproviderId

A unique identifier for the commodity provider.

N/AtariffType

Bitmap identifying the type of tariff published in this command.

N/Aco2Value

Used to calculate the amount of carbon dioxide produced from energy use.

N/Aco2ValueUnit

An enumeration which defines the unit of the co2Value attribute.

N/Aco2ValueTrailingDigit

Determines where the decimal point is located in the co2Value.


Definition at line 938 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCo2ValueClear#

void emberAfPluginPriceServerCo2ValueClear (uint8_t endpoint)

Clear the CO2 value table and invalidates all entries.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 953 of file app/framework/plugin/price-server/price-server.h

emberAfPrintCo2ValuesTable#

void emberAfPrintCo2ValuesTable (uint8_t endpoint)

Print data in the CO2 values table.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 961 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCo2LabelPub#

void emberAfPluginPriceServerCo2LabelPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish CO2 value command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.

N/Aindex

The index of the CO2 values table whose data will be used in the command.


Definition at line 972 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerTierLabelSet#

void emberAfPluginPriceServerTierLabelSet (uint8_t endpoint, uint8_t index, uint8_t valid, uint32_t providerId, uint32_t issuerEventId, uint32_t issuerTariffId, uint8_t tierId, uint8_t * tierLabel)

Set values in the tier label table.

Parameters
N/Aendpoint

The endpoint in question.

N/Aindex

The index of the billing period table whose data will be modified.

N/Avalid

Indicates if data at this index is valid or not.

N/AproviderId

A unique identifier for the commodity provider.

N/AissuerEventId

The event ID of the tier labels table data.

N/AissuerTariffId

A unique identifier that identifies which tariff the labels apply to.

N/AtierId

The tier number that associated tier label applies to.

N/AtierLabel

A character string descriptor for this tier.


Definition at line 990 of file app/framework/plugin/price-server/price-server.h

emberAfPrintPrintTierLabelsTable#

void emberAfPrintPrintTierLabelsTable (void )

Send the next get scheduled prices command.

Parameters
N/A

The endpoint in question.


Definition at line 998 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerTierLabelAddLabel#

void emberAfPluginPriceServerTierLabelAddLabel (uint8_t endpoint, uint32_t issuerTariffId, uint8_t tierId, uint8_t * tierLabel)

Add a tier label to the specified tier label table.

Parameters
N/Aendpoint

The endpoint in question.

N/AissuerTariffId

A unique identifier that identifies which tariff the labels apply to.

N/AtierId

The tier number that associated tier label applies to.

N/AtierLabel

Character string descriptor for this tier.


Definition at line 1009 of file app/framework/plugin/price-server/price-server.h

emberAfPrintTierLabelsTable#

void emberAfPrintTierLabelsTable (uint8_t endpoint)

Print the tier labels table.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 1020 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerTierLabelPub#

void emberAfPluginPriceServerTierLabelPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish tier labels command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.

N/Aindex

The index of the tier labels table whose data will be used in the Publish Tier Labels command.


Definition at line 1032 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilBillingPeriodEvent#

uint32_t emberAfPriceServerSecondsUntilBillingPeriodEvent (uint8_t endpoint)

Return the number of seconds until the next billing period event becomes active.

Parameters
N/Aendpoint

The endpoint in question.

Returns

  • The number of seconds until the next billing period event becomes active.


Definition at line 1042 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerRefreshBillingPeriod#

void emberAfPriceServerRefreshBillingPeriod (uint8_t endpoint, bool force)

Refresh the billing period information if necessary. If the second billing period event is active, the first is inactivated and the array is re-sorted. If the force argument is set to true, the billing period will be forced to refresh.

Parameters
N/Aendpoint

The endpoint in question.

N/Aforce

Whether or not the billing period should be forced to refresh.


Definition at line 1054 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerBillingPeriodAdd#

EmberStatus emberAfPluginPriceServerBillingPeriodAdd (uint8_t endpoint, uint32_t startTime, uint32_t issuerEventId, uint32_t providerId, uint32_t billingPeriodDuration, uint8_t billingPeriodDurationType, uint8_t tariffType)

Set values in the billing period table.

Parameters
N/Aendpoint

The endpoint in question.

N/AstartTime

The time at which the billing period data is valid.

N/AissuerEventId

The event ID of the billing period data.

N/AproviderId

A unique identifier for the commodity provider.

N/AbillingPeriodDuration

The billing period duration. Units are specified by the billingPeriodDurationType.

N/AbillingPeriodDurationType

A bitmap that indicates the units used in the billing period.

N/AtariffType

Bitmap identifying the type of tariff published in this command.


Definition at line 1070 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerBillingPeriodPub#

void emberAfPluginPriceServerBillingPeriodPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish billing period command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.

N/Aindex

The index of the table whose data will be used in the command.


Definition at line 1086 of file app/framework/plugin/price-server/price-server.h

emberAfPrintBillingPeriodTable#

void emberAfPrintBillingPeriodTable (uint8_t endpoint)

Print data in the billing period table for the specified endpoint.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 1095 of file app/framework/plugin/price-server/price-server.h

emberAfPrintConsolidatedBillTableEntry#

void emberAfPrintConsolidatedBillTableEntry (uint8_t endpoint, uint8_t index)

Print data in the consolidated bills table at the specified index.

Parameters
N/Aendpoint

The endpoint in question.

N/Aindex

The index of the consolidated bills table whose data should be printed.


Definition at line 1104 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerConsolidatedBillAdd#

void emberAfPluginPriceServerConsolidatedBillAdd (uint8_t endpoint, uint32_t startTime, uint32_t issuerEventId, uint32_t providerId, uint32_t billingPeriodDuration, uint8_t billingPeriodDurationType, uint8_t tariffType, uint32_t consolidatedBill, uint16_t currency, uint8_t billTrailingDigit)

Set values in the consolidated bills table.

Parameters
N/Aendpoint

The endpoint in question.

N/AstartTime

The time at which the consolidated bills data is valid.

N/AissuerEventId

The event ID of the consolidated bills data.

N/AproviderId

A unique identifier for the commodity provider.

N/AbillingPeriodDuration

The billing period duration. Units are specified by the billingPeriodDurationType.

N/AbillingPeriodDurationType

A bitmap that indicates the units used in the billing period.

N/AtariffType

Bitmap identifying the type of tariff published in this command.

N/AconsolidatedBill

The consolidated bill value for the specified billing period.

N/Acurrency

The currency used in the consolidatedBill field.

N/AbillTrailingDigit

Determines where the decimal point is located in the consolidatedBill field.


Definition at line 1123 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerConsolidatedBillPub#

void emberAfPluginPriceServerConsolidatedBillPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish consolidated bill command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.

N/Aindex

The index of the table whose data will be used in the command.


Definition at line 1138 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCppEventSet#

void emberAfPluginPriceServerCppEventSet (uint8_t endpoint, uint8_t valid, uint32_t providerId, uint32_t issuerEventId, uint32_t startTime, uint16_t durationInMinutes, uint8_t tariffType, uint8_t cppPriceTier, uint8_t cppAuth)

Set values of the CPP event.

Parameters
N/Aendpoint

The endpoint in question.

N/Avalid

Indicates if the CPP Event data is valid or not.

N/AproviderId

A unique identifier for the commodity provider.

N/AissuerEventId

The event ID of the CPP Event.

N/AstartTime

The time at which the CPP Event data is valid.

N/AdurationInMinutes

Defines the duration of the CPP Event.

N/AtariffType

Bitmap identifying the type of tariff published in this command.

N/AcppPriceTier

Indicates which CPP price tier should be used for the event.

N/AcppAuth

The status of the CPP event.


Definition at line 1154 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCppEventPub#

void emberAfPluginPriceServerCppEventPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a publish CPP event command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.


Definition at line 1165 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCppEventPrint#

void emberAfPluginPriceServerCppEventPrint (uint8_t endpoint)

Print data in the CPP Event.

Parameters
N/Aendpoint

The endpoint in question.


Definition at line 1173 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCreditPaymentPub#

void emberAfPluginPriceServerCreditPaymentPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish credit payment command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.

N/Aindex

The index of the table whose data will be used in the command.


Definition at line 1184 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCreditPaymentSet#

void emberAfPluginPriceServerCreditPaymentSet (uint8_t endpoint, uint8_t index, uint8_t valid, uint32_t providerId, uint32_t issuerEventId, uint32_t creditPaymentDueDate, uint32_t creditPaymentOverdueAmount, uint8_t creditPaymentStatus, uint32_t creditPayment, uint32_t creditPaymentDate, uint8_t * creditPaymentRef)

Set values in the credit payment table.

Parameters
N/Aendpoint

The endpoint in question.

N/Aindex

The index of the credit payment table whose data will be modified.

N/Avalid

Indicates if data at this index is valid or not.

N/AproviderId

A unique identifier for the commodity provider.

N/AissuerEventId

The event ID of the credit payment data.

N/AcreditPaymentDueDate

The time the next credit payment is due.

N/AcreditPaymentOverdueAmount

The current amount that is overdue from the customer.

N/AcreditPaymentStatus

Indicates the current credit payment status.

N/AcreditPayment

The amount of the last credit payment.

N/AcreditPaymentDate

The time at which the last credit payment was made.

N/AcreditPaymentRef

A string used to denote the last credit payment reference used by the energy supplier.


Definition at line 1203 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCurrencyConversionPub#

void emberAfPluginPriceServerCurrencyConversionPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a publish currency conversion command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.


Definition at line 1219 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerCurrencyConversionSet#

void emberAfPluginPriceServerCurrencyConversionSet (uint8_t endpoint, uint8_t valid, uint32_t providerId, uint32_t issuerEventId, uint32_t startTime, uint16_t oldCurrency, uint16_t newCurrency, uint32_t conversionFactor, uint8_t conversionFactorTrailingDigit, uint32_t currencyChangeControlFlags)

Set values for the currency conversion command.

Parameters
N/Aendpoint

The endpoint in question.

N/Avalid

Indicates if the currency conversion data is valid or not.

N/AproviderId

A unique identifier for the commodity provider.

N/AissuerEventId

The event ID of the currency conversion data.

N/AstartTime

The time at which the currency conversion data is valid.

N/AoldCurrency

Information about the old unit of currency.

N/AnewCurrency

Information about the new unit of currency.

N/AconversionFactor

Accounts for changes in the volume of gas based on temperature and pressure.

N/AconversionFactorTrailingDigit

Determines where the decimal point is located in the conversion factor.

N/AcurrencyChangeControlFlags

Denotes functions that are required to be carried out by the client.


Definition at line 1236 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerTariffCancellationSet#

void emberAfPluginPriceServerTariffCancellationSet (uint8_t endpoint, uint8_t valid, uint32_t providerId, uint32_t issuerTariffId, uint8_t tariffType)

Set values in the tariff cancellation command.

Parameters
N/Aendpoint

The endpoint in question.

N/Avalid

Indicates if the tariff cancellation command is valid or not.

N/AproviderId

A unique identifier for the commodity provider.

N/AissuerTariffId

Unique identifier that identifies which tariff should be canceled.

N/AtariffType

A bitmap identifying the type of tariff to be canceled.


Definition at line 1252 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerTariffCancellationPub#

void emberAfPluginPriceServerTariffCancellationPub (uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a cancel tariff command.

Parameters
N/AnodeId

The destination address to which the command should be sent.

N/AsrcEndpoint

The source endpoint used in the transmission.

N/AdstEndpoint

The destination endpoint used in the transmission.


Definition at line 1263 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilTariffInfoEvent#

uint32_t emberAfPriceServerSecondsUntilTariffInfoEvent (uint8_t endpoint)
Parameters
N/Aendpoint

relevant endpoint

Get seconds until the next tariff info event.

Returns

  • unit32_t seconds until next tariff info event


Definition at line 1272 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerRefreshTariffInformation#

void emberAfPriceServerRefreshTariffInformation (uint8_t endpoint)

Refresh tariff information.

Parameters
N/Aendpoint

relevant endpoint


Definition at line 1279 of file app/framework/plugin/price-server/price-server.h

emberAfPriceAddTariffTableEntry#

bool emberAfPriceAddTariffTableEntry (uint8_t endpoint, EmberAfPriceCommonInfo * info, const EmberAfScheduledTariff * curTariff)

Add a tariff table entry.

Parameters
N/Aendpoint

relevant endpoint

N/Ainfo

pointer to common info struct

N/AcurTariff

pointer to scheduled tariff struct

Returns

  • bool true is success


Definition at line 1290 of file app/framework/plugin/price-server/price-server.h

emberAfPriceAddPriceMatrixRaw#

bool emberAfPriceAddPriceMatrixRaw (uint8_t endpoint, uint32_t providerId, uint32_t issuerEventId, uint32_t startTime, uint32_t issuerTariffId, uint8_t commandIndex, uint8_t numberOfCommands, uint8_t subPayloadControl, uint8_t * payload)

Add price matrix (raw).

Parameters
N/Aendpoint

relevant endpoint

N/AproviderId
N/AissuerEventId
N/AstartTime
N/AissuerTariffId
N/AcommandIndex
N/AnumberOfCommands
N/AsubPayloadControl
N/Apayload

Returns

  • bool true is success


Definition at line 1307 of file app/framework/plugin/price-server/price-server.h

emberAfPriceAddPriceMatrix#

bool emberAfPriceAddPriceMatrix (uint8_t endpoint, EmberAfPriceCommonInfo * info, EmberAfScheduledPriceMatrix * pm)

Add price matrix.

Parameters
N/Aendpoint

relevant endpoint

N/Ainfo

pointer to the common info struct

N/Apm

pointer to the scheduled price matrix struct

Returns

  • bool true is success


Definition at line 1326 of file app/framework/plugin/price-server/price-server.h

emberAfPriceAddBlockThresholdsTableEntry#

bool emberAfPriceAddBlockThresholdsTableEntry (uint8_t endpoint, uint32_t providerId, uint32_t issuerEventId, uint32_t startTime, uint32_t issuerTariffId, uint8_t commandIndex, uint8_t numberOfCommands, uint8_t subpayloadControl, uint8_t * payload)
Parameters
N/Aendpoint

relevant endpoint

N/AproviderId
N/AissuerEventId
N/AstartTime
N/AissuerTariffId
N/AcommandIndex
N/AnumberOfCommands
N/AsubpayloadControl
N/Apayload

Add a table entry for block threshold table.

Returns

  • bool true is success


Definition at line 1343 of file app/framework/plugin/price-server/price-server.h

emberAfPriceClearBlockPeriodTable#

void emberAfPriceClearBlockPeriodTable (uint8_t endpoint)

Clean the block period table.

Parameters
N/Aendpoint

relevant endpoint


Definition at line 1358 of file app/framework/plugin/price-server/price-server.h

sendValidCmdEntries#

void sendValidCmdEntries (uint8_t cmdId, uint8_t endpoint, uint8_t * validEntries, uint8_t validEntryCount)

Send the next get scheduled prices command.

Parameters
N/AcmdId

The endpoint in question.

N/Aendpoint
N/AvalidEntries
N/AvalidEntryCount

Definition at line 1359 of file app/framework/plugin/price-server/price-server.h

emberAfPluginPriceServerPriceUpdateBindings#

void emberAfPluginPriceServerPriceUpdateBindings (void )

Update bindings.

Parameters
N/A

Definition at line 1367 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilActivePriceMatrixEvent#

uint32_t emberAfPriceServerSecondsUntilActivePriceMatrixEvent (uint8_t endpoint)

Get seconds until next active price matrix event.

Parameters
N/Aendpoint

relevant endpoint

Returns

  • uint32_t seconds until next price matrix event


Definition at line 1376 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerRefreshPriceMatrixInformation#

void emberAfPriceServerRefreshPriceMatrixInformation (uint8_t endpoint)

Refresh price matrix information.

Parameters
N/Aendpoint

relevant endpoint


Definition at line 1383 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerSecondsUntilActiveBlockThresholdsEvent#

uint32_t emberAfPriceServerSecondsUntilActiveBlockThresholdsEvent (uint8_t endpoint)

Get seconds until next active block threshold event.

Parameters
N/Aendpoint

relevant endpoint

Returns

  • uint32_t seconds until next block threshold event


Definition at line 1392 of file app/framework/plugin/price-server/price-server.h

emberAfPriceServerRefreshBlockThresholdsInformation#

void emberAfPriceServerRefreshBlockThresholdsInformation (uint8_t endpoint)

Refresh block threshold information.

Parameters
N/Aendpoint

relevant endpoint


Definition at line 1399 of file app/framework/plugin/price-server/price-server.h

Typedef Documentation#

sli_zigbee_af_price_block_threshold#

typedef uint8_t sli_zigbee_af_price_block_threshold[ZCL_PRICE_CLUSTER_BLOCK_THRESHOLDS_PAYLOAD_SIZE] [ZCL_PRICE_CLUSTER_BLOCK_THRESHOLDS_PAYLOAD_SIZE]

Definition at line 293 of file app/framework/plugin/price-server/price-server.h

Variable Documentation#

priceServerInfo#

EmberAfPriceServerInfo priceServerInfo

Definition at line 365 of file app/framework/plugin/price-server/price-server.h

Macro Definition Documentation#

EMBER_AF_PLUGIN_PRICE_SERVER_PRICE_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_PRICE_TABLE_SIZE
Value:
(5)

Definition at line 48 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_TARIFF_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_TARIFF_TABLE_SIZE
Value:
(2)

Definition at line 52 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_BILLING_PERIOD_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_BILLING_PERIOD_TABLE_SIZE
Value:
(2)

Definition at line 56 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_MAX_TIERS_PER_TARIFF#

#define EMBER_AF_PLUGIN_PRICE_SERVER_MAX_TIERS_PER_TARIFF
Value:
(2)

Definition at line 60 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_TIER_LABELS_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_TIER_LABELS_TABLE_SIZE
Value:
(2)

Definition at line 64 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_BLOCK_PERIOD_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_BLOCK_PERIOD_TABLE_SIZE
Value:
(2)

Definition at line 68 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_CONSOLIDATED_BILL_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_CONSOLIDATED_BILL_TABLE_SIZE
Value:
(5)

Definition at line 72 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_CREDIT_PAYMENT_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_CREDIT_PAYMENT_TABLE_SIZE
Value:
(5)

Definition at line 76 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_CALORIFIC_VALUE_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_CALORIFIC_VALUE_TABLE_SIZE
Value:
(2)

Definition at line 80 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_CO2_VALUE_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_CO2_VALUE_TABLE_SIZE
Value:
(2)

Definition at line 84 of file app/framework/plugin/price-server/price-server.h

EMBER_AF_PLUGIN_PRICE_SERVER_CONVERSION_FACTOR_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_SERVER_CONVERSION_FACTOR_TABLE_SIZE
Value:
(2)

Definition at line 88 of file app/framework/plugin/price-server/price-server.h

ZCL_PRICE_CLUSTER_BLOCK_THRESHOLDS_PAYLOAD_SIZE#

#define ZCL_PRICE_CLUSTER_BLOCK_THRESHOLDS_PAYLOAD_SIZE
Value:
(6u)

Definition at line 91 of file app/framework/plugin/price-server/price-server.h

ZCL_PRICE_CLUSTER_PRICE_MATRIX_SUBPAYLOAD_BLOCK_SIZE#

#define ZCL_PRICE_CLUSTER_PRICE_MATRIX_SUBPAYLOAD_BLOCK_SIZE
Value:
(5u)

Definition at line 92 of file app/framework/plugin/price-server/price-server.h

fieldLength#

#define fieldLength
Value:
(field)

Definition at line 94 of file app/framework/plugin/price-server/price-server.h

ZCL_PRICE_CLUSTER_MAX_TOU_BLOCKS#

#define ZCL_PRICE_CLUSTER_MAX_TOU_BLOCKS
Value:
(15u)

Definition at line 97 of file app/framework/plugin/price-server/price-server.h

ZCL_PRICE_CLUSTER_MAX_TOU_BLOCK_TIERS#

#define ZCL_PRICE_CLUSTER_MAX_TOU_BLOCK_TIERS
Value:
(15u)

Definition at line 98 of file app/framework/plugin/price-server/price-server.h

ZCL_PRICE_CLUSTER_MAX_TOU_TIERS#

#define ZCL_PRICE_CLUSTER_MAX_TOU_TIERS
Value:
(48u)

Definition at line 99 of file app/framework/plugin/price-server/price-server.h

ZCL_PRICE_CLUSTER_PRICE_MATRIX_SUB_PAYLOAD_ENTRY_SIZE#

#define ZCL_PRICE_CLUSTER_PRICE_MATRIX_SUB_PAYLOAD_ENTRY_SIZE
Value:
(5u)

Definition at line 100 of file app/framework/plugin/price-server/price-server.h

CURRENT#

#define CURRENT
Value:
BIT(1)

Definition at line 104 of file app/framework/plugin/price-server/price-server.h

FUTURE#

#define FUTURE
Value:
BIT(2)

Definition at line 105 of file app/framework/plugin/price-server/price-server.h

PUBLISHED#

#define PUBLISHED
Value:
BIT(3)

Definition at line 106 of file app/framework/plugin/price-server/price-server.h

TARIFF_TYPE_MASK#

#define TARIFF_TYPE_MASK
Value:
(0x0Fu)

Definition at line 108 of file app/framework/plugin/price-server/price-server.h

CHARGING_SCHEME_MASK#

#define CHARGING_SCHEME_MASK
Value:
(0xF0u)

Definition at line 109 of file app/framework/plugin/price-server/price-server.h

tariffIsCurrent#

#define tariffIsCurrent
Value:
(tariff)

Definition at line 111 of file app/framework/plugin/price-server/price-server.h

tariffIsFuture#

#define tariffIsFuture
Value:
(tariff)

Definition at line 112 of file app/framework/plugin/price-server/price-server.h

tariffIsPublished#

#define tariffIsPublished
Value:
(tariff)

Definition at line 113 of file app/framework/plugin/price-server/price-server.h

priceMatrixIsCurrent#

#define priceMatrixIsCurrent
Value:
(pm)

Definition at line 114 of file app/framework/plugin/price-server/price-server.h

priceMatrixIsFuture#

#define priceMatrixIsFuture
Value:
(pm)

Definition at line 115 of file app/framework/plugin/price-server/price-server.h

priceMatrixIsPublished#

#define priceMatrixIsPublished
Value:
(pm)

Definition at line 116 of file app/framework/plugin/price-server/price-server.h

blockThresholdsIsCurrent#

#define blockThresholdsIsCurrent
Value:
(bt)

Definition at line 117 of file app/framework/plugin/price-server/price-server.h

blockThresholdsIsFuture#

#define blockThresholdsIsFuture
Value:
(bt)

Definition at line 118 of file app/framework/plugin/price-server/price-server.h

blockThresholdsIsPublished#

#define blockThresholdsIsPublished
Value:
(bt)

Definition at line 119 of file app/framework/plugin/price-server/price-server.h

CREDIT_PAYMENT_REF_STRING_LEN#

#define CREDIT_PAYMENT_REF_STRING_LEN
Value:
(20u)

Definition at line 177 of file app/framework/plugin/price-server/price-server.h

TIER_LABEL_SIZE#

#define TIER_LABEL_SIZE
Value:
(12u)

Definition at line 223 of file app/framework/plugin/price-server/price-server.h