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#

sl_zigbee_af_price_block_period_t

sl_zigbee_af_price_billing_period_t

sl_zigbee_af_price_cpp_event_t

sl_zigbee_af_price_consolidated_bills_t

sl_zigbee_af_price_credit_payment_t

sl_zigbee_af_price_conversion_factor_t

sl_zigbee_af_price_calorific_value_t

sl_zigbee_af_price_cancel_tariff_t

sl_zigbee_af_price_co2_value_t

sl_zigbee_af_price_currency_conversion_t

sl_zigbee_af_price_tier_label_value_t

sl_zigbee_af_price_tier_label_table_t

sl_zigbee_af_price_block_period_table_t

sl_zigbee_af_price_billing_period_table_t

sl_zigbee_af_price_cpp_table_t

sl_zigbee_af_price_consolidated_bills_table_t

sl_zigbee_af_price_credit_payment_table_t

sl_zigbee_af_price_conversion_factor_table_t

sl_zigbee_af_price_calorific_value_table_t

sl_zigbee_af_price_co2_table_t

sl_zigbee_af_price_currency_conversion_table_t

sl_zigbee_af_price_cancel_tariff_table_t

sl_zigbee_af_scheduled_block_thresholds_t

sl_zigbee_af_scheduled_block_thresholds_table_t

sl_zigbee_af_scheduled_tariff_t

sl_zigbee_af_scheduled_tariff_table_t

sl_zigbee_af_scheduled_price_matrix_t

sl_zigbee_af_scheduled_price_matrix_table_t

sl_zigbee_af_price_server_info_t

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

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
sl_zigbee_af_price_get_price_table_entry(uint8_t endpoint, uint8_t index, sl_zigbee_af_scheduled_price_t *price)

Get a price used by the price server plugin.

