Price Client#

API and Callbacks for the Price Cluster Client Component.

This component provides an implementation of a Price client. It simply stores the prices received over-the-air. This component requires extending to act on the price changes.

Modules#

EmberAfPriceClientCommonInfo

EmberAfPriceClientBillingPeriod

EmberAfPriceClientBlockPeriod

EmberAfPriceClientBlockThreshold

EmberAfPriceClientCalorificValue

EmberAfPriceClientCo2Value

EmberAfPriceClientConversionFactor

EmberAfPriceClientCppEvent

EmberAfPriceClientCreditPayment

EmberAfPriceClientCurrencyConversion

EmberAfPriceClientTierLabels

EmberAfPriceClientBillingPeriodTable

EmberAfPriceClientBlockPeriodTable

EmberAfPriceClientBlockThresholdTable

EmberAfPriceClientCalorificValueTable

EmberAfPriceClientCo2ValueTable

EmberAfPriceClientConversionFactorTable

EmberAfPriceClientCppEventTable

EmberAfPriceClientCreditPaymentTable

EmberAfPriceClientCurrencyConversionTable

EmberAfPriceClientTierLabelsTable

EmberAfPriceClientInfo

Price Client

API#

void

Initialize the consolidated bills table.

uint8_t

Return the index of the currently active CO2 entry, or 0xFF if no active entry can be found.

void
emberAfPricePrintCppEvent(uint8_t endpoint)

Print information about the CPP event.

uint8_t
emberAfPriceClusterCurrencyConversionTableGetIndexByEventId(uint8_t endpoint, uint32_t issuerEventId)

Return the currency conversion table index with a matching eventId.

uint8_t

Return the index of the currently active currency conversion entry, or 0xFF if no active entry can be found.

Functions#

void
sli_zigbee_af_price_client_print_by_event_id(uint8_t endpoint, uint32_t issuerEventId)
uint8_t
sli_zigbee_af_price_get_block_period_table_index_by_event_id(uint8_t endpoint, uint32_t issuerEventId)

Return the block period table index with a matching eventId.

void

Print the information at the specified index of the block period table.

uint8_t
sli_zigbee_af_price_get_conversion_factor_index_by_event_id(uint8_t endpoint, uint32_t issuerEventId)

Return the conversion factor table index with a matching eventId.

void

Print the information at the specified index of the conversion factor table.

uint8_t
sli_zigbee_af_price_get_calorific_value_index_by_event_id(uint8_t endpoint, uint32_t issuerEventId)

Return the calorific value table index with a matching eventId.

void

Print the information at the specified index of the calorific value table.

uint8_t

Return the index of the currently active tier label table entry, or 0xFF if no active entry can be found.

void

Print the information at the specified index of the tier label table.

void

Print the information at the specified index of the CO2 value table.

uint8_t

Return the consolidated bill table index with a matching eventId.

uint8_t

Return the index of the active consolidated bill table.

void

Print the information at the specified index of the consolidated bill table.

uint8_t

Return the credit payment table index with a matching eventId.

void

Print the credit payment table entry data of the index with a valid matching eventId.

void

Print the information at the specified index of the credit payment table.

void

Print the information at the specified index of the currency conversion table.

uint8_t

Return the index of the currently active billing period entry, or 0xFF if no active entry can be found.

void

Print the information at the specified index of the billing period table.

API Documentation#

emberAfPriceInitConsolidatedBillsTable#

void emberAfPriceInitConsolidatedBillsTable (uint8_t endpoint)

Initialize the consolidated bills table.

Parameters
N/Aendpoint

The relevant endpoint.


Definition at line 231 of file app/framework/plugin/price-client/price-client.h

emberAfPriceClusterGetActiveCo2ValueIndex#

uint8_t emberAfPriceClusterGetActiveCo2ValueIndex (uint8_t endpoint)

Return the index of the currently active CO2 entry, or 0xFF if no active entry can be found.

Parameters
N/Aendpoint

The relevant endpoint.

Returns

  • The index of the active CO2 entry.


Definition at line 241 of file app/framework/plugin/price-client/price-client.h

emberAfPricePrintCppEvent#

void emberAfPricePrintCppEvent (uint8_t endpoint)

Print information about the CPP event.

Parameters
N/Aendpoint

THe relevant endpoint.


Definition at line 249 of file app/framework/plugin/price-client/price-client.h

emberAfPriceClusterCurrencyConversionTableGetIndexByEventId#

uint8_t emberAfPriceClusterCurrencyConversionTableGetIndexByEventId (uint8_t endpoint, uint32_t issuerEventId)

Return the currency conversion table index with a matching eventId.

Parameters
N/Aendpoint

The relevant endpoint.

N/AissuerEventId

The eventId that should be searched for in the currency conversion table.

Returns

  • The index with a valid matching event ID.


Definition at line 259 of file app/framework/plugin/price-client/price-client.h

emberAfPriceClusterGetActiveCurrencyIndex#

uint8_t emberAfPriceClusterGetActiveCurrencyIndex (uint8_t endpoint)

Return the index of the currently active currency conversion entry, or 0xFF if no active entry can be found.

Parameters
N/Aendpoint

The relevant endpoint.

Returns

  • The index of the active currency conversion entry.


Definition at line 269 of file app/framework/plugin/price-client/price-client.h

Function Documentation#

sli_zigbee_af_price_client_print_info#

void sli_zigbee_af_price_client_print_info (uint8_t endpoint)
Parameters
N/Aendpoint

Definition at line 275 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_client_print_by_event_id#

void sli_zigbee_af_price_client_print_by_event_id (uint8_t endpoint, uint32_t issuerEventId)
Parameters
N/Aendpoint
N/AissuerEventId

Definition at line 276 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_clear_price_table#

void sli_zigbee_af_price_clear_price_table (uint8_t endpoint)
Parameters
N/Aendpoint

Definition at line 277 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_get_block_period_table_index_by_event_id#

uint8_t sli_zigbee_af_price_get_block_period_table_index_by_event_id (uint8_t endpoint, uint32_t issuerEventId)

Return the block period table index with a matching eventId.

Parameters
N/Aendpoint

The relevant endpoint.

N/AissuerEventId

The eventId that should be searched for in the block period table.

Returns

  • The index with a valid matching event ID.


Definition at line 287 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_block_period_table_index#

void sli_zigbee_af_price_print_block_period_table_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the block period table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


Definition at line 297 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_get_conversion_factor_index_by_event_id#

uint8_t sli_zigbee_af_price_get_conversion_factor_index_by_event_id (uint8_t endpoint, uint32_t issuerEventId)

Return the conversion factor table index with a matching eventId.

Parameters
N/Aendpoint

The relevant endpoint.

N/AissuerEventId

The eventId that should be searched for in the conversion factor table.

Returns

  • The index with a valid matching event ID.


Definition at line 307 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_conversion_factor_entry_index#

void sli_zigbee_af_price_print_conversion_factor_entry_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the conversion factor table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


Definition at line 316 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_get_calorific_value_index_by_event_id#

uint8_t sli_zigbee_af_price_get_calorific_value_index_by_event_id (uint8_t endpoint, uint32_t issuerEventId)

Return the calorific value table index with a matching eventId.

Parameters
N/Aendpoint

The relevant endpoint.

N/AissuerEventId

The eventId that should be searched for in the calorific value table.

Returns

  • The index with a valid matching event ID.


Definition at line 326 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_calorific_value_entry_index#

void sli_zigbee_af_price_print_calorific_value_entry_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the calorific value table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


Definition at line 335 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_get_active_tier_label_table_index_by_tariff_id#

uint8_t sli_zigbee_af_price_get_active_tier_label_table_index_by_tariff_id (uint8_t endpoint, uint32_t tariffId)

Return the index of the currently active tier label table entry, or 0xFF if no active entry can be found.

Parameters
N/Aendpoint

The relevant endpoint.

N/AtariffId

Returns

  • The index of the active tier label table entry.


Definition at line 345 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_tier_label_table_entry_index#

void sli_zigbee_af_price_print_tier_label_table_entry_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the tier label table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


Definition at line 354 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_co2_value_table_print_index#

void sli_zigbee_af_price_print_co2_value_table_print_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the CO2 value table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


Definition at line 363 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_consolidated_bill_table_get_index_with_event_id#

uint8_t sli_zigbee_af_price_consolidated_bill_table_get_index_with_event_id (uint8_t endpoint, uint32_t issuerEventId)

Return the consolidated bill table index with a matching eventId.

Parameters
N/Aendpoint

The relevant endpoint.

N/AissuerEventId

The eventId that should be searched for in the consolidated bill table.

Returns

  • The index with a valid matching event ID.


Definition at line 373 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_consolidated_bill_table_get_current_index#

uint8_t sli_zigbee_af_price_consolidated_bill_table_get_current_index (uint8_t endpoint)

Return the index of the active consolidated bill table.

Parameters
N/Aendpoint

The relevant endpoint.

Returns

  • The index of the consolidated bills table with a valid matching event ID, or 0xFF if no valid match is found.


Definition at line 383 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_consolidated_bill_table_index#

void sli_zigbee_af_price_print_consolidated_bill_table_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the consolidated bill table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


Definition at line 392 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_credit_payment_table_get_index_with_event_id#

uint8_t sli_zigbee_af_price_credit_payment_table_get_index_with_event_id (uint8_t endpoint, uint32_t issuerEventId)

Return the credit payment table index with a matching eventId.

Parameters
N/Aendpoint

The eventId that should be searched for in the credit payment table.

N/AissuerEventId

Returns

  • The index with a valid matching event ID.


Definition at line 401 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_credit_payment_table_event_id#