void
sl_zigbee_af_price_server_block_period_add(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
sl_zigbee_af_price_server_block_period_pub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish block period command.

void
sl_zigbee_af_price_server_block_period_print(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
sl_zigbee_af_price_server_refresh_block_period(uint8_t endpoint, bool repeat)

Update block period attributes to match the current block period.

bool
sl_zigbee_af_price_get_tariff_table_entry(uint8_t endpoint, uint8_t index, sl_zigbee_af_price_common_info_t *info, sl_zigbee_af_scheduled_tariff_t *tariff)

Get a tariff used by the price server plugin.

bool
sl_zigbee_af_price_get_price_matrix(uint8_t endpoint, uint8_t index, sl_zigbee_af_price_common_info_t *info, sl_zigbee_af_scheduled_price_matrix_t *pm)

Retrieve a price matrix entry by index.

bool
sl_zigbee_af_price_get_block_thresholds_table_entry(uint8_t endpoint, uint8_t index, sl_zigbee_af_scheduled_block_thresholds_t *bt)

Get the block thresholds used by the Price server plugin.

bool
sl_zigbee_af_price_get_tariff_by_issuer_tariff_id(uint8_t endpoint, uint32_t issuerTariffId, sl_zigbee_af_price_common_info_t *info, sl_zigbee_af_scheduled_tariff_t *tariff)

Get a tariff by issuer tariff ID and endpoint.

bool
sl_zigbee_af_price_get_price_matrix_by_issuer_tariff_id(uint8_t endpoint, uint32_t issuerTariffId, sl_zigbee_af_price_common_info_t *info, sl_zigbee_af_scheduled_price_matrix_t *pm)

Get a price matrix by issuer tariff ID and endpoint.

bool
sl_zigbee_af_price_get_block_thresholds_by_issuer_tariff_id(uint8_t endpoint, uint32_t issuerTariffId, sl_zigbee_af_price_common_info_t *info, sl_zigbee_af_scheduled_block_thresholds_t *bt)

Get the block thresholds by issuer tariff ID and endpoint.

bool
sl_zigbee_af_price_set_price_table_entry(uint8_t endpoint, uint8_t index, const sl_zigbee_af_scheduled_price_t *price)

Set a price used by the price server plugin.

bool
sl_zigbee_af_price_set_tariff_table_entry(uint8_t endpoint, uint8_t index, sl_zigbee_af_price_common_info_t *info, const sl_zigbee_af_scheduled_tariff_t *tariff)

Set a tariff used by the price server plugin.

bool
sl_zigbee_af_price_set_price_matrix(uint8_t endpoint, uint8_t index, sl_zigbee_af_price_common_info_t *info, const sl_zigbee_af_scheduled_price_matrix_t *pm)

Set a price matrix entry by index.

bool
sl_zigbee_af_price_set_block_thresholds_table_entry(uint8_t endpoint, uint8_t index, const sl_zigbee_af_price_common_info_t *info, const sl_zigbee_af_scheduled_block_thresholds_t *bt)

Set the block thresholds used by the price server plugin.

bool
sl_zigbee_af_get_current_price(uint8_t endpoint, sl_zigbee_af_scheduled_price_t *price)

Get the current price used by the price server plugin.

uint8_t

Find the first free index in the price table.

void
sl_zigbee_af_price_print(const sl_zigbee_af_scheduled_price_t *price)

function to print price

void
sl_zigbee_af_price_print_tariff(const sl_zigbee_af_price_common_info_t *info, const sl_zigbee_af_scheduled_tariff_t *tariff)
void

Print tariff table.

void
sl_zigbee_af_price_print_price_matrix(uint8_t endpoint, const sl_zigbee_af_price_common_info_t *info, const sl_zigbee_af_scheduled_price_matrix_t *pm)

Print price matrix.

void

Print price matrix table.

void
sl_zigbee_af_price_print_block_thresholds(uint8_t endpoint, const sl_zigbee_af_price_common_info_t *info, const sl_zigbee_af_scheduled_block_thresholds_t *bt)

Print block thresholds.

void

Print block threshold table.

void
sl_zigbee_af_price_server_publish_price_message(sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t priceIndex)

Publish price message.

sl_zigbee_af_price_server_conversion_factor_add(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
sl_zigbee_af_price_server_conversion_factor_pub(uint8_t tableIndex, sl_802154_short_addr_t 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.

sl_zigbee_af_price_server_calorific_value_add(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
sl_zigbee_af_price_server_publish_tariff_message(sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t tariffIndex)

Send a publish tariff information command.

void

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
sl_zigbee_af_price_server_co2_value_add(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

Print data in the CO2 values table.

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

Send a publish CO2 value command.

void
sl_zigbee_af_price_server_tier_label_set(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
sl_zigbee_af_price_server_tier_label_add_label(uint8_t endpoint, uint32_t issuerTariffId, uint8_t tierId, uint8_t *tierLabel)

Add a tier label to the specified tier label table.

void

Print the tier labels table.

void
sl_zigbee_af_price_server_tier_label_pub(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

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.

sl_zigbee_af_price_server_billing_period_add(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
sl_zigbee_af_price_server_billing_period_pub(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
sl_zigbee_af_print_consolidated_bill_table_entry(uint8_t endpoint, uint8_t index)

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

void
sl_zigbee_af_price_server_consolidated_bill_add(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
sl_zigbee_af_price_server_consolidated_bill_pub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, uint8_t index)

Send a publish consolidated bill command.

void
sl_zigbee_af_price_server_cpp_event_set(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
sl_zigbee_af_price_server_cpp_event_pub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a publish CPP event command.

void

Print data in the CPP Event.

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

Send a publish credit payment command.

void
sl_zigbee_af_price_server_credit_payment_set(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
sl_zigbee_af_price_server_currency_conversion_pub(uint16_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Send a publish currency conversion command.

void
sl_zigbee_af_price_server_currency_conversion_set(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
sl_zigbee_af_price_server_tariff_cancellation_set(uint8_t endpoint, uint8_t valid, uint32_t providerId, uint32_t issuerTariffId, uint8_t tariffType)

Set values in the tariff cancellation command.

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

Send a cancel tariff command.

void

Refresh tariff information.

bool
sl_zigbee_af_price_add_tariff_table_entry(uint8_t endpoint, sl_zigbee_af_price_common_info_t *info, const sl_zigbee_af_scheduled_tariff_t *curTariff)

Add a tariff table entry.

bool
sl_zigbee_af_price_add_price_matrix_raw(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
sl_zigbee_af_price_add_price_matrix(uint8_t endpoint, sl_zigbee_af_price_common_info_t *info, sl_zigbee_af_scheduled_price_matrix_t *pm)

Add price matrix.

bool
sl_zigbee_af_price_add_block_thresholds_table_entry(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#

sl_zigbee_af_price_server_send_get_scheduled_prices#

void sl_zigbee_af_price_server_send_get_scheduled_prices (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

sl_zigbee_af_price_server_seconds_until_get_scheduled_prices_event#

uint32_t sl_zigbee_af_price_server_seconds_until_get_scheduled_prices_event (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

sl_zigbee_af_price_clear_price_table#

void sl_zigbee_af_price_clear_price_table (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

sl_zigbee_af_price_clear_tariff_table#

void sl_zigbee_af_price_clear_tariff_table (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

sl_zigbee_af_price_clear_price_matrix_table#

void sl_zigbee_af_price_clear_price_matrix_table (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

sl_zigbee_af_price_clear_block_thresholds_table#

void sl_zigbee_af_price_clear_block_thresholds_table (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

sl_zigbee_af_price_get_price_table_entry#

bool sl_zigbee_af_price_get_price_table_entry (uint8_t endpoint, uint8_t index, sl_zigbee_af_scheduled_price_t * 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 sl_zigbee_af_scheduled_price_t 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

sl_zigbee_af_price_server_block_period_add#

void sl_zigbee_af_price_server_block_period_add (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

sl_zigbee_af_price_server_block_period_pub#

void sl_zigbee_af_price_server_block_period_pub (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

sl_zigbee_af_price_server_block_period_print#

void sl_zigbee_af_price_server_block_period_print (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

sl_zigbee_af_price_server_seconds_until_block_period_event#

uint32_t sl_zigbee_af_price_server_seconds_until_block_period_event (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

sl_zigbee_af_price_server_refresh_block_period#

void sl_zigbee_af_price_server_refresh_block_period (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

sl_zigbee_af_price_get_tariff_table_entry#

bool sl_zigbee_af_price_get_tariff_table_entry (uint8_t endpoint, uint8_t index, sl_zigbee_af_price_common_info_t * info, sl_zigbee_af_scheduled_tariff_t * 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 sl_zigbee_af_price_common_info_t structure describing the tariff.

N/Atariff

The sl_zigbee_af_scheduled_tariff_t 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

sl_zigbee_af_price_get_price_matrix#

bool sl_zigbee_af_price_get_price_matrix (uint8_t endpoint, uint8_t index, sl_zigbee_af_price_common_info_t * info, sl_zigbee_af_scheduled_price_matrix_t * 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 sl_zigbee_af_scheduled_price_matrix_t 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

sl_zigbee_af_price_get_block_thresholds_table_entry#

bool sl_zigbee_af_price_get_block_thresholds_table_entry (uint8_t endpoint, uint8_t index, sl_zigbee_af_scheduled_block_thresholds_t * 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 sl_zigbee_af_scheduled_block_thresholds_t 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

sl_zigbee_af_price_get_tariff_by_issuer_tariff_id#

bool sl_zigbee_af_price_get_tariff_by_issuer_tariff_id (uint8_t endpoint, uint32_t issuerTariffId, sl_zigbee_af_price_common_info_t * info, sl_zigbee_af_scheduled_tariff_t * 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 sl_zigbee_af_price_common_info_t structure describing the tariff.

N/Atariff

The sl_zigbee_af_scheduled_tariff_t 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

sl_zigbee_af_price_get_price_matrix_by_issuer_tariff_id#

bool sl_zigbee_af_price_get_price_matrix_by_issuer_tariff_id (uint8_t endpoint, uint32_t issuerTariffId, sl_zigbee_af_price_common_info_t * info, sl_zigbee_af_scheduled_price_matrix_t * 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 sl_zigbee_af_scheduled_price_matrix_t 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

sl_zigbee_af_price_get_block_thresholds_by_issuer_tariff_id#

bool sl_zigbee_af_price_get_block_thresholds_by_issuer_tariff_id (uint8_t endpoint, uint32_t issuerTariffId, sl_zigbee_af_price_common_info_t * info, sl_zigbee_af_scheduled_block_thresholds_t * 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 sl_zigbee_af_scheduled_block_thresholds_t 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

sl_zigbee_af_price_set_price_table_entry#

bool sl_zigbee_af_price_set_price_table_entry (uint8_t endpoint, uint8_t index, const sl_zigbee_af_scheduled_price_t * 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 sl_zigbee_af_scheduled_price_t 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

sl_zigbee_af_price_set_tariff_table_entry#

bool sl_zigbee_af_price_set_tariff_table_entry (uint8_t endpoint, uint8_t index, sl_zigbee_af_price_common_info_t * info, const sl_zigbee_af_scheduled_tariff_t * 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 sl_zigbee_af_scheduled_tariff_t 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

sl_zigbee_af_price_set_price_matrix#

bool sl_zigbee_af_price_set_price_matrix (uint8_t endpoint, uint8_t index, sl_zigbee_af_price_common_info_t * info, const sl_zigbee_af_scheduled_price_matrix_t * 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 sl_zigbee_af_scheduled_price_matrix_t 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

sl_zigbee_af_price_set_block_thresholds_table_entry#

bool sl_zigbee_af_price_set_block_thresholds_table_entry (uint8_t endpoint, uint8_t index, const sl_zigbee_af_price_common_info_t * info, const sl_zigbee_af_scheduled_block_thresholds_t * 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 sl_zigbee_af_scheduled_block_thresholds_t 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

sl_zigbee_af_get_current_price#

bool sl_zigbee_af_get_current_price (uint8_t endpoint, sl_zigbee_af_scheduled_price_t * price)

Get the current price used by the price server plugin.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aprice

The sl_zigbee_af_scheduled_price_t 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

sl_zigbee_af_price_find_free_price_index#

uint8_t sl_zigbee_af_price_find_free_price_index (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

sl_zigbee_af_price_print#

void sl_zigbee_af_price_print (const sl_zigbee_af_scheduled_price_t * price)

function to print price

Parameters
N/Aprice

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

sl_zigbee_af_price_print_price_table#

void sl_zigbee_af_price_print_price_table (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

sl_zigbee_af_price_print_tariff#

void sl_zigbee_af_price_print_tariff (const sl_zigbee_af_price_common_info_t * info, const sl_zigbee_af_scheduled_tariff_t * 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

sl_zigbee_af_price_print_tariff_table#

void sl_zigbee_af_price_print_tariff_table (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

sl_zigbee_af_price_print_price_matrix#

void sl_zigbee_af_price_print_price_matrix (uint8_t endpoint, const sl_zigbee_af_price_common_info_t * info, const sl_zigbee_af_scheduled_price_matrix_t * 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

sl_zigbee_af_price_print_price_matrix_table#

void sl_zigbee_af_price_print_price_matrix_table (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

sl_zigbee_af_price_print_block_thresholds#

void sl_zigbee_af_price_print_block_thresholds (uint8_t endpoint, const sl_zigbee_af_price_common_info_t * info, const sl_zigbee_af_scheduled_block_thresholds_t * 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

sl_zigbee_af_price_print_block_thresholds_table#

void sl_zigbee_af_price_print_block_thresholds_table (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

sl_zigbee_af_price_server_publish_price_message#

void sl_zigbee_af_price_server_publish_price_message (sl_802154_short_addr_t 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

sl_zigbee_af_price_server_conversion_factor_add#

sl_zigbee_af_status_t sl_zigbee_af_price_server_conversion_factor_add (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

sl_zigbee_af_price_server_conversion_factor_clear#

void sl_zigbee_af_price_server_conversion_factor_clear (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

sl_zigbee_af_price_server_conversion_factor_pub#

void sl_zigbee_af_price_server_conversion_factor_pub (uint8_t tableIndex, sl_802154_short_addr_t 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

sl_zigbee_af_price_server_seconds_until_conversion_factor_event#

uint32_t sl_zigbee_af_price_server_seconds_until_conversion_factor_event (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

sl_zigbee_af_price_server_refresh_conversion_factor#

void sl_zigbee_af_price_server_refresh_conversion_factor (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

sl_zigbee_af_price_server_calorific_value_add#

sl_zigbee_af_status_t sl_zigbee_af_price_server_calorific_value_add (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

sl_zigbee_af_price_server_seconds_until_calorific_value_event#

uint32_t sl_zigbee_af_price_server_seconds_until_calorific_value_event (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

sl_zigbee_af_price_server_refresh_calorific_value#

void sl_zigbee_af_price_server_refresh_calorific_value (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

sl_zigbee_af_price_server_calorific_value_clear#

void sl_zigbee_af_price_server_calorific_value_clear (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

sl_zigbee_af_price_server_publish_tariff_message#

void sl_zigbee_af_price_server_publish_tariff_message (sl_802154_short_addr_t 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

sl_zigbee_af_print_conversion_table#

void sl_zigbee_af_print_conversion_table (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

sl_zigbee_af_print_calorific_values_table#

void sl_zigbee_af_print_calorific_values_table (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

sl_zigbee_af_price_server_seconds_until_co2_value_event#

uint32_t sl_zigbee_af_price_server_seconds_until_co2_value_event (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

sl_zigbee_af_price_server_refresh_co2_value#

void sl_zigbee_af_price_server_refresh_co2_value (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

sl_zigbee_af_price_server_co2_value_add#

void sl_zigbee_af_price_server_co2_value_add (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

sl_zigbee_af_price_server_co2_value_clear#

void sl_zigbee_af_price_server_co2_value_clear (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

sl_zigbee_af_print_co2_values_table#

void sl_zigbee_af_print_co2_values_table (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

sl_zigbee_af_price_server_co2_label_pub#

void sl_zigbee_af_price_server_co2_label_pub (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

sl_zigbee_af_price_server_tier_label_set#

void sl_zigbee_af_price_server_tier_label_set (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

sl_zigbee_af_print_print_tier_labels_table#

void sl_zigbee_af_print_print_tier_labels_table (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

sl_zigbee_af_price_server_tier_label_add_label#

void sl_zigbee_af_price_server_tier_label_add_label (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

sl_zigbee_af_print_tier_labels_table#

void sl_zigbee_af_print_tier_labels_table (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

sl_zigbee_af_price_server_tier_label_pub#

void sl_zigbee_af_price_server_tier_label_pub (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

sl_zigbee_af_price_server_seconds_until_billing_period_event#

uint32_t sl_zigbee_af_price_server_seconds_until_billing_period_event (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

sl_zigbee_af_price_server_refresh_billing_period#

void sl_zigbee_af_price_server_refresh_billing_period (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

sl_zigbee_af_price_server_billing_period_add#

sl_status_t sl_zigbee_af_price_server_billing_period_add (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

sl_zigbee_af_price_server_billing_period_pub#

void sl_zigbee_af_price_server_billing_period_pub (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

sl_zigbee_af_print_billing_period_table#

void sl_zigbee_af_print_billing_period_table (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

sl_zigbee_af_print_consolidated_bill_table_entry#

void sl_zigbee_af_print_consolidated_bill_table_entry (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

sl_zigbee_af_price_server_consolidated_bill_add#

void sl_zigbee_af_price_server_consolidated_bill_add (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

sl_zigbee_af_price_server_consolidated_bill_pub#

void sl_zigbee_af_price_server_consolidated_bill_pub (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

sl_zigbee_af_price_server_cpp_event_set#

void sl_zigbee_af_price_server_cpp_event_set (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

sl_zigbee_af_price_server_cpp_event_pub#

void sl_zigbee_af_price_server_cpp_event_pub (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

sl_zigbee_af_price_server_cpp_event_print#

void sl_zigbee_af_price_server_cpp_event_print (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

sl_zigbee_af_price_server_credit_payment_pub#

void sl_zigbee_af_price_server_credit_payment_pub (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

sl_zigbee_af_price_server_credit_payment_set#

void sl_zigbee_af_price_server_credit_payment_set (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

sl_zigbee_af_price_server_currency_conversion_pub#

void sl_zigbee_af_price_server_currency_conversion_pub (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

sl_zigbee_af_price_server_currency_conversion_set#

void sl_zigbee_af_price_server_currency_conversion_set (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

sl_zigbee_af_price_server_tariff_cancellation_set#

void sl_zigbee_af_price_server_tariff_cancellation_set (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

sl_zigbee_af_price_server_tariff_cancellation_pub#

void sl_zigbee_af_price_server_tariff_cancellation_pub (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

sl_zigbee_af_price_server_seconds_until_tariff_info_event#

uint32_t sl_zigbee_af_price_server_seconds_until_tariff_info_event (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

sl_zigbee_af_price_server_refresh_tariff_information#

void sl_zigbee_af_price_server_refresh_tariff_information (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

sl_zigbee_af_price_add_tariff_table_entry#

bool sl_zigbee_af_price_add_tariff_table_entry (uint8_t endpoint, sl_zigbee_af_price_common_info_t * info, const sl_zigbee_af_scheduled_tariff_t * 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

sl_zigbee_af_price_add_price_matrix_raw#

bool sl_zigbee_af_price_add_price_matrix_raw (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

sl_zigbee_af_price_add_price_matrix#

bool sl_zigbee_af_price_add_price_matrix (uint8_t endpoint, sl_zigbee_af_price_common_info_t * info, sl_zigbee_af_scheduled_price_matrix_t * 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

sl_zigbee_af_price_add_block_thresholds_table_entry#

bool sl_zigbee_af_price_add_block_thresholds_table_entry (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

sl_zigbee_af_price_clear_block_period_table#

void sl_zigbee_af_price_clear_block_period_table (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

sl_zigbee_af_price_server_price_update_bindings#

void sl_zigbee_af_price_server_price_update_bindings (void )

Update bindings.

Parameters
N/A

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

sl_zigbee_af_price_server_seconds_until_active_price_matrix_event#

uint32_t sl_zigbee_af_price_server_seconds_until_active_price_matrix_event (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

sl_zigbee_af_price_server_refresh_price_matrix_information#

void sl_zigbee_af_price_server_refresh_price_matrix_information (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

sl_zigbee_af_price_server_seconds_until_active_block_thresholds_event#

uint32_t sl_zigbee_af_price_server_seconds_until_active_block_thresholds_event (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

sl_zigbee_af_price_server_refresh_block_thresholds_information#

void sl_zigbee_af_price_server_refresh_block_thresholds_information (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#

sl_zigbee_af_price_server_info_t priceServerInfo

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

Macro Definition Documentation#

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_PRICE_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_PRICE_TABLE_SIZE
Value:
(5)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_TARIFF_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_TARIFF_TABLE_SIZE
Value:
(2)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_BILLING_PERIOD_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_BILLING_PERIOD_TABLE_SIZE
Value:
(2)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_MAX_TIERS_PER_TARIFF#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_MAX_TIERS_PER_TARIFF
Value:
(2)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_TIER_LABELS_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_TIER_LABELS_TABLE_SIZE
Value:
(2)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_BLOCK_PERIOD_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_BLOCK_PERIOD_TABLE_SIZE
Value:
(2)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CONSOLIDATED_BILL_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CONSOLIDATED_BILL_TABLE_SIZE
Value:
(5)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CREDIT_PAYMENT_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CREDIT_PAYMENT_TABLE_SIZE
Value:
(5)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CALORIFIC_VALUE_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CALORIFIC_VALUE_TABLE_SIZE
Value:
(2)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CO2_VALUE_TABLE_SIZE#

#define SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CO2_VALUE_TABLE_SIZE
Value:
(2)

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

SL_ZIGBEE_AF_PLUGIN_PRICE_SERVER_CONVERSION_FACTOR_TABLE_SIZE#

#define SL_ZIGBEE_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