void sli_zigbee_af_price_print_credit_payment_table_event_id (uint32_t issuerEventId)

Print the credit payment table entry data of the index with a valid matching eventId.

Parameters
N/AissuerEventId

The relevant endpoint.

N/AissuerEventId

The eventId that should be found in the credit payment table.


Definition at line 410 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_credit_payment_table_index#

void sli_zigbee_af_price_print_credit_payment_table_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the credit payment table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


Definition at line 419 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_currency_conversion_table_index#

void sli_zigbee_af_price_print_currency_conversion_table_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the currency conversion table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


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

sli_zigbee_af_price_get_active_billing_period_index#

uint8_t sli_zigbee_af_price_get_active_billing_period_index (uint8_t endpoint)

Return the index of the currently active billing period entry, or 0xFF if no active entry can be found.

Parameters
N/Aendpoint

The relevant endpoint.

Returns

  • The index of the active billing period entry.


Definition at line 438 of file app/framework/plugin/price-client/price-client.h

sli_zigbee_af_price_print_billing_period_table_entry_index#

void sli_zigbee_af_price_print_billing_period_table_entry_index (uint8_t endpoint, uint8_t index)

Print the information at the specified index of the billing period table.

Parameters
N/Aendpoint

The relevant endpoint.

N/Aindex

The index whose data should be printed.


Definition at line 447 of file app/framework/plugin/price-client/price-client.h

Macro Definition Documentation#

EMBER_AF_PLUGIN_PRICE_CLIENT_TABLE_SIZE#

#define EMBER_AF_PLUGIN_PRICE_CLIENT_TABLE_SIZE
Value:
2

Definition at line 40 of file app/framework/plugin/price-client/price-client.h

ZCL_PRICE_CLUSTER_PRICE_RATIO_NOT_USED#

#define ZCL_PRICE_CLUSTER_PRICE_RATIO_NOT_USED
Value:
0xFF

Definition at line 43 of file app/framework/plugin/price-client/price-client.h

ZCL_PRICE_CLUSTER_GENERATION_PRICE_NOT_USED#

#define ZCL_PRICE_CLUSTER_GENERATION_PRICE_NOT_USED
Value:
0xFFFFFFFFUL

Definition at line 44 of file app/framework/plugin/price-client/price-client.h

ZCL_PRICE_CLUSTER_GENERATION_PRICE_RATIO_NOT_USED#

#define ZCL_PRICE_CLUSTER_GENERATION_PRICE_RATIO_NOT_USED
Value:
0xFF

Definition at line 45 of file app/framework/plugin/price-client/price-client.h

ZCL_PRICE_CLUSTER_ALTERNATE_COST_DELIVERED_NOT_USED#

#define ZCL_PRICE_CLUSTER_ALTERNATE_COST_DELIVERED_NOT_USED
Value:
0xFFFFFFFFUL

Definition at line 46 of file app/framework/plugin/price-client/price-client.h

ZCL_PRICE_CLUSTER_ALTERNATE_COST_UNIT_NOT_USED#

#define ZCL_PRICE_CLUSTER_ALTERNATE_COST_UNIT_NOT_USED
Value:
0xFF

Definition at line 47 of file app/framework/plugin/price-client/price-client.h

ZCL_PRICE_CLUSTER_ALTERNATE_COST_TRAILING_DIGIT_NOT_USED#

#define ZCL_PRICE_CLUSTER_ALTERNATE_COST_TRAILING_DIGIT_NOT_USED
Value:
0xFF

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

ZCL_PRICE_CLUSTER_NUMBER_OF_BLOCK_THRESHOLDS_NOT_USED#

#define ZCL_PRICE_CLUSTER_NUMBER_OF_BLOCK_THRESHOLDS_NOT_USED
Value:
0xFF

Definition at line 49 of file app/framework/plugin/price-client/price-client.h

ZCL_PRICE_CLUSTER_PRICE_CONTROL_NOT_USED#

#define ZCL_PRICE_CLUSTER_PRICE_CONTROL_NOT_USED
Value:
0x00

Definition at line 50 of file app/framework/plugin/price-client/price-client.h

UNSPECIFIED_PROVIDER_ID#

#define UNSPECIFIED_PROVIDER_ID
Value:
0xFFFFFFFF

Definition at line 54 of file app/framework/plugin/price-client/price-client.h

UNSPECIFIED_DURATION#

#define UNSPECIFIED_DURATION
Value:
0xFFFFFFFF

Definition at line 55 of file app/framework/plugin/price-client/price-client.h

EMBER_AF_PLUGIN_PRICE_CLUSTER_MAX_CREDIT_PAYMENT_REF_LENGTH#

#define EMBER_AF_PLUGIN_PRICE_CLUSTER_MAX_CREDIT_PAYMENT_REF_LENGTH
Value:
20

Definition at line 128 of file app/framework/plugin/price-client/price-client.h