summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-zcl-se.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-zbee-zcl-se.c')
-rw-r--r--epan/dissectors/packet-zbee-zcl-se.c2992
1 files changed, 1372 insertions, 1620 deletions
diff --git a/epan/dissectors/packet-zbee-zcl-se.c b/epan/dissectors/packet-zbee-zcl-se.c
index b52a0327..0eaf886c 100644
--- a/epan/dissectors/packet-zbee-zcl-se.c
+++ b/epan/dissectors/packet-zbee-zcl-se.c
@@ -16,9 +16,13 @@
#include <epan/packet.h>
-#include <epan/prefs.h>
#include <epan/expert.h>
#include <epan/to_str.h>
+#include <epan/tfs.h>
+#include <epan/unit_strings.h>
+
+#include <wsutil/array.h>
+#include <wsutil/epochs.h>
#include "packet-zbee.h"
#include "packet-zbee-aps.h"
@@ -38,6 +42,8 @@ static const value_string zbee_zcl_se_reporting_status_names[] = {
{ 0, NULL }
};
+static void decode_zcl_se_utc_time(char *s, uint32_t value);
+
/**
*Dissect a ZigBee Date
*
@@ -51,18 +57,18 @@ static const value_string zbee_zcl_se_reporting_status_names[] = {
*@param hfindex_md month day field
*@param hfindex_wd week day field
*/
-static void dissect_zcl_date(tvbuff_t *tvb, proto_tree *tree, guint *offset,
- gint idx, const char* subtree_name, int hfindex_yy, int hfindex_mm, int hfindex_md,
+static void dissect_zcl_date(tvbuff_t *tvb, proto_tree *tree, unsigned *offset,
+ int idx, const char* subtree_name, int hfindex_yy, int hfindex_mm, int hfindex_md,
int hfindex_wd)
{
- guint8 yy;
+ uint8_t yy;
proto_tree* subtree;
/* Add subtree */
subtree = proto_tree_add_subtree(tree, tvb, *offset, 4, idx, NULL, subtree_name);
/* Year */
- yy = tvb_get_guint8(tvb, *offset);
+ yy = tvb_get_uint8(tvb, *offset);
proto_tree_add_uint(subtree, hfindex_yy, tvb, *offset, 1, yy + 1900);
*offset += 1;
@@ -103,22 +109,22 @@ void proto_register_zbee_zcl_keep_alive(void);
void proto_reg_handoff_zbee_zcl_keep_alive(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_keep_alive_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_keep_alive_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_keep_alive = -1;
+static int proto_zbee_zcl_keep_alive;
-static int hf_zbee_zcl_keep_alive_attr_id = -1;
-static int hf_zbee_zcl_keep_alive_attr_reporting_status = -1;
-static int hf_zbee_zcl_keep_alive_base = -1;
-static int hf_zbee_zcl_keep_alive_jitter = -1;
+static int hf_zbee_zcl_keep_alive_attr_id;
+static int hf_zbee_zcl_keep_alive_attr_reporting_status;
+static int hf_zbee_zcl_keep_alive_base;
+static int hf_zbee_zcl_keep_alive_jitter;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_keep_alive = -1;
+static int ett_zbee_zcl_keep_alive;
/*************************/
/* Function Bodies */
@@ -135,7 +141,7 @@ static gint ett_zbee_zcl_keep_alive = -1;
*@param client_attr ZCL client
*/
static void
-dissect_zcl_keep_alive_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_keep_alive_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
/* Dissect attribute data type and data */
switch (attr_id) {
@@ -202,7 +208,7 @@ proto_register_zbee_zcl_keep_alive(void)
};
/* ZCL Keep-Alive subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_keep_alive
};
@@ -1434,7 +1440,7 @@ VALUE_STRING_ARRAY(zbee_zcl_price_tariff_charging_scheme_names);
#define ZBEE_ZCL_PRICE_BILLING_PERIOD_DURATION_TIMEBASE 0x0F
#define ZBEE_ZCL_PRICE_BILLING_PERIOD_DURATION_CONTROL 0xF0
-/* Billign Period Tariff Type */
+/* Billing Period Tariff Type */
#define ZBEE_ZCL_PRICE_BILLING_PERIOD_TARIFF_TYPE 0x0F
/* Consolidated Bill Trailing Digit */
@@ -1447,177 +1453,177 @@ void proto_register_zbee_zcl_price(void);
void proto_reg_handoff_zbee_zcl_price(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_price_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_price_attr_data (proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/* Command Dissector Helpers */
-static void dissect_zcl_price_get_current_price (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_scheduled_prices (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_price_acknowledgement (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_block_period (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_conversion_factor (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_calorific_value (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_tariff_information (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_price_matrix (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_block_thresholds (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_co2_value (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_tier_labels (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_billing_period (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_consolidated_bill (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_cpp_event (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_get_credit_payment (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_price (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_block_period (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_conversion_factor (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_calorific_value (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_tariff_information (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_price_matrix (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_block_thresholds (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_co2_value (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_tier_labels (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_billing_period (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_consolidated_bill (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_cpp_event (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_credit_payment (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_currency_conversion (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_price_publish_cancel_tariff (tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_price_get_current_price (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_scheduled_prices (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_price_acknowledgement (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_block_period (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_conversion_factor (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_calorific_value (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_tariff_information (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_price_matrix (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_block_thresholds (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_co2_value (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_tier_labels (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_billing_period (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_consolidated_bill (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_cpp_event (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_get_credit_payment (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_price (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_block_period (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_conversion_factor (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_calorific_value (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_tariff_information (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_price_matrix (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_block_thresholds (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_co2_value (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_tier_labels (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_billing_period (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_consolidated_bill (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_cpp_event (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_credit_payment (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_currency_conversion (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_price_publish_cancel_tariff (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_price = -1;
-
-static int hf_zbee_zcl_price_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_price_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_price_attr_server_id = -1;
-static int hf_zbee_zcl_price_attr_client_id = -1;
-static int hf_zbee_zcl_price_attr_reporting_status = -1;
-static int hf_zbee_zcl_price_provider_id = -1;
-static int hf_zbee_zcl_price_issuer_event_id = -1;
-static int hf_zbee_zcl_price_min_issuer_event_id = -1;
-static int hf_zbee_zcl_price_issuer_tariff_id = -1;
-static int hf_zbee_zcl_price_command_index = -1;
-static int hf_zbee_zcl_price_total_number_of_commands = -1;
-static int hf_zbee_zcl_price_number_of_commands = -1;
-static int hf_zbee_zcl_price_number_of_events = -1;
-static int hf_zbee_zcl_price_number_of_records = -1;
-static int hf_zbee_zcl_price_number_of_block_thresholds = -1;
-static int hf_zbee_zcl_price_number_of_generation_tiers = -1;
-static int hf_zbee_zcl_price_extended_number_of_price_tiers = -1;
-static int hf_zbee_zcl_price_command_options = -1;
-static int hf_zbee_zcl_price_control = -1;
-static int hf_zbee_zcl_price_tier = -1;
-static int hf_zbee_zcl_price_tariff_type_mask = -1;
-static int hf_zbee_zcl_price_tariff_type = -1;
-static int hf_zbee_zcl_price_tariff_resolution_period = -1;
-static int hf_zbee_zcl_price_cpp_auth = -1;
-static int hf_zbee_zcl_price_cpp_price_tier= -1;
-static int hf_zbee_zcl_price_rate_label = -1;
-static int hf_zbee_zcl_price_unit_of_measure = -1;
-static int hf_zbee_zcl_price_currency = -1;
-static int hf_zbee_zcl_price_trailing_digit_and_price_tier = -1;
-static int hf_zbee_zcl_price_trailing_digit = -1;
-static int hf_zbee_zcl_price_extended_price_tier = -1;
-static int hf_zbee_zcl_price_number_of_price_tiers_and_register_tier = -1;
-static int hf_zbee_zcl_price_register_tier = -1;
-static int hf_zbee_zcl_price_number_of_price_tiers = -1;
-static int hf_zbee_zcl_price_extended_register_tier = -1;
-static int hf_zbee_zcl_price_duration_in_minutes = -1;
-static int hf_zbee_zcl_price = -1;
-static int hf_zbee_zcl_price_ratio = -1;
-static int hf_zbee_zcl_price_generation_price = -1;
-static int hf_zbee_zcl_price_generation_price_ratio = -1;
-static int hf_zbee_zcl_price_generation_tier = -1;
-static int hf_zbee_zcl_price_alternate_cost_delivered = -1;
-static int hf_zbee_zcl_price_alternate_cost_unit = -1;
-static int hf_zbee_zcl_price_alternate_cost_trailing_digit_mask = -1;
-static int hf_zbee_zcl_price_alternate_cost_trailing_digit = -1;
-static int hf_zbee_zcl_price_start_time = -1;
-static int hf_zbee_zcl_price_earliest_start_time = -1;
-static int hf_zbee_zcl_price_latest_end_time = -1;
-static int hf_zbee_zcl_price_current_time = -1;
-static int hf_zbee_zcl_price_price_ack_time = -1;
-static int hf_zbee_zcl_price_block_period_start_time = -1;
-static int hf_zbee_zcl_price_block_period_duration = -1;
-static int hf_zbee_zcl_price_block_period_duration_type = -1;
-static int hf_zbee_zcl_price_block_period_duration_timebase = -1;
-static int hf_zbee_zcl_price_block_period_duration_control = -1;
-static int hf_zbee_zcl_price_block_period_control = -1;
-static int hf_zbee_zcl_price_block_period_control_price_acknowledgement = -1;
-static int hf_zbee_zcl_price_block_period_control_repeating_block = -1;
-static int hf_zbee_zcl_price_conversion_factor = -1;
-static int hf_zbee_zcl_price_conversion_factor_trailing_digit_mask = -1;
-static int hf_zbee_zcl_price_conversion_factor_trailing_digit = -1;
-static int hf_zbee_zcl_price_calorific_value = -1;
-static int hf_zbee_zcl_price_calorific_value_unit = -1;
-static int hf_zbee_zcl_price_calorific_value_trailing_digit_mask = -1;
-static int hf_zbee_zcl_price_calorific_value_trailing_digit = -1;
-static int hf_zbee_zcl_price_tariff_information_type_and_charging_scheme = -1;
-static int hf_zbee_zcl_price_tariff_information_type = -1;
-static int hf_zbee_zcl_price_tariff_information_charging_scheme = -1;
-static int hf_zbee_zcl_price_tariff_information_tariff_label = -1;
-static int hf_zbee_zcl_price_tariff_information_number_of_price_tiers_in_use = -1;
-static int hf_zbee_zcl_price_tariff_information_number_of_block_thresholds_in_use = -1;
-static int hf_zbee_zcl_price_tariff_information_price_trailing_digit_mask = -1;
-static int hf_zbee_zcl_price_tariff_information_price_trailing_digit = -1;
-static int hf_zbee_zcl_price_tariff_information_standing_charge = -1;
-static int hf_zbee_zcl_price_tariff_information_tier_block_mode = -1;
-static int hf_zbee_zcl_price_tariff_information_block_threshold_multiplier = -1;
-static int hf_zbee_zcl_price_tariff_information_block_threshold_divisor = -1;
-static int hf_zbee_zcl_price_price_matrix_sub_payload_control = -1;
-static int hf_zbee_zcl_price_price_matrix_tier_block_id = -1;
-static int hf_zbee_zcl_price_price_matrix_tier_block_id_block = -1;
-static int hf_zbee_zcl_price_price_matrix_tier_block_id_tier = -1;
-static int hf_zbee_zcl_price_price_matrix_tier_block_id_tou_tier = -1;
-static int hf_zbee_zcl_price_price_matrix_price = -1;
-static int hf_zbee_zcl_price_block_thresholds_sub_payload_control = -1;
-static int hf_zbee_zcl_price_block_thresholds_tier_number_of_block_thresholds = -1;
-static int hf_zbee_zcl_price_block_thresholds_tier = -1;
-static int hf_zbee_zcl_price_block_thresholds_number_of_block_thresholds = -1;
-static int hf_zbee_zcl_price_block_thresholds_block_threshold = -1;
-static int hf_zbee_zcl_price_co2_value = -1;
-static int hf_zbee_zcl_price_co2_unit = -1;
-static int hf_zbee_zcl_price_co2_value_trailing_digit_mask = -1;
-static int hf_zbee_zcl_price_co2_value_trailing_digit = -1;
-static int hf_zbee_zcl_price_tier_labels_number_of_labels = -1;
-static int hf_zbee_zcl_price_tier_labels_tier_id = -1;
-static int hf_zbee_zcl_price_tier_labels_tier_label = -1;
-static int hf_zbee_zcl_price_billing_period_start_time = -1;
-static int hf_zbee_zcl_price_billing_period_duration = -1;
-static int hf_zbee_zcl_price_billing_period_duration_type = -1;
-static int hf_zbee_zcl_price_billing_period_duration_timebase = -1;
-static int hf_zbee_zcl_price_billing_period_duration_control = -1;
-static int hf_zbee_zcl_price_consolidated_bill = -1;
-static int hf_zbee_zcl_price_consolidated_bill_trailing_digit_mask = -1;
-static int hf_zbee_zcl_price_consolidated_bill_trailing_digit = -1;
-static int hf_zbee_zcl_price_credit_payment_due_date = -1;
-static int hf_zbee_zcl_price_credit_payment_overdue_amount = -1;
-static int hf_zbee_zcl_price_credit_payment_status = -1;
-static int hf_zbee_zcl_price_credit_payment = -1;
-static int hf_zbee_zcl_price_credit_payment_date = -1;
-static int hf_zbee_zcl_price_credit_payment_ref = -1;
-static int hf_zbee_zcl_price_old_currency = -1;
-static int hf_zbee_zcl_price_new_currency = -1;
-static int hf_zbee_zcl_price_currency_change_control_flags = -1;
+static int proto_zbee_zcl_price;
+
+static int hf_zbee_zcl_price_srv_tx_cmd_id;
+static int hf_zbee_zcl_price_srv_rx_cmd_id;
+static int hf_zbee_zcl_price_attr_server_id;
+static int hf_zbee_zcl_price_attr_client_id;
+static int hf_zbee_zcl_price_attr_reporting_status;
+static int hf_zbee_zcl_price_provider_id;
+static int hf_zbee_zcl_price_issuer_event_id;
+static int hf_zbee_zcl_price_min_issuer_event_id;
+static int hf_zbee_zcl_price_issuer_tariff_id;
+static int hf_zbee_zcl_price_command_index;
+static int hf_zbee_zcl_price_total_number_of_commands;
+static int hf_zbee_zcl_price_number_of_commands;
+static int hf_zbee_zcl_price_number_of_events;
+static int hf_zbee_zcl_price_number_of_records;
+static int hf_zbee_zcl_price_number_of_block_thresholds;
+static int hf_zbee_zcl_price_number_of_generation_tiers;
+static int hf_zbee_zcl_price_extended_number_of_price_tiers;
+static int hf_zbee_zcl_price_command_options;
+static int hf_zbee_zcl_price_control;
+static int hf_zbee_zcl_price_tier;
+static int hf_zbee_zcl_price_tariff_type_mask;
+static int hf_zbee_zcl_price_tariff_type;
+static int hf_zbee_zcl_price_tariff_resolution_period;
+static int hf_zbee_zcl_price_cpp_auth;
+static int hf_zbee_zcl_price_cpp_price_tier;
+static int hf_zbee_zcl_price_rate_label;
+static int hf_zbee_zcl_price_unit_of_measure;
+static int hf_zbee_zcl_price_currency;
+static int hf_zbee_zcl_price_trailing_digit_and_price_tier;
+static int hf_zbee_zcl_price_trailing_digit;
+static int hf_zbee_zcl_price_extended_price_tier;
+static int hf_zbee_zcl_price_number_of_price_tiers_and_register_tier;
+static int hf_zbee_zcl_price_register_tier;
+static int hf_zbee_zcl_price_number_of_price_tiers;
+static int hf_zbee_zcl_price_extended_register_tier;
+static int hf_zbee_zcl_price_duration_in_minutes;
+static int hf_zbee_zcl_price;
+static int hf_zbee_zcl_price_ratio;
+static int hf_zbee_zcl_price_generation_price;
+static int hf_zbee_zcl_price_generation_price_ratio;
+static int hf_zbee_zcl_price_generation_tier;
+static int hf_zbee_zcl_price_alternate_cost_delivered;
+static int hf_zbee_zcl_price_alternate_cost_unit;
+static int hf_zbee_zcl_price_alternate_cost_trailing_digit_mask;
+static int hf_zbee_zcl_price_alternate_cost_trailing_digit;
+static int hf_zbee_zcl_price_start_time;
+static int hf_zbee_zcl_price_earliest_start_time;
+static int hf_zbee_zcl_price_latest_end_time;
+static int hf_zbee_zcl_price_current_time;
+static int hf_zbee_zcl_price_price_ack_time;
+static int hf_zbee_zcl_price_block_period_start_time;
+static int hf_zbee_zcl_price_block_period_duration;
+static int hf_zbee_zcl_price_block_period_duration_type;
+static int hf_zbee_zcl_price_block_period_duration_timebase;
+static int hf_zbee_zcl_price_block_period_duration_control;
+static int hf_zbee_zcl_price_block_period_control;
+static int hf_zbee_zcl_price_block_period_control_price_acknowledgement;
+static int hf_zbee_zcl_price_block_period_control_repeating_block;
+static int hf_zbee_zcl_price_conversion_factor;
+static int hf_zbee_zcl_price_conversion_factor_trailing_digit_mask;
+static int hf_zbee_zcl_price_conversion_factor_trailing_digit;
+static int hf_zbee_zcl_price_calorific_value;
+static int hf_zbee_zcl_price_calorific_value_unit;
+static int hf_zbee_zcl_price_calorific_value_trailing_digit_mask;
+static int hf_zbee_zcl_price_calorific_value_trailing_digit;
+static int hf_zbee_zcl_price_tariff_information_type_and_charging_scheme;
+static int hf_zbee_zcl_price_tariff_information_type;
+static int hf_zbee_zcl_price_tariff_information_charging_scheme;
+static int hf_zbee_zcl_price_tariff_information_tariff_label;
+static int hf_zbee_zcl_price_tariff_information_number_of_price_tiers_in_use;
+static int hf_zbee_zcl_price_tariff_information_number_of_block_thresholds_in_use;
+static int hf_zbee_zcl_price_tariff_information_price_trailing_digit_mask;
+static int hf_zbee_zcl_price_tariff_information_price_trailing_digit;
+static int hf_zbee_zcl_price_tariff_information_standing_charge;
+static int hf_zbee_zcl_price_tariff_information_tier_block_mode;
+static int hf_zbee_zcl_price_tariff_information_block_threshold_multiplier;
+static int hf_zbee_zcl_price_tariff_information_block_threshold_divisor;
+static int hf_zbee_zcl_price_price_matrix_sub_payload_control;
+static int hf_zbee_zcl_price_price_matrix_tier_block_id;
+static int hf_zbee_zcl_price_price_matrix_tier_block_id_block;
+static int hf_zbee_zcl_price_price_matrix_tier_block_id_tier;
+static int hf_zbee_zcl_price_price_matrix_tier_block_id_tou_tier;
+static int hf_zbee_zcl_price_price_matrix_price;
+static int hf_zbee_zcl_price_block_thresholds_sub_payload_control;
+static int hf_zbee_zcl_price_block_thresholds_tier_number_of_block_thresholds;
+static int hf_zbee_zcl_price_block_thresholds_tier;
+static int hf_zbee_zcl_price_block_thresholds_number_of_block_thresholds;
+static int hf_zbee_zcl_price_block_thresholds_block_threshold;
+static int hf_zbee_zcl_price_co2_value;
+static int hf_zbee_zcl_price_co2_unit;
+static int hf_zbee_zcl_price_co2_value_trailing_digit_mask;
+static int hf_zbee_zcl_price_co2_value_trailing_digit;
+static int hf_zbee_zcl_price_tier_labels_number_of_labels;
+static int hf_zbee_zcl_price_tier_labels_tier_id;
+static int hf_zbee_zcl_price_tier_labels_tier_label;
+static int hf_zbee_zcl_price_billing_period_start_time;
+static int hf_zbee_zcl_price_billing_period_duration;
+static int hf_zbee_zcl_price_billing_period_duration_type;
+static int hf_zbee_zcl_price_billing_period_duration_timebase;
+static int hf_zbee_zcl_price_billing_period_duration_control;
+static int hf_zbee_zcl_price_consolidated_bill;
+static int hf_zbee_zcl_price_consolidated_bill_trailing_digit_mask;
+static int hf_zbee_zcl_price_consolidated_bill_trailing_digit;
+static int hf_zbee_zcl_price_credit_payment_due_date;
+static int hf_zbee_zcl_price_credit_payment_overdue_amount;
+static int hf_zbee_zcl_price_credit_payment_status;
+static int hf_zbee_zcl_price_credit_payment;
+static int hf_zbee_zcl_price_credit_payment_date;
+static int hf_zbee_zcl_price_credit_payment_ref;
+static int hf_zbee_zcl_price_old_currency;
+static int hf_zbee_zcl_price_new_currency;
+static int hf_zbee_zcl_price_currency_change_control_flags;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_price = -1;
-static gint ett_zbee_zcl_price_tariff_type = -1;
-static gint ett_zbee_zcl_price_trailing_digit_and_price_tier = -1;
-static gint ett_zbee_zcl_price_number_of_price_tiers_and_register_tier = -1;
-static gint ett_zbee_zcl_price_alternate_cost_trailing_digit = -1;
-static gint ett_zbee_zcl_price_block_period_control = -1;
-static gint ett_zbee_zcl_price_block_period_duration_type = -1;
-static gint ett_zbee_zcl_price_conversion_factor_trailing_digit = -1;
-static gint ett_zbee_zcl_price_calorific_value_trailing_digit = -1;
-static gint ett_zbee_zcl_price_tariff_information_tariff_type_and_charging_scheme = -1;
-static gint ett_zbee_zcl_price_tariff_information_price_trailing_digit = -1;
-static gint ett_zbee_zcl_price_price_matrix_tier_block_id = -1;
-static gint ett_zbee_zcl_price_block_thresholds_tier_number_of_block_thresholds = -1;
-static gint ett_zbee_zcl_price_co2_value_trailing_digit = -1;
-static gint ett_zbee_zcl_price_billing_period_duration_type = -1;
-static gint ett_zbee_zcl_price_consolidated_bill_trailing_digit = -1;
+static int ett_zbee_zcl_price;
+static int ett_zbee_zcl_price_tariff_type;
+static int ett_zbee_zcl_price_trailing_digit_and_price_tier;
+static int ett_zbee_zcl_price_number_of_price_tiers_and_register_tier;
+static int ett_zbee_zcl_price_alternate_cost_trailing_digit;
+static int ett_zbee_zcl_price_block_period_control;
+static int ett_zbee_zcl_price_block_period_duration_type;
+static int ett_zbee_zcl_price_conversion_factor_trailing_digit;
+static int ett_zbee_zcl_price_calorific_value_trailing_digit;
+static int ett_zbee_zcl_price_tariff_information_tariff_type_and_charging_scheme;
+static int ett_zbee_zcl_price_tariff_information_price_trailing_digit;
+static int ett_zbee_zcl_price_price_matrix_tier_block_id;
+static int ett_zbee_zcl_price_block_thresholds_tier_number_of_block_thresholds;
+static int ett_zbee_zcl_price_co2_value_trailing_digit;
+static int ett_zbee_zcl_price_billing_period_duration_type;
+static int ett_zbee_zcl_price_consolidated_bill_trailing_digit;
static int * const zbee_zcl_price_billing_period_duration_type[] = {
&hf_zbee_zcl_price_billing_period_duration_timebase,
@@ -1657,7 +1663,7 @@ static int * const zbee_zcl_price_tariff_type_mask[] = {
*@param client_attr ZCL client
*/
static void
-dissect_zcl_price_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_price_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
switch (attr_id) {
/* applies to all SE clusters */
@@ -1684,9 +1690,9 @@ dissect_zbee_zcl_price(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -1879,7 +1885,7 @@ dissect_zbee_zcl_price(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_current_price(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_current_price(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Command Options */
proto_tree_add_item(tree, hf_zbee_zcl_price_command_options, tvb, *offset, 1, ENC_NA);
@@ -1894,14 +1900,10 @@ dissect_zcl_price_get_current_price(tvbuff_t *tvb, proto_tree *tree, guint *offs
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_scheduled_prices(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_scheduled_prices(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Events */
@@ -1917,10 +1919,8 @@ dissect_zcl_price_get_scheduled_prices(tvbuff_t *tvb, proto_tree *tree, guint *o
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_price_acknowledgement(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_price_acknowledgement(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t price_ack_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -1930,9 +1930,7 @@ dissect_zcl_price_get_price_acknowledgement(tvbuff_t *tvb, proto_tree *tree, gui
*offset += 4;
/* Price Ack Time */
- price_ack_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- price_ack_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_price_ack_time, tvb, *offset, 4, &price_ack_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_price_ack_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Price Control */
@@ -1948,14 +1946,10 @@ dissect_zcl_price_get_price_acknowledgement(tvbuff_t *tvb, proto_tree *tree, gui
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_block_period(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_block_period(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Events */
@@ -1977,14 +1971,10 @@ dissect_zcl_price_get_block_period(tvbuff_t *tvb, proto_tree *tree, guint *offse
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_conversion_factor(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_conversion_factor(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t earliest_start_time;
-
/* Earliest Start Time */
- earliest_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- earliest_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, &earliest_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Min Issuer Event ID */
@@ -2004,14 +1994,11 @@ dissect_zcl_price_get_conversion_factor(tvbuff_t *tvb, proto_tree *tree, guint *
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_calorific_value(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_calorific_value(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t earliest_start_time;
/* Earliest Start Time */
- earliest_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- earliest_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, &earliest_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Min Issuer Event ID */
@@ -2031,14 +2018,10 @@ dissect_zcl_price_get_calorific_value(tvbuff_t *tvb, proto_tree *tree, guint *of
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_tariff_information(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_tariff_information(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t earliest_start_time;
-
/* Earliest Start Time */
- earliest_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- earliest_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, &earliest_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Min Issuer Event ID */
@@ -2063,7 +2046,7 @@ dissect_zcl_price_get_tariff_information(tvbuff_t *tvb, proto_tree *tree, guint
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_price_matrix(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_price_matrix(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Tariff ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_issuer_tariff_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -2078,7 +2061,7 @@ dissect_zcl_price_get_price_matrix(tvbuff_t *tvb, proto_tree *tree, guint *offse
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_block_thresholds(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_block_thresholds(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Tariff ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_issuer_tariff_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -2093,14 +2076,10 @@ dissect_zcl_price_get_block_thresholds(tvbuff_t *tvb, proto_tree *tree, guint *o
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_co2_value(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_co2_value(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t earliest_start_time;
-
/* Earliest Start Time */
- earliest_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- earliest_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, &earliest_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Min Issuer Event ID */
@@ -2126,7 +2105,7 @@ dissect_zcl_price_get_co2_value(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_tier_labels(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_tier_labels(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Tariff ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_issuer_tariff_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -2141,14 +2120,10 @@ dissect_zcl_price_get_tier_labels(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_billing_period(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_billing_period(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t earliest_start_time;
-
/* Earliest Start Time */
- earliest_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- earliest_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, &earliest_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Min Issuer Event ID */
@@ -2175,14 +2150,11 @@ dissect_zcl_price_get_billing_period(tvbuff_t *tvb, proto_tree *tree, guint *off
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_consolidated_bill(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_consolidated_bill(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t earliest_start_time;
/* Earliest Start Time */
- earliest_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- earliest_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, &earliest_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_earliest_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Min Issuer Event ID */
@@ -2209,7 +2181,7 @@ dissect_zcl_price_get_consolidated_bill(tvbuff_t *tvb, proto_tree *tree, guint *
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_cpp_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_cpp_event(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -2228,14 +2200,11 @@ dissect_zcl_price_get_cpp_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_get_credit_payment(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_get_credit_payment(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t latest_end_time;
/* Latest End Time */
- latest_end_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- latest_end_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_latest_end_time, tvb, *offset, 4, &latest_end_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_latest_end_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Records */
@@ -2251,10 +2220,8 @@ dissect_zcl_price_get_credit_payment(tvbuff_t *tvb, proto_tree *tree, guint *off
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_price(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_price(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
- nstime_t current_time;
int length;
static int * const trailing_digit[] = {
@@ -2287,9 +2254,7 @@ dissect_zcl_price_publish_price(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 4;
/* Current Time */
- current_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- current_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_current_time, tvb, *offset, 4, &current_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_current_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Unit of Measure */
@@ -2309,9 +2274,7 @@ dissect_zcl_price_publish_price(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 1;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Duration in Minutes */
@@ -2396,10 +2359,8 @@ dissect_zcl_price_publish_price(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_block_period(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_block_period(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t block_period_start_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -2409,9 +2370,7 @@ dissect_zcl_price_publish_block_period(tvbuff_t *tvb, proto_tree *tree, guint *o
*offset += 4;
/* Block Period Start Time */
- block_period_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- block_period_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_block_period_start_time, tvb, *offset, 4, &block_period_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_block_period_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Block Period Duration */
@@ -2443,10 +2402,8 @@ dissect_zcl_price_publish_block_period(tvbuff_t *tvb, proto_tree *tree, guint *o
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_conversion_factor(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_conversion_factor(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
static int * const conversion_factor_trailing_digit[] = {
&hf_zbee_zcl_price_conversion_factor_trailing_digit,
NULL
@@ -2457,9 +2414,7 @@ dissect_zcl_price_publish_conversion_factor(tvbuff_t *tvb, proto_tree *tree, gui
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Conversion Factor */
@@ -2479,10 +2434,8 @@ dissect_zcl_price_publish_conversion_factor(tvbuff_t *tvb, proto_tree *tree, gui
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_calorific_value(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_calorific_value(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
static int * const calorific_value_trailing_digit[] = {
&hf_zbee_zcl_price_calorific_value_trailing_digit,
NULL
@@ -2493,9 +2446,7 @@ dissect_zcl_price_publish_calorific_value(tvbuff_t *tvb, proto_tree *tree, guint
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Calorific Value */
@@ -2519,10 +2470,9 @@ dissect_zcl_price_publish_calorific_value(tvbuff_t *tvb, proto_tree *tree, guint
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_tariff_information(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_tariff_information(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
int length;
- nstime_t start_time;
static int * const price_trailing_digit[] = {
&hf_zbee_zcl_price_tariff_information_price_trailing_digit,
@@ -2548,9 +2498,7 @@ dissect_zcl_price_publish_tariff_information(tvbuff_t *tvb, proto_tree *tree, gu
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Tariff Type / Charging Scheme */
@@ -2606,10 +2554,9 @@ dissect_zcl_price_publish_tariff_information(tvbuff_t *tvb, proto_tree *tree, gu
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_price_matrix(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_price_matrix(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 sub_payload_control;
- nstime_t start_time;
+ uint8_t sub_payload_control;
static int * const tier_block_id[] = {
&hf_zbee_zcl_price_price_matrix_tier_block_id_block,
@@ -2626,9 +2573,7 @@ dissect_zcl_price_publish_price_matrix(tvbuff_t *tvb, proto_tree *tree, guint *o
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Issuer Tariff ID */
@@ -2644,7 +2589,7 @@ dissect_zcl_price_publish_price_matrix(tvbuff_t *tvb, proto_tree *tree, guint *o
*offset += 1;
/* Sub-Payload Control */
- sub_payload_control = tvb_get_guint8(tvb, *offset) && 0x01; /* First bit determines Tier/Block ID field type */
+ sub_payload_control = tvb_get_uint8(tvb, *offset) && 0x01; /* First bit determines Tier/Block ID field type */
proto_tree_add_item(tree, hf_zbee_zcl_price_price_matrix_sub_payload_control, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -2670,10 +2615,9 @@ dissect_zcl_price_publish_price_matrix(tvbuff_t *tvb, proto_tree *tree, guint *o
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_block_thresholds(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_block_thresholds(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 sub_payload_control;
- nstime_t start_time;
+ uint8_t sub_payload_control;
static int * const tier_number_of_block_thresholds[] = {
&hf_zbee_zcl_price_block_thresholds_number_of_block_thresholds,
@@ -2695,9 +2639,7 @@ dissect_zcl_price_publish_block_thresholds(tvbuff_t *tvb, proto_tree *tree, guin
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Issuer Tariff ID */
@@ -2713,15 +2655,15 @@ dissect_zcl_price_publish_block_thresholds(tvbuff_t *tvb, proto_tree *tree, guin
*offset += 1;
/* Sub-Payload Control */
- sub_payload_control = tvb_get_guint8(tvb, *offset) && 0x01; /* First bit determines Tier/Number of Block Thresholds field type */
+ sub_payload_control = tvb_get_uint8(tvb, *offset) && 0x01; /* First bit determines Tier/Number of Block Thresholds field type */
proto_tree_add_item(tree, hf_zbee_zcl_price_block_thresholds_sub_payload_control, tvb, *offset, 1, ENC_NA);
*offset += 1;
while (tvb_reported_length_remaining(tvb, *offset) > 0) {
- guint8 thresholds;
+ uint8_t thresholds;
/* Tier/Number of Block Thresholds */
- thresholds = tvb_get_guint8(tvb, *offset) & ZBEE_ZCL_PRICE_BLOCK_THRESHOLDS_NUMBER_OF_BLOCK_THRESHOLDS;
+ thresholds = tvb_get_uint8(tvb, *offset) & ZBEE_ZCL_PRICE_BLOCK_THRESHOLDS_NUMBER_OF_BLOCK_THRESHOLDS;
if (sub_payload_control == 0)
proto_tree_add_bitmask(tree, tvb, *offset, hf_zbee_zcl_price_block_thresholds_tier_number_of_block_thresholds, ett_zbee_zcl_price_block_thresholds_tier_number_of_block_thresholds, tier_number_of_block_thresholds, ENC_LITTLE_ENDIAN);
else
@@ -2729,7 +2671,7 @@ dissect_zcl_price_publish_block_thresholds(tvbuff_t *tvb, proto_tree *tree, guin
*offset += 1;
/* Block Threshold(s) */
- for (gint i = 0; i < thresholds; i++) {
+ for (int i = 0; i < thresholds; i++) {
proto_tree_add_item(tree, hf_zbee_zcl_price_block_thresholds_block_threshold, tvb, *offset, 6, ENC_LITTLE_ENDIAN);
*offset += 6;
}
@@ -2744,10 +2686,8 @@ dissect_zcl_price_publish_block_thresholds(tvbuff_t *tvb, proto_tree *tree, guin
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_co2_value(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_co2_value(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
static int * const co2_value_trailing_digit[] = {
&hf_zbee_zcl_price_co2_value_trailing_digit,
NULL
@@ -2762,9 +2702,7 @@ dissect_zcl_price_publish_co2_value(tvbuff_t *tvb, proto_tree *tree, guint *offs
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Tariff Type */
@@ -2792,9 +2730,9 @@ dissect_zcl_price_publish_co2_value(tvbuff_t *tvb, proto_tree *tree, guint *offs
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_tier_labels(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_tier_labels(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 number_of_labels;
+ uint8_t number_of_labels;
int length;
/* Provider ID */
@@ -2818,11 +2756,11 @@ dissect_zcl_price_publish_tier_labels(tvbuff_t *tvb, proto_tree *tree, guint *of
*offset += 1;
/* Number of Labels */
- number_of_labels = tvb_get_guint8(tvb, *offset);
+ number_of_labels = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_price_tier_labels_number_of_labels, tvb, *offset, 1, ENC_NA);
*offset += 1;
- for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 0 && i < number_of_labels; i++) {
+ for (int i = 0; tvb_reported_length_remaining(tvb, *offset) >= 0 && i < number_of_labels; i++) {
/* Tier ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_tier_labels_tier_id, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -2841,10 +2779,8 @@ dissect_zcl_price_publish_tier_labels(tvbuff_t *tvb, proto_tree *tree, guint *of
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_billing_period(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_billing_period(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -2854,9 +2790,7 @@ dissect_zcl_price_publish_billing_period(tvbuff_t *tvb, proto_tree *tree, guint
*offset += 4;
/* Billing Period Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_billing_period_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_billing_period_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Billing Period Duration */
@@ -2880,10 +2814,8 @@ dissect_zcl_price_publish_billing_period(tvbuff_t *tvb, proto_tree *tree, guint
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_consolidated_bill(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_consolidated_bill(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
static int * const bill_trailing_digit[] = {
&hf_zbee_zcl_price_consolidated_bill_trailing_digit,
NULL
@@ -2898,9 +2830,7 @@ dissect_zcl_price_publish_consolidated_bill(tvbuff_t *tvb, proto_tree *tree, gui
*offset += 4;
/* Billing Period Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Billing Period Duration */
@@ -2935,10 +2865,8 @@ dissect_zcl_price_publish_consolidated_bill(tvbuff_t *tvb, proto_tree *tree, gui
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_cpp_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_cpp_event(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -2948,9 +2876,7 @@ dissect_zcl_price_publish_cpp_event(tvbuff_t *tvb, proto_tree *tree, guint *offs
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Duration in Minutes */
@@ -2979,10 +2905,8 @@ dissect_zcl_price_publish_cpp_event(tvbuff_t *tvb, proto_tree *tree, guint *offs
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_credit_payment(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_credit_payment(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t credit_payment_due_date;
- nstime_t credit_payment_date;
int length;
/* Provider ID */
@@ -2994,9 +2918,7 @@ dissect_zcl_price_publish_credit_payment(tvbuff_t *tvb, proto_tree *tree, guint
*offset += 4;
/* Credit Payment Due Date */
- credit_payment_due_date.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- credit_payment_due_date.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_credit_payment_due_date, tvb, *offset, 4, &credit_payment_due_date);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_credit_payment_due_date, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Credit Payment Overdue Amount */
@@ -3012,9 +2934,7 @@ dissect_zcl_price_publish_credit_payment(tvbuff_t *tvb, proto_tree *tree, guint
*offset += 4;
/* Credit Payment Date */
- credit_payment_date.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- credit_payment_date.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_credit_payment_date, tvb, *offset, 4, &credit_payment_date);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_credit_payment_date, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Credit Payment Ref */
@@ -3030,9 +2950,8 @@ dissect_zcl_price_publish_credit_payment(tvbuff_t *tvb, proto_tree *tree, guint
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_currency_conversion(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_currency_conversion(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
static int * const conversion_factor_trailing_digit[] = {
&hf_zbee_zcl_price_conversion_factor_trailing_digit,
@@ -3048,9 +2967,7 @@ dissect_zcl_price_publish_currency_conversion(tvbuff_t *tvb, proto_tree *tree, g
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_price_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Old Currency */
@@ -3082,7 +2999,7 @@ dissect_zcl_price_publish_currency_conversion(tvbuff_t *tvb, proto_tree *tree, g
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_price_publish_cancel_tariff(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_price_publish_cancel_tariff(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_price_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -3295,28 +3212,28 @@ proto_register_zbee_zcl_price(void)
/* end Alternate Cost Trailing Digit */
{ &hf_zbee_zcl_price_start_time,
- { "Start Time", "zbee_zcl_se.price.start_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL,
- 0x00, NULL, HFILL } },
+ { "Start Time", "zbee_zcl_se.price.start_time", FT_UINT32, BASE_CUSTOM,
+ CF_FUNC(decode_zcl_se_utc_time), 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_price_earliest_start_time,
- { "Earliest Start Time", "zbee_zcl_se.price.earliest_start_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL,
- 0x00, NULL, HFILL } },
+ { "Earliest Start Time", "zbee_zcl_se.price.earliest_start_time", FT_UINT32, BASE_CUSTOM,
+ CF_FUNC(decode_zcl_se_utc_time), 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_price_latest_end_time,
- { "Latest End Time", "zbee_zcl_se.price.latest_end_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL,
- 0x00, NULL, HFILL } },
+ { "Latest End Time", "zbee_zcl_se.price.latest_end_time", FT_UINT32, BASE_CUSTOM,
+ CF_FUNC(decode_zcl_se_utc_time), 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_price_current_time,
- { "Current Time", "zbee_zcl_se.price.current_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL,
- 0x00, NULL, HFILL } },
+ { "Current Time", "zbee_zcl_se.price.current_time", FT_UINT32, BASE_CUSTOM,
+ CF_FUNC(decode_zcl_se_utc_time), 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_price_price_ack_time,
- { "Price Ack Time", "zbee_zcl_se.price.price_ack_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL,
- 0x00, NULL, HFILL } },
+ { "Price Ack Time", "zbee_zcl_se.price.price_ack_time", FT_UINT32, BASE_CUSTOM,
+ CF_FUNC(decode_zcl_se_utc_time), 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_price_block_period_start_time,
- { "Block Period Start Time", "zbee_zcl_se.price.block_period.start_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL,
- 0x00, NULL, HFILL } },
+ { "Block Period Start Time", "zbee_zcl_se.price.block_period.start_time", FT_UINT32, BASE_CUSTOM,
+ CF_FUNC(decode_zcl_se_utc_time), 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_price_block_period_duration,
{ "Block Period Duration", "zbee_zcl_se.price.block_period.duration", FT_UINT24, BASE_DEC, NULL,
@@ -3513,8 +3430,8 @@ proto_register_zbee_zcl_price(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_price_billing_period_start_time,
- { "Billing Period Start Time", "zbee_zcl_se.price.billing_period.start_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL,
- 0x00, NULL, HFILL } },
+ { "Billing Period Start Time", "zbee_zcl_se.price.billing_period.start_time", FT_UINT32, BASE_CUSTOM,
+ CF_FUNC(decode_zcl_se_utc_time), 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_price_billing_period_duration,
{ "Billing Period Duration", "zbee_zcl_se.price.billing_period.duration", FT_UINT24, BASE_DEC, NULL,
@@ -3586,7 +3503,7 @@ proto_register_zbee_zcl_price(void)
};
/* ZCL Price subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_price,
&ett_zbee_zcl_price_tariff_type,
&ett_zbee_zcl_price_trailing_digit_and_price_tier,
@@ -3737,77 +3654,76 @@ static const true_false_string zbee_zcl_drlc_randomize_duration_tfs = {
void proto_register_zbee_zcl_drlc(void);
void proto_reg_handoff_zbee_zcl_drlc(void);
-static void decode_zcl_msg_start_time (gchar *s, guint32 value);
-static void decode_zcl_drlc_temp_offset (gchar *s, guint8 value);
-static void decode_zcl_drlc_temp_set_point (gchar *s, gint16 value);
-static void decode_zcl_drlc_average_load_adjustment_percentage (gchar *s, gint8 value);
+static void decode_zcl_drlc_temp_offset (char *s, uint8_t value);
+static void decode_zcl_drlc_temp_set_point (char *s, int16_t value);
+static void decode_zcl_drlc_average_load_adjustment_percentage (char *s, int8_t value);
-static void dissect_zcl_drlc_load_control_event (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_drlc_cancel_load_control_event (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_drlc_cancel_all_load_control_event (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_drlc_report_event_status (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_drlc_get_scheduled_events (tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_drlc_load_control_event (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_drlc_cancel_load_control_event (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_drlc_cancel_all_load_control_event (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_drlc_report_event_status (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_drlc_get_scheduled_events (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/* Attribute Dissector Helpers */
-static void dissect_zcl_drlc_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_drlc_attr_data (proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_drlc = -1;
-
-static int hf_zbee_zcl_drlc_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_drlc_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_drlc_attr_client_id = -1;
-static int hf_zbee_zcl_drlc_attr_reporting_status = -1;
-static int hf_zbee_zcl_drlc_issuer_event_id = -1;
-static int hf_zbee_zcl_drlc_device_class = -1;
-static int hf_zbee_zcl_drlc_device_class_hvac_compressor_or_furnace = -1;
-static int hf_zbee_zcl_drlc_device_class_strip_heaters_baseboard_heaters = -1;
-static int hf_zbee_zcl_drlc_device_class_water_heater = -1;
-static int hf_zbee_zcl_drlc_device_class_pool_pump_spa_jacuzzi = -1;
-static int hf_zbee_zcl_drlc_device_class_smart_appliances = -1;
-static int hf_zbee_zcl_drlc_device_class_irrigation_pump = -1;
-static int hf_zbee_zcl_drlc_device_class_managed_c_i_loads= -1;
-static int hf_zbee_zcl_drlc_device_class_simple_misc_loads = -1;
-static int hf_zbee_zcl_drlc_device_class_exterior_lighting = -1;
-static int hf_zbee_zcl_drlc_device_class_interior_lighting = -1;
-static int hf_zbee_zcl_drlc_device_class_electric_vehicle = -1;
-static int hf_zbee_zcl_drlc_device_class_generation_systems = -1;
-static int hf_zbee_zcl_drlc_device_class_reserved = -1;
-static int hf_zbee_zcl_drlc_utility_enrollment_group = -1;
-static int hf_zbee_zcl_drlc_start_time = -1;
-static int hf_zbee_zcl_drlc_duration_in_minutes = -1;
-static int hf_zbee_zcl_drlc_criticality_level = -1;
-static int hf_zbee_zcl_drlc_cooling_temp_offset = -1;
-static int hf_zbee_zcl_drlc_heating_temp_offset = -1;
-static int hf_zbee_zcl_drlc_cooling_temp_set_point = -1;
-static int hf_zbee_zcl_drlc_heating_temp_set_point = -1;
-static int hf_zbee_zcl_drlc_average_load_adjustment_percentage = -1;
-static int hf_zbee_zcl_drlc_duty_cycle = -1;
-static int hf_zbee_zcl_drlc_event_control = -1;
-static int hf_zbee_zcl_drlc_event_control_randomize_start_time = -1;
-static int hf_zbee_zcl_drlc_event_control_randomize_duration_time = -1;
-static int hf_zbee_zcl_drlc_event_control_reserved = -1;
-static int hf_zbee_zcl_drlc_cancel_control = -1;
-static int hf_zbee_zcl_drlc_cancel_control_event_in_process = -1;
-static int hf_zbee_zcl_drlc_cancel_control_reserved = -1;
-static int hf_zbee_zcl_drlc_effective_time = -1;
-static int hf_zbee_zcl_drlc_report_event_issuer_event_id = -1;
-static int hf_zbee_zcl_drlc_report_event_event_status = -1;
-static int hf_zbee_zcl_drlc_report_event_event_status_time = -1;
-static int hf_zbee_zcl_drlc_report_event_criticality_level_applied = -1;
-static int hf_zbee_zcl_drlc_report_event_cooling_temp_set_point_applied = -1;
-static int hf_zbee_zcl_drlc_report_event_heating_temp_set_point_applied = -1;
-static int hf_zbee_zcl_drlc_report_event_average_load_adjustment_percentage = -1;
-static int hf_zbee_zcl_drlc_report_event_duty_cycle = -1;
-static int hf_zbee_zcl_drlc_report_event_event_control = -1;
-static int hf_zbee_zcl_drlc_report_event_signature_type = -1;
-static int hf_zbee_zcl_drlc_report_event_signature = -1;
-static int hf_zbee_zcl_drlc_get_scheduled_events_start_time = -1;
-static int hf_zbee_zcl_drlc_get_scheduled_events_number_of_events = -1;
-static int hf_zbee_zcl_drlc_get_scheduled_events_issuer_event_id = -1;
+static int proto_zbee_zcl_drlc;
+
+static int hf_zbee_zcl_drlc_srv_tx_cmd_id;
+static int hf_zbee_zcl_drlc_srv_rx_cmd_id;
+static int hf_zbee_zcl_drlc_attr_client_id;
+static int hf_zbee_zcl_drlc_attr_reporting_status;
+static int hf_zbee_zcl_drlc_issuer_event_id;
+static int hf_zbee_zcl_drlc_device_class;
+static int hf_zbee_zcl_drlc_device_class_hvac_compressor_or_furnace;
+static int hf_zbee_zcl_drlc_device_class_strip_heaters_baseboard_heaters;
+static int hf_zbee_zcl_drlc_device_class_water_heater;
+static int hf_zbee_zcl_drlc_device_class_pool_pump_spa_jacuzzi;
+static int hf_zbee_zcl_drlc_device_class_smart_appliances;
+static int hf_zbee_zcl_drlc_device_class_irrigation_pump;
+static int hf_zbee_zcl_drlc_device_class_managed_c_i_loads;
+static int hf_zbee_zcl_drlc_device_class_simple_misc_loads;
+static int hf_zbee_zcl_drlc_device_class_exterior_lighting;
+static int hf_zbee_zcl_drlc_device_class_interior_lighting;
+static int hf_zbee_zcl_drlc_device_class_electric_vehicle;
+static int hf_zbee_zcl_drlc_device_class_generation_systems;
+static int hf_zbee_zcl_drlc_device_class_reserved;
+static int hf_zbee_zcl_drlc_utility_enrollment_group;
+static int hf_zbee_zcl_drlc_start_time;
+static int hf_zbee_zcl_drlc_duration_in_minutes;
+static int hf_zbee_zcl_drlc_criticality_level;
+static int hf_zbee_zcl_drlc_cooling_temp_offset;
+static int hf_zbee_zcl_drlc_heating_temp_offset;
+static int hf_zbee_zcl_drlc_cooling_temp_set_point;
+static int hf_zbee_zcl_drlc_heating_temp_set_point;
+static int hf_zbee_zcl_drlc_average_load_adjustment_percentage;
+static int hf_zbee_zcl_drlc_duty_cycle;
+static int hf_zbee_zcl_drlc_event_control;
+static int hf_zbee_zcl_drlc_event_control_randomize_start_time;
+static int hf_zbee_zcl_drlc_event_control_randomize_duration_time;
+static int hf_zbee_zcl_drlc_event_control_reserved;
+static int hf_zbee_zcl_drlc_cancel_control;
+static int hf_zbee_zcl_drlc_cancel_control_event_in_process;
+static int hf_zbee_zcl_drlc_cancel_control_reserved;
+static int hf_zbee_zcl_drlc_effective_time;
+static int hf_zbee_zcl_drlc_report_event_issuer_event_id;
+static int hf_zbee_zcl_drlc_report_event_event_status;
+static int hf_zbee_zcl_drlc_report_event_event_status_time;
+static int hf_zbee_zcl_drlc_report_event_criticality_level_applied;
+static int hf_zbee_zcl_drlc_report_event_cooling_temp_set_point_applied;
+static int hf_zbee_zcl_drlc_report_event_heating_temp_set_point_applied;
+static int hf_zbee_zcl_drlc_report_event_average_load_adjustment_percentage;
+static int hf_zbee_zcl_drlc_report_event_duty_cycle;
+static int hf_zbee_zcl_drlc_report_event_event_control;
+static int hf_zbee_zcl_drlc_report_event_signature_type;
+static int hf_zbee_zcl_drlc_report_event_signature;
+static int hf_zbee_zcl_drlc_get_scheduled_events_start_time;
+static int hf_zbee_zcl_drlc_get_scheduled_events_number_of_events;
+static int hf_zbee_zcl_drlc_get_scheduled_events_issuer_event_id;
static int* const zbee_zcl_drlc_control_event_device_classes[] = {
&hf_zbee_zcl_drlc_device_class_hvac_compressor_or_furnace,
@@ -3839,10 +3755,10 @@ static int* const hf_zbee_zcl_drlc_cancel_control_flags[] = {
NULL
};
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_drlc = -1;
-static gint ett_zbee_zcl_drlc_device_class = -1;
-static gint ett_zbee_zcl_drlc_event_control = -1;
-static gint ett_zbee_zcl_drlc_cancel_control = -1;
+static int ett_zbee_zcl_drlc;
+static int ett_zbee_zcl_drlc_device_class;
+static int ett_zbee_zcl_drlc_event_control;
+static int ett_zbee_zcl_drlc_cancel_control;
/*************************/
/* Function Bodies */
@@ -3854,16 +3770,16 @@ static gint ett_zbee_zcl_drlc_cancel_control = -1;
* @param value value to decode
*/
static void
-decode_zcl_drlc_temp_offset(gchar *s, guint8 value)
+decode_zcl_drlc_temp_offset(char *s, uint8_t value)
{
if (value == ZBEE_ZCL_DRLC_TEMP_OFFSET_NOT_USED)
snprintf(s, ITEM_LABEL_LENGTH, "Not Used");
else {
- gfloat temp_delta;
+ float temp_delta;
temp_delta = value / ZBEE_ZCL_DRLC_TEMP_OFFSET_DIVIDER;
snprintf(s, ITEM_LABEL_LENGTH, "%+.2f%s", temp_delta, units_degree_celsius.singular);
}
-} /*decode_zcl_msg_start_time*/
+} /*decode_zcl_drlc_temp_offset*/
/**
* This function decodes Temperature Set Point.
@@ -3871,12 +3787,12 @@ decode_zcl_drlc_temp_offset(gchar *s, guint8 value)
* @param s string to display
* @param value value to decode
*/
-static void decode_zcl_drlc_temp_set_point(gchar *s, gint16 value)
+static void decode_zcl_drlc_temp_set_point(char *s, int16_t value)
{
if (value & ZBEE_ZCL_DRLC_TEMP_SET_POINT_NOT_USED)
snprintf(s, ITEM_LABEL_LENGTH, "Not Used");
else {
- gfloat temp_delta;
+ float temp_delta;
temp_delta = value / ZBEE_ZCL_DRLC_TEMP_SET_POINT_DIVIDER;
snprintf(s, ITEM_LABEL_LENGTH, "%+.2f%s", temp_delta, units_degree_celsius.singular);
}
@@ -3888,7 +3804,7 @@ static void decode_zcl_drlc_temp_set_point(gchar *s, gint16 value)
* @param s string to display
* @param value value to decode
*/
-static void decode_zcl_drlc_average_load_adjustment_percentage(gchar *s, gint8 value)
+static void decode_zcl_drlc_average_load_adjustment_percentage(char *s, int8_t value)
{
if (value & ZBEE_ZCL_DRLC_AVERAGE_LOAD_ADJUSTMENT_PERCENTAGE)
snprintf(s, ITEM_LABEL_LENGTH, "Not Used");
@@ -3908,7 +3824,7 @@ static void decode_zcl_drlc_average_load_adjustment_percentage(gchar *s, gint8 v
*@param client_attr ZCL client
*/
static void
-dissect_zcl_drlc_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_drlc_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
switch (attr_id) {
/* applies to all SE clusters */
@@ -3932,7 +3848,7 @@ dissect_zcl_drlc_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_drlc_load_control_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_drlc_load_control_event(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_drlc_issuer_event_id, tvb,
@@ -4009,7 +3925,7 @@ dissect_zcl_drlc_load_control_event(tvbuff_t *tvb, proto_tree *tree, guint *offs
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_drlc_cancel_load_control_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_drlc_cancel_load_control_event(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_drlc_issuer_event_id, tvb,
@@ -4047,7 +3963,7 @@ dissect_zcl_drlc_cancel_load_control_event(tvbuff_t *tvb, proto_tree *tree, guin
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_drlc_cancel_all_load_control_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_drlc_cancel_all_load_control_event(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Cancel Control */
proto_tree_add_bitmask(tree, tvb, *offset, hf_zbee_zcl_drlc_cancel_control, ett_zbee_zcl_drlc_cancel_control,
@@ -4065,10 +3981,8 @@ dissect_zcl_drlc_cancel_all_load_control_event(tvbuff_t *tvb, proto_tree *tree,
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_drlc_report_event_status(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_drlc_report_event_status(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t event_status_time;
-
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_drlc_report_event_issuer_event_id, tvb,
*offset, 4, ENC_LITTLE_ENDIAN);
@@ -4079,9 +3993,7 @@ dissect_zcl_drlc_report_event_status(tvbuff_t *tvb, proto_tree *tree, guint *off
*offset += 1;
/* Event Status Time */
- event_status_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- event_status_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_drlc_report_event_event_status_time, tvb, *offset, 4, &event_status_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_drlc_report_event_event_status_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Criticality Level Applied */
@@ -4120,7 +4032,7 @@ dissect_zcl_drlc_report_event_status(tvbuff_t *tvb, proto_tree *tree, guint *off
*offset += 1;
/* Signature */
- guint rem_len;
+ unsigned rem_len;
rem_len = tvb_reported_length_remaining(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_drlc_report_event_signature, tvb,
*offset, rem_len, ENC_NA);
@@ -4136,15 +4048,12 @@ dissect_zcl_drlc_report_event_status(tvbuff_t *tvb, proto_tree *tree, guint *off
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_drlc_get_scheduled_events(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_drlc_get_scheduled_events(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
- gint rem_len;
+ int rem_len;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_drlc_get_scheduled_events_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_drlc_get_scheduled_events_start_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Events */
@@ -4172,9 +4081,9 @@ static int
dissect_zbee_zcl_drlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
proto_tree *payload_tree;
/* Reject the packet if data is NULL */
@@ -4343,7 +4252,7 @@ proto_register_zbee_zcl_drlc(void)
{ &hf_zbee_zcl_drlc_start_time,
{ "Start Time", "zbee_zcl_se.drlc.start_time",
- FT_UINT32, BASE_CUSTOM, CF_FUNC(decode_zcl_msg_start_time), 0x0, NULL, HFILL } },
+ FT_UINT32, BASE_CUSTOM, CF_FUNC(decode_zcl_se_utc_time), 0x0, NULL, HFILL } },
{ &hf_zbee_zcl_drlc_duration_in_minutes,
{ "Duration In Minutes", "zbee_zcl_se.drlc.duration_in_minutes",
@@ -4407,7 +4316,7 @@ proto_register_zbee_zcl_drlc(void)
{ &hf_zbee_zcl_drlc_effective_time,
{ "Reserved", "zbee_zcl_se.drlc.effective_time",
- FT_UINT32, BASE_CUSTOM, CF_FUNC(decode_zcl_msg_start_time), 0xFE, NULL, HFILL } },
+ FT_UINT32, BASE_CUSTOM, CF_FUNC(decode_zcl_se_utc_time), 0xFE, NULL, HFILL } },
{ &hf_zbee_zcl_drlc_report_event_issuer_event_id,
{ "Issuer Event ID", "zbee_zcl_se.drlc.report_event.issuer_id",
@@ -4455,19 +4364,19 @@ proto_register_zbee_zcl_drlc(void)
{ &hf_zbee_zcl_drlc_get_scheduled_events_start_time,
{ "Start Time", "zbee_zcl_se.drlc.get_scheduled_events.start_time",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, NULL, HFILL } },
+ FT_UINT32, BASE_CUSTOM, CF_FUNC(decode_zcl_se_utc_time), 0x0, NULL, HFILL } },
{ &hf_zbee_zcl_drlc_get_scheduled_events_number_of_events,
{ "Number of Events", "zbee_zcl_se.drlc.get_scheduled_events.numbers_of_events",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_zbee_zcl_drlc_get_scheduled_events_issuer_event_id,
- { "Issuer Event ID", "zbee_zcl_se.drlc.get_scheduled_events.issuer_event_id",
+ { "Minimum Issuer Event ID", "zbee_zcl_se.drlc.get_scheduled_events.issuer_event_id",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
};
/* ZCL DRLC subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_drlc,
&ett_zbee_zcl_drlc_device_class,
&ett_zbee_zcl_drlc_event_control,
@@ -5594,247 +5503,247 @@ void proto_register_zbee_zcl_met(void);
void proto_reg_handoff_zbee_zcl_met(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_met_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_met_attr_data (proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/* Command Dissector Helpers */
-static void dissect_zcl_met_get_profile (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_request_mirror_rsp (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_mirror_removed (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_request_fast_poll_mode (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_schedule_snapshot (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_take_snapshot (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_get_snapshot (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_start_sampling (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_get_sampled_data (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_mirror_report_attribute_response(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_reset_load_limit_counter (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_change_supply (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_local_change_supply (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_set_supply_status (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_set_uncontrolled_flow_threshold (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_get_profile_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_request_fast_poll_mode_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_schedule_snapshot_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_take_snapshot_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_publish_snapshot (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_get_sampled_data_rsp (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_configure_mirror (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_configure_notification_scheme (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_configure_notification_flags (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_get_notified_msg (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_supply_status_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_start_sampling_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_met_notification_flags (tvbuff_t *tvb, proto_tree *tree, guint *offset, guint16 noti_flags_number);
+static void dissect_zcl_met_get_profile (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_request_mirror_rsp (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_mirror_removed (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_request_fast_poll_mode (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_schedule_snapshot (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_take_snapshot (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_get_snapshot (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_start_sampling (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_get_sampled_data (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_mirror_report_attribute_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_reset_load_limit_counter (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_change_supply (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_local_change_supply (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_set_supply_status (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_set_uncontrolled_flow_threshold (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_get_profile_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_request_fast_poll_mode_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_schedule_snapshot_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_take_snapshot_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_publish_snapshot (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_get_sampled_data_rsp (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_configure_mirror (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_configure_notification_scheme (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_configure_notification_flags (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_get_notified_msg (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_supply_status_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_start_sampling_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_met_notification_flags (tvbuff_t *tvb, proto_tree *tree, unsigned *offset, uint16_t noti_flags_number);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_met = -1;
-
-static int hf_zbee_zcl_met_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_met_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_met_attr_server_id = -1;
-static int hf_zbee_zcl_met_attr_client_id = -1;
-static int hf_zbee_zcl_met_attr_reporting_status = -1;
-static int hf_zbee_zcl_met_func_noti_flags = -1;
-static int hf_zbee_zcl_met_func_noti_flag_new_ota_firmware = -1;
-static int hf_zbee_zcl_met_func_noti_flag_cbke_update_request = -1;
-static int hf_zbee_zcl_met_func_noti_flag_time_sync = -1;
-static int hf_zbee_zcl_met_func_noti_flag_stay_awake_request_han = -1;
-static int hf_zbee_zcl_met_func_noti_flag_stay_awake_request_wan = -1;
-static int hf_zbee_zcl_met_func_noti_flag_push_historical_metering_data_attribute_set = -1;
-static int hf_zbee_zcl_met_func_noti_flag_push_historical_prepayment_data_attribute_set = -1;
-static int hf_zbee_zcl_met_func_noti_flag_push_all_static_data_basic_cluster = -1;
-static int hf_zbee_zcl_met_func_noti_flag_push_all_static_data_metering_cluster = -1;
-static int hf_zbee_zcl_met_func_noti_flag_push_all_static_data_prepayment_cluster = -1;
-static int hf_zbee_zcl_met_func_noti_flag_network_key_active = -1;
-static int hf_zbee_zcl_met_func_noti_flag_display_message = -1;
-static int hf_zbee_zcl_met_func_noti_flag_cancel_all_messages = -1;
-static int hf_zbee_zcl_met_func_noti_flag_change_supply = -1;
-static int hf_zbee_zcl_met_func_noti_flag_local_change_supply = -1;
-static int hf_zbee_zcl_met_func_noti_flag_set_uncontrolled_flow_threshold = -1;
-static int hf_zbee_zcl_met_func_noti_flag_tunnel_message_pending = -1;
-static int hf_zbee_zcl_met_func_noti_flag_get_snapshot = -1;
-static int hf_zbee_zcl_met_func_noti_flag_get_sampled_data = -1;
-static int hf_zbee_zcl_met_func_noti_flag_new_sub_ghz_channel_masks_available = -1;
-static int hf_zbee_zcl_met_func_noti_flag_energy_scan_pending = -1;
-static int hf_zbee_zcl_met_func_noti_flag_channel_change_pending = -1;
-static int hf_zbee_zcl_met_func_noti_flag_reserved = -1;
-static int hf_zbee_zcl_met_noti_flags_2 = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_price = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_block_period = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_tariff_info = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_conversion_factor = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_calorific_value = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_co2_value = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_billing_period = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_consolidated_bill = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_price_matrix = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_block_thresholds = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_currency_conversion = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_credit_payment_info = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_cpp_event = -1;
-static int hf_zbee_zcl_met_noti_flag_2_publish_tier_labels = -1;
-static int hf_zbee_zcl_met_noti_flag_2_cancel_tariff = -1;
-static int hf_zbee_zcl_met_noti_flag_2_reserved = -1;
-static int hf_zbee_zcl_met_noti_flags_3 = -1;
-static int hf_zbee_zcl_met_noti_flag_3_publish_calendar = -1;
-static int hf_zbee_zcl_met_noti_flag_3_publish_special_days = -1;
-static int hf_zbee_zcl_met_noti_flag_3_publish_seasons = -1;
-static int hf_zbee_zcl_met_noti_flag_3_publish_week = -1;
-static int hf_zbee_zcl_met_noti_flag_3_publish_day = -1;
-static int hf_zbee_zcl_met_noti_flag_3_cancel_calendar = -1;
-static int hf_zbee_zcl_met_noti_flag_3_reserved = -1;
-static int hf_zbee_zcl_met_noti_flags_4 = -1;
-static int hf_zbee_zcl_met_noti_flag_4_select_available_emergency_credit = -1;
-static int hf_zbee_zcl_met_noti_flag_4_change_debt = -1;
-static int hf_zbee_zcl_met_noti_flag_4_emergency_credit_setup = -1;
-static int hf_zbee_zcl_met_noti_flag_4_consumer_top_up = -1;
-static int hf_zbee_zcl_met_noti_flag_4_credit_adjustment = -1;
-static int hf_zbee_zcl_met_noti_flag_4_change_payment_mode = -1;
-static int hf_zbee_zcl_met_noti_flag_4_get_prepay_snapshot = -1;
-static int hf_zbee_zcl_met_noti_flag_4_get_top_up_log = -1;
-static int hf_zbee_zcl_met_noti_flag_4_set_low_credit_warning_level = -1;
-static int hf_zbee_zcl_met_noti_flag_4_get_debt_repayment_log = -1;
-static int hf_zbee_zcl_met_noti_flag_4_set_maximum_credit_limit = -1;
-static int hf_zbee_zcl_met_noti_flag_4_set_overall_debt_cap = -1;
-static int hf_zbee_zcl_met_noti_flag_4_reserved = -1;
-static int hf_zbee_zcl_met_noti_flags_5 = -1;
-static int hf_zbee_zcl_met_noti_flag_5_publish_change_of_tenancy = -1;
-static int hf_zbee_zcl_met_noti_flag_5_publish_change_of_supplier = -1;
-static int hf_zbee_zcl_met_noti_flag_5_request_new_password_1_response = -1;
-static int hf_zbee_zcl_met_noti_flag_5_request_new_password_2_response = -1;
-static int hf_zbee_zcl_met_noti_flag_5_request_new_password_3_response = -1;
-static int hf_zbee_zcl_met_noti_flag_5_request_new_password_4_response = -1;
-static int hf_zbee_zcl_met_noti_flag_5_update_site_id = -1;
-static int hf_zbee_zcl_met_noti_flag_5_reset_battery_counter = -1;
-static int hf_zbee_zcl_met_noti_flag_5_update_cin = -1;
-static int hf_zbee_zcl_met_noti_flag_5_reserved = -1;
-static int hf_zbee_zcl_met_get_profile_interval_channel = -1;
-static int hf_zbee_zcl_met_get_profile_end_time = -1;
-static int hf_zbee_zcl_met_get_profile_number_of_periods = -1;
-static int hf_zbee_zcl_met_request_mirror_rsp_endpoint_id = -1;
-static int hf_zbee_zcl_met_mirror_removed_removed_endpoint_id = -1;
-static int hf_zbee_zcl_met_request_fast_poll_mode_fast_poll_update_period = -1;
-static int hf_zbee_zcl_met_request_fast_poll_mode_duration = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_issuer_event_id = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_command_index = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_schedule_id = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_start_time = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_schedule = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_shapshot_payload_type = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_cause = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_total_number_of_commands = -1;
-static int hf_zbee_zcl_met_take_snapshot_snapshot_cause = -1;
-static int hf_zbee_zcl_met_get_snapshot_start_time = -1;
-static int hf_zbee_zcl_met_get_snapshot_end_time = -1;
-static int hf_zbee_zcl_met_get_snapshot_snapshot_offset = -1;
-static int hf_zbee_zcl_met_get_snapshot_snapshot_cause = -1;
-static int hf_zbee_zcl_met_start_sampling_issuer_event_id = -1;
-static int hf_zbee_zcl_met_start_sampling_start_sampling_time = -1;
-static int hf_zbee_zcl_met_start_sampling_sample_type = -1;
-static int hf_zbee_zcl_met_start_sampling_sample_request_interval = -1;
-static int hf_zbee_zcl_met_start_sampling_max_number_of_samples = -1;
-static int hf_zbee_zcl_met_get_sampled_data_sample_id = -1;
-static int hf_zbee_zcl_met_get_sampled_data_sample_start_time = -1;
-static int hf_zbee_zcl_met_get_sampled_data_sample_type = -1;
-static int hf_zbee_zcl_met_get_sampled_data_number_of_samples = -1;
-static int hf_zbee_zcl_met_start_sampling_response_sample_id = -1;
-static int hf_zbee_zcl_met_mirror_report_attribute_response_notification_scheme = -1;
-static int hf_zbee_zcl_met_mirror_report_attribute_response_notification_flags_n = -1;
-static int hf_zbee_zcl_met_reset_load_limit_counter_provider_id = -1;
-static int hf_zbee_zcl_met_reset_load_limit_counter_issuer_event_id = -1;
-static int hf_zbee_zcl_met_change_supply_provider_id = -1;
-static int hf_zbee_zcl_met_change_supply_issuer_event_id = -1;
-static int hf_zbee_zcl_met_change_supply_request_date_time = -1;
-static int hf_zbee_zcl_met_change_supply_implementation_date_time = -1;
-static int hf_zbee_zcl_met_change_supply_proposed_supply_status = -1;
-static int hf_zbee_zcl_met_change_supply_supply_control_bits = -1;
-static int hf_zbee_zcl_met_local_change_supply_proposed_supply_status = -1;
-static int hf_zbee_zcl_met_set_supply_status_issuer_event_id = -1;
-static int hf_zbee_zcl_met_set_supply_status_supply_tamper_state = -1;
-static int hf_zbee_zcl_met_set_supply_status_supply_depletion_state = -1;
-static int hf_zbee_zcl_met_set_supply_status_supply_uncontrolled_flow_state = -1;
-static int hf_zbee_zcl_met_set_supply_status_load_limit_supply_state = -1;
-static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_provider_id = -1;
-static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_issuer_event_id = -1;
-static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_uncontrolled_flow_threshold = -1;
-static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_unit_of_measure = -1;
-static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_multiplier = -1;
-static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_divisor = -1;
-static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_stabilisation_period = -1;
-static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_measurement_period = -1;
-static int hf_zbee_zcl_met_get_profile_response_end_time = -1;
-static int hf_zbee_zcl_met_get_profile_response_status = -1;
-static int hf_zbee_zcl_met_get_profile_response_profile_interval_period = -1;
-static int hf_zbee_zcl_met_get_profile_response_number_of_periods_delivered = -1;
-static int hf_zbee_zcl_met_get_profile_response_intervals = -1;
-static int hf_zbee_zcl_met_request_fast_poll_mode_response_applied_update_period = -1;
-static int hf_zbee_zcl_met_request_fast_poll_mode_response_fast_poll_mode_end_time = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_response_issuer_event_id = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_response_snapshot_schedule_id = -1;
-static int hf_zbee_zcl_met_schedule_snapshot_response_snapshot_schedule_confirmation = -1;
-static int hf_zbee_zcl_met_take_snapshot_response_snapshot_id = -1;
-static int hf_zbee_zcl_met_take_snapshot_response_snapshot_confirmation = -1;
-static int hf_zbee_zcl_met_publish_snapshot_snapshot_id = -1;
-static int hf_zbee_zcl_met_publish_snapshot_snapshot_time = -1;
-static int hf_zbee_zcl_met_publish_snapshot_snapshots_found = -1;
-static int hf_zbee_zcl_met_publish_snapshot_cmd_index = -1;
-static int hf_zbee_zcl_met_publish_snapshot_total_commands = -1;
-static int hf_zbee_zcl_met_publish_snapshot_snapshot_cause = -1;
-static int hf_zbee_zcl_met_publish_snapshot_snapshot_payload_type = -1;
-static int hf_zbee_zcl_met_publish_snapshot_snapshot_sub_payload = -1;
-static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_id = -1;
-static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_start_time = -1;
-static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_type = -1;
-static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_request_interval = -1;
-static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_number_of_samples = -1;
-static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_samples = -1;
-static int hf_zbee_zcl_met_configure_mirror_issuer_event_id = -1;
-static int hf_zbee_zcl_met_configure_mirror_reporting_interval = -1;
-static int hf_zbee_zcl_met_configure_mirror_mirror_notification_reporting = -1;
-static int hf_zbee_zcl_met_configure_mirror_notification_scheme = -1;
-static int hf_zbee_zcl_met_configure_notification_scheme_issuer_event_id = -1;
-static int hf_zbee_zcl_met_configure_notification_scheme_notification_scheme = -1;
-static int hf_zbee_zcl_met_configure_notification_scheme_notification_flag_order = -1;
-static int hf_zbee_zcl_met_configure_notification_flags_issuer_event_id = -1;
-static int hf_zbee_zcl_met_configure_notification_flags_notification_scheme = -1;
-static int hf_zbee_zcl_met_configure_notification_flags_notification_flag_attribute_id = -1;
-static int hf_zbee_zcl_met_configure_notification_flags_bit_field_allocation_cluster_id = -1;
-static int hf_zbee_zcl_met_configure_notification_flags_bit_field_allocation_manufacturer_code = -1;
-static int hf_zbee_zcl_met_configure_notification_flags_bit_field_allocation_no_of_commands = -1;
-static int hf_zbee_zcl_met_configure_notification_flags_bit_field_allocation_command_identifier = -1;
-static int hf_zbee_zcl_met_get_notified_msg_notification_scheme = -1;
-static int hf_zbee_zcl_met_get_notified_msg_notification_flag_attribute_id = -1;
-static int hf_zbee_zcl_met_get_notified_msg_notification_flags = -1;
-static int hf_zbee_zcl_met_supply_status_response_provider_id = -1;
-static int hf_zbee_zcl_met_supply_status_response_issuer_event_id = -1;
-static int hf_zbee_zcl_met_supply_status_response_implementation_date_time = -1;
-static int hf_zbee_zcl_met_supply_status_response_supply_status_after_implementation = -1;
-static int hf_zbee_zcl_met_snapshot_cause_general = -1;
-static int hf_zbee_zcl_met_snapshot_cause_end_of_billing_period = -1;
-static int hf_zbee_zcl_met_snapshot_cause_end_of_block_period = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_tariff_information = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_price_matrix = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_block_thresholds = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_cv = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_cf = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_calendar = -1;
-static int hf_zbee_zcl_met_snapshot_cause_critical_peak_pricing = -1;
-static int hf_zbee_zcl_met_snapshot_cause_manually_triggered_from_client = -1;
-static int hf_zbee_zcl_met_snapshot_cause_end_of_resolve_period = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_tenancy = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_supplier = -1;
-static int hf_zbee_zcl_met_snapshot_cause_change_of_meter_mode = -1;
-static int hf_zbee_zcl_met_snapshot_cause_debt_payment = -1;
-static int hf_zbee_zcl_met_snapshot_cause_scheduled_snapshot = -1;
-static int hf_zbee_zcl_met_snapshot_cause_ota_firmware_download = -1;
-static int hf_zbee_zcl_met_snapshot_cause_reserved = -1;
-static int hf_zbee_zcl_met_snapshot_schedule_frequency = -1;
-static int hf_zbee_zcl_met_snapshot_schedule_frequency_type = -1;
-static int hf_zbee_zcl_met_snapshot_schedule_frequency_wild_card = -1;
+static int proto_zbee_zcl_met;
+
+static int hf_zbee_zcl_met_srv_tx_cmd_id;
+static int hf_zbee_zcl_met_srv_rx_cmd_id;
+static int hf_zbee_zcl_met_attr_server_id;
+static int hf_zbee_zcl_met_attr_client_id;
+static int hf_zbee_zcl_met_attr_reporting_status;
+static int hf_zbee_zcl_met_func_noti_flags;
+static int hf_zbee_zcl_met_func_noti_flag_new_ota_firmware;
+static int hf_zbee_zcl_met_func_noti_flag_cbke_update_request;
+static int hf_zbee_zcl_met_func_noti_flag_time_sync;
+static int hf_zbee_zcl_met_func_noti_flag_stay_awake_request_han;
+static int hf_zbee_zcl_met_func_noti_flag_stay_awake_request_wan;
+static int hf_zbee_zcl_met_func_noti_flag_push_historical_metering_data_attribute_set;
+static int hf_zbee_zcl_met_func_noti_flag_push_historical_prepayment_data_attribute_set;
+static int hf_zbee_zcl_met_func_noti_flag_push_all_static_data_basic_cluster;
+static int hf_zbee_zcl_met_func_noti_flag_push_all_static_data_metering_cluster;
+static int hf_zbee_zcl_met_func_noti_flag_push_all_static_data_prepayment_cluster;
+static int hf_zbee_zcl_met_func_noti_flag_network_key_active;
+static int hf_zbee_zcl_met_func_noti_flag_display_message;
+static int hf_zbee_zcl_met_func_noti_flag_cancel_all_messages;
+static int hf_zbee_zcl_met_func_noti_flag_change_supply;
+static int hf_zbee_zcl_met_func_noti_flag_local_change_supply;
+static int hf_zbee_zcl_met_func_noti_flag_set_uncontrolled_flow_threshold;
+static int hf_zbee_zcl_met_func_noti_flag_tunnel_message_pending;
+static int hf_zbee_zcl_met_func_noti_flag_get_snapshot;
+static int hf_zbee_zcl_met_func_noti_flag_get_sampled_data;
+static int hf_zbee_zcl_met_func_noti_flag_new_sub_ghz_channel_masks_available;
+static int hf_zbee_zcl_met_func_noti_flag_energy_scan_pending;
+static int hf_zbee_zcl_met_func_noti_flag_channel_change_pending;
+static int hf_zbee_zcl_met_func_noti_flag_reserved;
+static int hf_zbee_zcl_met_noti_flags_2;
+static int hf_zbee_zcl_met_noti_flag_2_publish_price;
+static int hf_zbee_zcl_met_noti_flag_2_publish_block_period;
+static int hf_zbee_zcl_met_noti_flag_2_publish_tariff_info;
+static int hf_zbee_zcl_met_noti_flag_2_publish_conversion_factor;
+static int hf_zbee_zcl_met_noti_flag_2_publish_calorific_value;
+static int hf_zbee_zcl_met_noti_flag_2_publish_co2_value;
+static int hf_zbee_zcl_met_noti_flag_2_publish_billing_period;
+static int hf_zbee_zcl_met_noti_flag_2_publish_consolidated_bill;
+static int hf_zbee_zcl_met_noti_flag_2_publish_price_matrix;
+static int hf_zbee_zcl_met_noti_flag_2_publish_block_thresholds;
+static int hf_zbee_zcl_met_noti_flag_2_publish_currency_conversion;
+static int hf_zbee_zcl_met_noti_flag_2_publish_credit_payment_info;
+static int hf_zbee_zcl_met_noti_flag_2_publish_cpp_event;
+static int hf_zbee_zcl_met_noti_flag_2_publish_tier_labels;
+static int hf_zbee_zcl_met_noti_flag_2_cancel_tariff;
+static int hf_zbee_zcl_met_noti_flag_2_reserved;
+static int hf_zbee_zcl_met_noti_flags_3;
+static int hf_zbee_zcl_met_noti_flag_3_publish_calendar;
+static int hf_zbee_zcl_met_noti_flag_3_publish_special_days;
+static int hf_zbee_zcl_met_noti_flag_3_publish_seasons;
+static int hf_zbee_zcl_met_noti_flag_3_publish_week;
+static int hf_zbee_zcl_met_noti_flag_3_publish_day;
+static int hf_zbee_zcl_met_noti_flag_3_cancel_calendar;
+static int hf_zbee_zcl_met_noti_flag_3_reserved;
+static int hf_zbee_zcl_met_noti_flags_4;
+static int hf_zbee_zcl_met_noti_flag_4_select_available_emergency_credit;
+static int hf_zbee_zcl_met_noti_flag_4_change_debt;
+static int hf_zbee_zcl_met_noti_flag_4_emergency_credit_setup;
+static int hf_zbee_zcl_met_noti_flag_4_consumer_top_up;
+static int hf_zbee_zcl_met_noti_flag_4_credit_adjustment;
+static int hf_zbee_zcl_met_noti_flag_4_change_payment_mode;
+static int hf_zbee_zcl_met_noti_flag_4_get_prepay_snapshot;
+static int hf_zbee_zcl_met_noti_flag_4_get_top_up_log;
+static int hf_zbee_zcl_met_noti_flag_4_set_low_credit_warning_level;
+static int hf_zbee_zcl_met_noti_flag_4_get_debt_repayment_log;
+static int hf_zbee_zcl_met_noti_flag_4_set_maximum_credit_limit;
+static int hf_zbee_zcl_met_noti_flag_4_set_overall_debt_cap;
+static int hf_zbee_zcl_met_noti_flag_4_reserved;
+static int hf_zbee_zcl_met_noti_flags_5;
+static int hf_zbee_zcl_met_noti_flag_5_publish_change_of_tenancy;
+static int hf_zbee_zcl_met_noti_flag_5_publish_change_of_supplier;
+static int hf_zbee_zcl_met_noti_flag_5_request_new_password_1_response;
+static int hf_zbee_zcl_met_noti_flag_5_request_new_password_2_response;
+static int hf_zbee_zcl_met_noti_flag_5_request_new_password_3_response;
+static int hf_zbee_zcl_met_noti_flag_5_request_new_password_4_response;
+static int hf_zbee_zcl_met_noti_flag_5_update_site_id;
+static int hf_zbee_zcl_met_noti_flag_5_reset_battery_counter;
+static int hf_zbee_zcl_met_noti_flag_5_update_cin;
+static int hf_zbee_zcl_met_noti_flag_5_reserved;
+static int hf_zbee_zcl_met_get_profile_interval_channel;
+static int hf_zbee_zcl_met_get_profile_end_time;
+static int hf_zbee_zcl_met_get_profile_number_of_periods;
+static int hf_zbee_zcl_met_request_mirror_rsp_endpoint_id;
+static int hf_zbee_zcl_met_mirror_removed_removed_endpoint_id;
+static int hf_zbee_zcl_met_request_fast_poll_mode_fast_poll_update_period;
+static int hf_zbee_zcl_met_request_fast_poll_mode_duration;
+static int hf_zbee_zcl_met_schedule_snapshot_issuer_event_id;
+static int hf_zbee_zcl_met_schedule_snapshot_command_index;
+static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_schedule_id;
+static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_start_time;
+static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_schedule;
+static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_shapshot_payload_type;
+static int hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_cause;
+static int hf_zbee_zcl_met_schedule_snapshot_total_number_of_commands;
+static int hf_zbee_zcl_met_take_snapshot_snapshot_cause;
+static int hf_zbee_zcl_met_get_snapshot_start_time;
+static int hf_zbee_zcl_met_get_snapshot_end_time;
+static int hf_zbee_zcl_met_get_snapshot_snapshot_offset;
+static int hf_zbee_zcl_met_get_snapshot_snapshot_cause;
+static int hf_zbee_zcl_met_start_sampling_issuer_event_id;
+static int hf_zbee_zcl_met_start_sampling_start_sampling_time;
+static int hf_zbee_zcl_met_start_sampling_sample_type;
+static int hf_zbee_zcl_met_start_sampling_sample_request_interval;
+static int hf_zbee_zcl_met_start_sampling_max_number_of_samples;
+static int hf_zbee_zcl_met_get_sampled_data_sample_id;
+static int hf_zbee_zcl_met_get_sampled_data_sample_start_time;
+static int hf_zbee_zcl_met_get_sampled_data_sample_type;
+static int hf_zbee_zcl_met_get_sampled_data_number_of_samples;
+static int hf_zbee_zcl_met_start_sampling_response_sample_id;
+static int hf_zbee_zcl_met_mirror_report_attribute_response_notification_scheme;
+static int hf_zbee_zcl_met_mirror_report_attribute_response_notification_flags_n;
+static int hf_zbee_zcl_met_reset_load_limit_counter_provider_id;
+static int hf_zbee_zcl_met_reset_load_limit_counter_issuer_event_id;
+static int hf_zbee_zcl_met_change_supply_provider_id;
+static int hf_zbee_zcl_met_change_supply_issuer_event_id;
+static int hf_zbee_zcl_met_change_supply_request_date_time;
+static int hf_zbee_zcl_met_change_supply_implementation_date_time;
+static int hf_zbee_zcl_met_change_supply_proposed_supply_status;
+static int hf_zbee_zcl_met_change_supply_supply_control_bits;
+static int hf_zbee_zcl_met_local_change_supply_proposed_supply_status;
+static int hf_zbee_zcl_met_set_supply_status_issuer_event_id;
+static int hf_zbee_zcl_met_set_supply_status_supply_tamper_state;
+static int hf_zbee_zcl_met_set_supply_status_supply_depletion_state;
+static int hf_zbee_zcl_met_set_supply_status_supply_uncontrolled_flow_state;
+static int hf_zbee_zcl_met_set_supply_status_load_limit_supply_state;
+static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_provider_id;
+static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_issuer_event_id;
+static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_uncontrolled_flow_threshold;
+static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_unit_of_measure;
+static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_multiplier;
+static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_divisor;
+static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_stabilisation_period;
+static int hf_zbee_zcl_met_set_uncontrolled_flow_threshold_measurement_period;
+static int hf_zbee_zcl_met_get_profile_response_end_time;
+static int hf_zbee_zcl_met_get_profile_response_status;
+static int hf_zbee_zcl_met_get_profile_response_profile_interval_period;
+static int hf_zbee_zcl_met_get_profile_response_number_of_periods_delivered;
+static int hf_zbee_zcl_met_get_profile_response_intervals;
+static int hf_zbee_zcl_met_request_fast_poll_mode_response_applied_update_period;
+static int hf_zbee_zcl_met_request_fast_poll_mode_response_fast_poll_mode_end_time;
+static int hf_zbee_zcl_met_schedule_snapshot_response_issuer_event_id;
+static int hf_zbee_zcl_met_schedule_snapshot_response_snapshot_schedule_id;
+static int hf_zbee_zcl_met_schedule_snapshot_response_snapshot_schedule_confirmation;
+static int hf_zbee_zcl_met_take_snapshot_response_snapshot_id;
+static int hf_zbee_zcl_met_take_snapshot_response_snapshot_confirmation;
+static int hf_zbee_zcl_met_publish_snapshot_snapshot_id;
+static int hf_zbee_zcl_met_publish_snapshot_snapshot_time;
+static int hf_zbee_zcl_met_publish_snapshot_snapshots_found;
+static int hf_zbee_zcl_met_publish_snapshot_cmd_index;
+static int hf_zbee_zcl_met_publish_snapshot_total_commands;
+static int hf_zbee_zcl_met_publish_snapshot_snapshot_cause;
+static int hf_zbee_zcl_met_publish_snapshot_snapshot_payload_type;
+static int hf_zbee_zcl_met_publish_snapshot_snapshot_sub_payload;
+static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_id;
+static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_start_time;
+static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_type;
+static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_request_interval;
+static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_number_of_samples;
+static int hf_zbee_zcl_met_get_sampled_data_rsp_sample_samples;
+static int hf_zbee_zcl_met_configure_mirror_issuer_event_id;
+static int hf_zbee_zcl_met_configure_mirror_reporting_interval;
+static int hf_zbee_zcl_met_configure_mirror_mirror_notification_reporting;
+static int hf_zbee_zcl_met_configure_mirror_notification_scheme;
+static int hf_zbee_zcl_met_configure_notification_scheme_issuer_event_id;
+static int hf_zbee_zcl_met_configure_notification_scheme_notification_scheme;
+static int hf_zbee_zcl_met_configure_notification_scheme_notification_flag_order;
+static int hf_zbee_zcl_met_configure_notification_flags_issuer_event_id;
+static int hf_zbee_zcl_met_configure_notification_flags_notification_scheme;
+static int hf_zbee_zcl_met_configure_notification_flags_notification_flag_attribute_id;
+static int hf_zbee_zcl_met_configure_notification_flags_bit_field_allocation_cluster_id;
+static int hf_zbee_zcl_met_configure_notification_flags_bit_field_allocation_manufacturer_code;
+static int hf_zbee_zcl_met_configure_notification_flags_bit_field_allocation_no_of_commands;
+static int hf_zbee_zcl_met_configure_notification_flags_bit_field_allocation_command_identifier;
+static int hf_zbee_zcl_met_get_notified_msg_notification_scheme;
+static int hf_zbee_zcl_met_get_notified_msg_notification_flag_attribute_id;
+static int hf_zbee_zcl_met_get_notified_msg_notification_flags;
+static int hf_zbee_zcl_met_supply_status_response_provider_id;
+static int hf_zbee_zcl_met_supply_status_response_issuer_event_id;
+static int hf_zbee_zcl_met_supply_status_response_implementation_date_time;
+static int hf_zbee_zcl_met_supply_status_response_supply_status_after_implementation;
+static int hf_zbee_zcl_met_snapshot_cause_general;
+static int hf_zbee_zcl_met_snapshot_cause_end_of_billing_period;
+static int hf_zbee_zcl_met_snapshot_cause_end_of_block_period;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_tariff_information;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_price_matrix;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_block_thresholds;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_cv;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_cf;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_calendar;
+static int hf_zbee_zcl_met_snapshot_cause_critical_peak_pricing;
+static int hf_zbee_zcl_met_snapshot_cause_manually_triggered_from_client;
+static int hf_zbee_zcl_met_snapshot_cause_end_of_resolve_period;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_tenancy;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_supplier;
+static int hf_zbee_zcl_met_snapshot_cause_change_of_meter_mode;
+static int hf_zbee_zcl_met_snapshot_cause_debt_payment;
+static int hf_zbee_zcl_met_snapshot_cause_scheduled_snapshot;
+static int hf_zbee_zcl_met_snapshot_cause_ota_firmware_download;
+static int hf_zbee_zcl_met_snapshot_cause_reserved;
+static int hf_zbee_zcl_met_snapshot_schedule_frequency;
+static int hf_zbee_zcl_met_snapshot_schedule_frequency_type;
+static int hf_zbee_zcl_met_snapshot_schedule_frequency_wild_card;
static int* const zbee_zcl_met_snapshot_schedule_bits[] = {
&hf_zbee_zcl_met_snapshot_schedule_frequency,
@@ -5956,18 +5865,18 @@ static int* const zbee_zcl_met_snapshot_cause_flags[] = {
};
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_met = -1;
-static gint ett_zbee_zcl_met_func_noti_flags = -1;
-static gint ett_zbee_zcl_met_noti_flags_2 = -1;
-static gint ett_zbee_zcl_met_noti_flags_3 = -1;
-static gint ett_zbee_zcl_met_noti_flags_4 = -1;
-static gint ett_zbee_zcl_met_noti_flags_5 = -1;
-static gint ett_zbee_zcl_met_snapshot_cause_flags = -1;
-static gint ett_zbee_zcl_met_snapshot_schedule = -1;
-static gint ett_zbee_zcl_met_schedule_snapshot_response_payload = -1;
-static gint ett_zbee_zcl_met_schedule_snapshot_payload = -1;
-static gint ett_zbee_zcl_met_mirror_noti_flag = -1;
-static gint ett_zbee_zcl_met_bit_field_allocation = -1;
+static int ett_zbee_zcl_met;
+static int ett_zbee_zcl_met_func_noti_flags;
+static int ett_zbee_zcl_met_noti_flags_2;
+static int ett_zbee_zcl_met_noti_flags_3;
+static int ett_zbee_zcl_met_noti_flags_4;
+static int ett_zbee_zcl_met_noti_flags_5;
+static int ett_zbee_zcl_met_snapshot_cause_flags;
+static int ett_zbee_zcl_met_snapshot_schedule;
+static int ett_zbee_zcl_met_schedule_snapshot_response_payload;
+static int ett_zbee_zcl_met_schedule_snapshot_payload;
+static int ett_zbee_zcl_met_mirror_noti_flag;
+static int ett_zbee_zcl_met_bit_field_allocation;
/*************************/
/* Function Bodies */
@@ -5984,7 +5893,7 @@ static gint ett_zbee_zcl_met_bit_field_allocation = -1;
*@param client_attr ZCL client
*/
static void
-dissect_zcl_met_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_met_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
if (client_attr) {
switch (attr_id) {
@@ -6051,7 +5960,7 @@ dissect_zcl_met_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint1
*@param tree pointer to data tree Wireshark uses to display packet.
*@param offset pointer to offset from caller
*/
-static void dissect_zcl_met_start_sampling_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+static void dissect_zcl_met_start_sampling_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Sample ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_start_sampling_response_sample_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
@@ -6070,9 +5979,9 @@ dissect_zbee_zcl_met(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -6253,18 +6162,14 @@ dissect_zbee_zcl_met(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_get_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_get_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t end_time;
-
/* Interval Channel */
proto_tree_add_item(tree, hf_zbee_zcl_met_get_profile_interval_channel, tvb, *offset, 1, ENC_NA);
*offset += 1;
/* End Time */
- end_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- end_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_get_profile_end_time, tvb, *offset, 4, &end_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_get_profile_end_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Periods */
@@ -6280,7 +6185,7 @@ dissect_zcl_met_get_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_request_mirror_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_request_mirror_rsp(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* EndPoint ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_request_mirror_rsp_endpoint_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
@@ -6295,7 +6200,7 @@ dissect_zcl_met_request_mirror_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offse
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_mirror_removed(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_mirror_removed(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Removed EndPoint ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_mirror_removed_removed_endpoint_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
@@ -6310,7 +6215,7 @@ dissect_zcl_met_mirror_removed(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_request_fast_poll_mode(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_request_fast_poll_mode(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Fast Poll Update Period */
proto_tree_add_item(tree, hf_zbee_zcl_met_request_fast_poll_mode_fast_poll_update_period, tvb, *offset, 1, ENC_NA);
@@ -6329,9 +6234,8 @@ dissect_zcl_met_request_fast_poll_mode(tvbuff_t *tvb, proto_tree *tree, guint *o
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_schedule_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_schedule_snapshot(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
/* Issue Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_schedule_snapshot_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -6356,9 +6260,7 @@ dissect_zcl_met_schedule_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset
*offset += 1;
/* Snapshot Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_schedule_snapshot_snapshot_schedule_payload_snapshot_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Snapshot Schedule */
@@ -6387,7 +6289,7 @@ dissect_zcl_met_schedule_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_take_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_take_snapshot(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Snapshot Cause */
proto_tree_add_bitmask(tree, tvb, *offset, hf_zbee_zcl_met_take_snapshot_snapshot_cause,
@@ -6403,22 +6305,15 @@ dissect_zcl_met_take_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_get_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_get_snapshot(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
- nstime_t end_time;
-
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_get_snapshot_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_get_snapshot_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
if (gPREF_zbee_se_protocol_version >= ZBEE_SE_VERSION_1_2) {
/* End Time - Introduced from ZCL version 1.2 */
- end_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- end_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_get_snapshot_end_time, tvb, *offset, 4, &end_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_get_snapshot_end_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
}
@@ -6440,18 +6335,14 @@ dissect_zcl_met_get_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_start_sampling(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_start_sampling(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t sample_time;
-
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_start_sampling_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Start Sampling Time */
- sample_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- sample_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_start_sampling_start_sampling_time, tvb, *offset, 4, &sample_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_start_sampling_start_sampling_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Sample Type */
@@ -6475,18 +6366,14 @@ dissect_zcl_met_start_sampling(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_get_sampled_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_get_sampled_data(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t sample_time;
-
/* Sample ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_get_sampled_data_sample_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
/* Sample Start Time */
- sample_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- sample_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_get_sampled_data_sample_start_time, tvb, *offset, 4, &sample_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_get_sampled_data_sample_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Sample Type */
@@ -6506,12 +6393,12 @@ dissect_zcl_met_get_sampled_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_mirror_report_attribute_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_mirror_report_attribute_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 notif_scheme_type;
- gint noti_flags_count;
+ uint8_t notif_scheme_type;
+ int noti_flags_count;
- notif_scheme_type = tvb_get_guint8(tvb, *offset);
+ notif_scheme_type = tvb_get_uint8(tvb, *offset);
/* Notification Scheme */
proto_tree_add_item(tree, hf_zbee_zcl_met_mirror_report_attribute_response_notification_scheme, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -6528,7 +6415,7 @@ dissect_zcl_met_mirror_report_attribute_response(tvbuff_t *tvb, proto_tree *tree
break;
}
if (noti_flags_count > 0) {
- for (guint16 noti_flags_number = 0; noti_flags_number < noti_flags_count; noti_flags_number++) {
+ for (uint16_t noti_flags_number = 0; noti_flags_number < noti_flags_count; noti_flags_number++) {
dissect_zcl_met_notification_flags(tvb, tree, offset, noti_flags_number);
}
} else {
@@ -6551,7 +6438,7 @@ dissect_zcl_met_mirror_report_attribute_response(tvbuff_t *tvb, proto_tree *tree
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_reset_load_limit_counter(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_reset_load_limit_counter(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_reset_load_limit_counter_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -6570,11 +6457,8 @@ dissect_zcl_met_reset_load_limit_counter(tvbuff_t *tvb, proto_tree *tree, guint
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_change_supply(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_change_supply(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t request_time;
- nstime_t implementation_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_change_supply_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -6584,15 +6468,11 @@ dissect_zcl_met_change_supply(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 4;
/* Request Date/Time */
- request_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- request_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_change_supply_request_date_time, tvb, *offset, 4, &request_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_change_supply_request_date_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Implementation Date/Time */
- implementation_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- implementation_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_change_supply_implementation_date_time, tvb, *offset, 4, &implementation_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_change_supply_implementation_date_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Proposed Supple Status */
@@ -6612,7 +6492,7 @@ dissect_zcl_met_change_supply(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_local_change_supply(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_local_change_supply(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Proposed Supply Status */
proto_tree_add_item(tree, hf_zbee_zcl_met_local_change_supply_proposed_supply_status, tvb, *offset, 1, ENC_NA);
@@ -6627,7 +6507,7 @@ dissect_zcl_met_local_change_supply(tvbuff_t *tvb, proto_tree *tree, guint *offs
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_set_supply_status(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_set_supply_status(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_set_supply_status_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -6658,7 +6538,7 @@ dissect_zcl_met_set_supply_status(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_set_uncontrolled_flow_threshold(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_set_uncontrolled_flow_threshold(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_set_uncontrolled_flow_threshold_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -6701,14 +6581,11 @@ dissect_zcl_met_set_uncontrolled_flow_threshold(tvbuff_t *tvb, proto_tree *tree,
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_get_profile_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_get_profile_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t end_time;
/* End Time */
- end_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- end_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_get_profile_response_end_time, tvb, *offset, 4, &end_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_get_profile_response_end_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Status */
@@ -6738,14 +6615,23 @@ dissect_zcl_met_get_profile_response(tvbuff_t *tvb, proto_tree *tree, guint *off
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_request_fast_poll_mode_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_request_fast_poll_mode_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
+ uint32_t end_time_utc;
+ nstime_t end_time;
+ const uint8_t *end_time_string;
+
/* Applied Update Period */
proto_tree_add_item(tree, hf_zbee_zcl_met_request_fast_poll_mode_response_applied_update_period, tvb, *offset, 1, ENC_NA);
*offset += 1;
/* Fast Poll End Time */
- proto_tree_add_item(tree, hf_zbee_zcl_met_request_fast_poll_mode_response_fast_poll_mode_end_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
+ end_time_utc = (uint32_t)tvb_get_letohl(tvb, *offset);
+ end_time.secs = end_time_utc + EPOCH_DELTA_2000_01_01_00_00_00_UTC;
+ end_time.nsecs = 0;
+ end_time_string = (const uint8_t *)abs_time_to_str(wmem_packet_scope(), &end_time, ABSOLUTE_TIME_UTC, true);
+ proto_tree_add_time_format(tree, hf_zbee_zcl_met_request_fast_poll_mode_response_fast_poll_mode_end_time, tvb, *offset, 4, &end_time,
+ "Fast Poll Mode End Time: %s (%u)", end_time_string, end_time_utc);
*offset += 4;
} /*dissect_zcl_met_request_fast_poll_mode_response*/
@@ -6757,7 +6643,7 @@ dissect_zcl_met_request_fast_poll_mode_response(tvbuff_t *tvb, proto_tree *tree,
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_schedule_snapshot_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_schedule_snapshot_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_schedule_snapshot_response_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -6787,7 +6673,7 @@ dissect_zcl_met_schedule_snapshot_response(tvbuff_t *tvb, proto_tree *tree, guin
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_take_snapshot_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_take_snapshot_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Snapshot ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_take_snapshot_response_snapshot_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -6806,19 +6692,16 @@ dissect_zcl_met_take_snapshot_response(tvbuff_t *tvb, proto_tree *tree, guint *o
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_publish_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_publish_snapshot(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t snapshot_time;
- gint rem_len;
+ int rem_len;
/* Snapshot ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_publish_snapshot_snapshot_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Snapshot Time */
- snapshot_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- snapshot_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_publish_snapshot_snapshot_time, tvb, *offset, 4, &snapshot_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_publish_snapshot_snapshot_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Total Snapshots Found */
@@ -6856,19 +6739,16 @@ dissect_zcl_met_publish_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_get_sampled_data_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_get_sampled_data_rsp(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t sample_start_time;
- gint rem_len;
+ int rem_len;
/* Snapshot ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_get_sampled_data_rsp_sample_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
/* Sample Start Time */
- sample_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- sample_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_get_sampled_data_rsp_sample_start_time, tvb, *offset, 4, &sample_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_get_sampled_data_rsp_sample_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Sample Type */
@@ -6886,7 +6766,7 @@ dissect_zcl_met_get_sampled_data_rsp(tvbuff_t *tvb, proto_tree *tree, guint *off
/* Samples */
rem_len = tvb_reported_length_remaining(tvb, *offset);
while (rem_len >= 3) {
- guint32 val = tvb_get_guint24(tvb, *offset, ENC_LITTLE_ENDIAN);
+ uint32_t val = tvb_get_uint24(tvb, *offset, ENC_LITTLE_ENDIAN);
proto_tree_add_uint(tree, hf_zbee_zcl_met_get_sampled_data_rsp_sample_samples, tvb, *offset, 3, val);
*offset += 3;
rem_len -= 3;
@@ -6901,7 +6781,7 @@ dissect_zcl_met_get_sampled_data_rsp(tvbuff_t *tvb, proto_tree *tree, guint *off
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_configure_mirror(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_configure_mirror(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_configure_mirror_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -6928,7 +6808,7 @@ dissect_zcl_met_configure_mirror(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_configure_notification_scheme(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_configure_notification_scheme(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_configure_notification_scheme_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -6951,10 +6831,10 @@ dissect_zcl_met_configure_notification_scheme(tvbuff_t *tvb, proto_tree *tree, g
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_configure_notification_flags(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_configure_notification_flags(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree *bit_field_allocation_tree;
- gint rem_len;
+ int rem_len;
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_configure_notification_flags_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -6992,7 +6872,7 @@ dissect_zcl_met_configure_notification_flags(tvbuff_t *tvb, proto_tree *tree, gu
} /*dissect_zcl_met_configure_notification_flags*/
static void
-dissect_zcl_met_notification_flags(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint16 noti_flags_number)
+dissect_zcl_met_notification_flags(tvbuff_t *tvb, proto_tree *tree, unsigned *offset, uint16_t noti_flags_number)
{
/* Notification Flags #N */
switch (noti_flags_number) {
@@ -7027,16 +6907,16 @@ dissect_zcl_met_notification_flags(tvbuff_t *tvb, proto_tree *tree, guint *offse
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_get_notified_msg(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_get_notified_msg(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint16 noti_flags_number;
+ uint16_t noti_flags_number;
/* Notification Scheme */
proto_tree_add_item(tree, hf_zbee_zcl_met_get_notified_msg_notification_scheme, tvb, *offset, 1, ENC_NA);
*offset += 1;
/* Notification Flag attribute ID */
- noti_flags_number = tvb_get_guint16(tvb, *offset, ENC_LITTLE_ENDIAN);
+ noti_flags_number = tvb_get_uint16(tvb, *offset, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_zbee_zcl_met_get_notified_msg_notification_flag_attribute_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -7051,10 +6931,8 @@ dissect_zcl_met_get_notified_msg(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_met_supply_status_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_met_supply_status_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t implementation_date_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_met_supply_status_response_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -7064,9 +6942,7 @@ dissect_zcl_met_supply_status_response(tvbuff_t *tvb, proto_tree *tree, guint *o
*offset += 4;
/* Implementation Date/Time */
- implementation_date_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- implementation_date_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_met_supply_status_response_implementation_date_time, tvb, *offset, 4, &implementation_date_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_met_supply_status_response_implementation_date_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Supply Status After Implementation */
@@ -7637,8 +7513,8 @@ proto_register_zbee_zcl_met(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_met_get_profile_response_end_time,
- { "End Time", "zbee_zcl_se.met.get_profile_response.end_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL,
- 0x00, NULL, HFILL } },
+ { "End Time", "zbee_zcl_se.met.get_profile_response.end_time",
+ FT_UINT32, BASE_CUSTOM, CF_FUNC(decode_zcl_se_utc_time), 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_met_get_profile_response_status,
{ "Status", "zbee_zcl_se.met.get_profile_response.status", FT_UINT8, BASE_HEX, NULL,
@@ -7884,7 +7760,7 @@ proto_register_zbee_zcl_met(void)
};
/* ZCL Metering subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_met,
&ett_zbee_zcl_met_func_noti_flags,
&ett_zbee_zcl_met_noti_flags_2,
@@ -7982,48 +7858,48 @@ void proto_register_zbee_zcl_msg(void);
void proto_reg_handoff_zbee_zcl_msg(void);
/* Command Dissector Helpers */
-static void dissect_zcl_msg_display (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_msg_cancel (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint *offset);
-static void dissect_zcl_msg_confirm (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_msg_cancel_all (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_msg_get_cancel (tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_msg_display (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_msg_cancel (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_msg_confirm (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_msg_cancel_all (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_msg_get_cancel (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/* Private functions prototype */
-static void decode_zcl_msg_duration (gchar *s, guint16 value);
+static void decode_zcl_msg_duration (char *s, uint16_t value);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_msg = -1;
-
-static int hf_zbee_zcl_msg_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_msg_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_msg_message_id = -1;
-static int hf_zbee_zcl_msg_ctrl = -1;
-static int hf_zbee_zcl_msg_ctrl_tx = -1;
-static int hf_zbee_zcl_msg_ctrl_importance = -1;
-static int hf_zbee_zcl_msg_ctrl_enh_confirm = -1;
-static int hf_zbee_zcl_msg_ctrl_reserved = -1;
-static int hf_zbee_zcl_msg_ctrl_confirm = -1;
-static int hf_zbee_zcl_msg_ext_ctrl = -1;
-static int hf_zbee_zcl_msg_ext_ctrl_status = -1;
-static int hf_zbee_zcl_msg_start_time = -1;
-static int hf_zbee_zcl_msg_duration = -1;
-static int hf_zbee_zcl_msg_message = -1;
-static int hf_zbee_zcl_msg_confirm_time = -1;
-static int hf_zbee_zcl_msg_confirm_ctrl = -1;
-static int hf_zbee_zcl_msg_confirm_response = -1;
-static int hf_zbee_zcl_msg_implementation_time = -1;
-static int hf_zbee_zcl_msg_earliest_time = -1;
+static int proto_zbee_zcl_msg;
+
+static int hf_zbee_zcl_msg_srv_tx_cmd_id;
+static int hf_zbee_zcl_msg_srv_rx_cmd_id;
+static int hf_zbee_zcl_msg_message_id;
+static int hf_zbee_zcl_msg_ctrl;
+static int hf_zbee_zcl_msg_ctrl_tx;
+static int hf_zbee_zcl_msg_ctrl_importance;
+static int hf_zbee_zcl_msg_ctrl_enh_confirm;
+static int hf_zbee_zcl_msg_ctrl_reserved;
+static int hf_zbee_zcl_msg_ctrl_confirm;
+static int hf_zbee_zcl_msg_ext_ctrl;
+static int hf_zbee_zcl_msg_ext_ctrl_status;
+static int hf_zbee_zcl_msg_start_time;
+static int hf_zbee_zcl_msg_duration;
+static int hf_zbee_zcl_msg_message;
+static int hf_zbee_zcl_msg_confirm_time;
+static int hf_zbee_zcl_msg_confirm_ctrl;
+static int hf_zbee_zcl_msg_confirm_response;
+static int hf_zbee_zcl_msg_implementation_time;
+static int hf_zbee_zcl_msg_earliest_time;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_msg = -1;
-static gint ett_zbee_zcl_msg_message_control = -1;
-static gint ett_zbee_zcl_msg_ext_message_control = -1;
+static int ett_zbee_zcl_msg;
+static int ett_zbee_zcl_msg_message_control;
+static int ett_zbee_zcl_msg_ext_message_control;
-static expert_field ei_zbee_zcl_msg_msg_ctrl_deprecated = EI_INIT;
+static expert_field ei_zbee_zcl_msg_msg_ctrl_deprecated;
/* Message Control Transmission */
static const value_string zbee_zcl_msg_ctrl_tx_names[] = {
@@ -8058,9 +7934,9 @@ dissect_zbee_zcl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -8153,9 +8029,9 @@ dissect_zbee_zcl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_msg_display(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_msg_display(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint msg_len;
+ unsigned msg_len;
static int * const message_ctrl_flags[] = {
&hf_zbee_zcl_msg_ctrl_tx,
@@ -8207,16 +8083,16 @@ dissect_zcl_msg_display(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_msg_cancel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint *offset)
+dissect_zcl_msg_cancel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset)
{
- gint8 msg_ctrl;
+ int8_t msg_ctrl;
/* Message ID */
proto_tree_add_item(tree, hf_zbee_zcl_msg_message_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Message Control */
- msg_ctrl = tvb_get_guint8(tvb, *offset);
+ msg_ctrl = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_msg_ctrl, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -8234,14 +8110,10 @@ dissect_zcl_msg_cancel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_msg_cancel_all(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_msg_cancel_all(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t impl_time;
-
/* Implementation Date/Time */
- impl_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- impl_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_msg_implementation_time, tvb, *offset, 4, &impl_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_msg_implementation_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
} /* dissect_zcl_msg_cancel_all */
@@ -8254,14 +8126,10 @@ dissect_zcl_msg_cancel_all(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_msg_get_cancel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_msg_get_cancel(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t impl_time;
-
/* Earliest Implementation Time */
- impl_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- impl_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_msg_earliest_time, tvb, *offset, 4, &impl_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_msg_earliest_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
} /* dissect_zcl_msg_get_cancel */
@@ -8274,19 +8142,16 @@ dissect_zcl_msg_get_cancel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_msg_confirm(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_msg_confirm(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint msg_len;
- nstime_t confirm_time;
+ unsigned msg_len;
/* Message ID */
proto_tree_add_item(tree, hf_zbee_zcl_msg_message_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Confirmation Time */
- confirm_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- confirm_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_msg_confirm_time, tvb, *offset, 4, &confirm_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_msg_confirm_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* (Optional) Confirm Control */
@@ -8305,7 +8170,7 @@ dissect_zcl_msg_confirm(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*
*/
static void
-decode_zcl_msg_duration(gchar *s, guint16 value)
+decode_zcl_msg_duration(char *s, uint16_t value)
{
if (value == 0xffff)
snprintf(s, ITEM_LABEL_LENGTH, "Until changed");
@@ -8315,25 +8180,22 @@ decode_zcl_msg_duration(gchar *s, guint16 value)
} /*decode_zcl_msg_duration*/
/**
- * This function decodes start time, with a special case for
- * ZBEE_ZCL_MSG_START_TIME_NOW.
+ * This function decodes UTC time, with a special case for
+ * ZBEE_ZCL_MSG_START_TIME_NOW which has special meaning when
+ * used in a Smart Energy context
*
* @param s string to display
* @param value value to decode
*/
static void
-decode_zcl_msg_start_time(gchar *s, guint32 value)
+decode_zcl_se_utc_time(char *s, uint32_t value)
{
if (value == ZBEE_ZCL_MSG_START_TIME_NOW)
- snprintf(s, ITEM_LABEL_LENGTH, "Now");
+ snprintf(s, ITEM_LABEL_LENGTH, "Now (0)");
else {
- gchar *start_time;
- time_t epoch_time = (time_t)value + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time = abs_time_secs_to_str (NULL, epoch_time, ABSOLUTE_TIME_UTC, TRUE);
- snprintf(s, ITEM_LABEL_LENGTH, "%s", start_time);
- wmem_free(NULL, start_time);
+ decode_zcl_utc_time(s,value);
}
-} /* decode_zcl_msg_start_time */
+} /* decode_zcl_se_utc_time */
/**
*This function registers the ZCL Messaging dissector
@@ -8393,7 +8255,7 @@ proto_register_zbee_zcl_msg(void)
/* End of 'Extended Message Control' fields */
{ &hf_zbee_zcl_msg_start_time,
- { "Start Time", "zbee_zcl_se.msg.message.start_time", FT_UINT32, BASE_CUSTOM, CF_FUNC(decode_zcl_msg_start_time),
+ { "Start Time", "zbee_zcl_se.msg.message.start_time", FT_UINT32, BASE_CUSTOM, CF_FUNC(decode_zcl_utc_time),
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_msg_duration,
@@ -8409,11 +8271,11 @@ proto_register_zbee_zcl_msg(void)
0x0, NULL, HFILL } },
{ &hf_zbee_zcl_msg_confirm_ctrl,
- { "Confirmation Control", "zbee_zcl_se.msg.message.confirm.ctrl", FT_BOOLEAN, 8, TFS(&tfs_no_yes),
+ { "Confirmation Control", "zbee_zcl_se.msg.message.confirm_ctrl", FT_BOOLEAN, 8, TFS(&tfs_no_yes),
ZBEE_ZCL_MSG_CONFIRM_CTRL_MASK, NULL, HFILL } },
{ &hf_zbee_zcl_msg_confirm_response,
- { "Response", "zbee_zcl_se.msg.message", FT_UINT_STRING, BASE_NONE, NULL,
+ { "Response", "zbee_zcl_se.msg.message.confirm_response", FT_UINT_STRING, BASE_NONE, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_msg_implementation_time,
@@ -8427,7 +8289,7 @@ proto_register_zbee_zcl_msg(void)
};
/* ZCL Messaging subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_msg,
&ett_zbee_zcl_msg_message_control,
&ett_zbee_zcl_msg_ext_message_control,
@@ -8516,7 +8378,7 @@ void proto_register_zbee_zcl_tun(void);
void proto_reg_handoff_zbee_zcl_tun(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_tun_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_tun_attr_data (proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/* Private functions prototype */
@@ -8525,29 +8387,29 @@ static void dissect_zcl_tun_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_tun = -1;
-
-static int hf_zbee_zcl_tun_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_tun_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_tun_attr_id = -1;
-static int hf_zbee_zcl_tun_attr_reporting_status = -1;
-static int hf_zbee_zcl_tun_attr_close_timeout = -1;
-static int hf_zbee_zcl_tun_protocol_id = -1;
-static int hf_zbee_zcl_tun_manufacturer_code = -1;
-static int hf_zbee_zcl_tun_flow_control_support = -1;
-static int hf_zbee_zcl_tun_max_in_size = -1;
-static int hf_zbee_zcl_tun_tunnel_id = -1;
-static int hf_zbee_zcl_tun_num_octets_left = -1;
-static int hf_zbee_zcl_tun_protocol_offset = -1;
-static int hf_zbee_zcl_tun_protocol_list_complete = -1;
-static int hf_zbee_zcl_tun_protocol_count = -1;
-static int hf_zbee_zcl_tun_transfer_status = -1;
-static int hf_zbee_zcl_tun_transfer_data_status = -1;
+static int proto_zbee_zcl_tun;
+
+static int hf_zbee_zcl_tun_srv_tx_cmd_id;
+static int hf_zbee_zcl_tun_srv_rx_cmd_id;
+static int hf_zbee_zcl_tun_attr_id;
+static int hf_zbee_zcl_tun_attr_reporting_status;
+static int hf_zbee_zcl_tun_attr_close_timeout;
+static int hf_zbee_zcl_tun_protocol_id;
+static int hf_zbee_zcl_tun_manufacturer_code;
+static int hf_zbee_zcl_tun_flow_control_support;
+static int hf_zbee_zcl_tun_max_in_size;
+static int hf_zbee_zcl_tun_tunnel_id;
+static int hf_zbee_zcl_tun_num_octets_left;
+static int hf_zbee_zcl_tun_protocol_offset;
+static int hf_zbee_zcl_tun_protocol_list_complete;
+static int hf_zbee_zcl_tun_protocol_count;
+static int hf_zbee_zcl_tun_transfer_status;
+static int hf_zbee_zcl_tun_transfer_data_status;
static heur_dissector_list_t zbee_zcl_tun_heur_subdissector_list;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_tun = -1;
+static int ett_zbee_zcl_tun;
#define zbee_zcl_tun_protocol_names_VALUE_STRING_LIST(XXX) \
XXX(ZBEE_ZCL_TUN_PROTO_DLMS, 0x00, "DLMS/COSEM (IEC 62056)" ) \
@@ -8600,7 +8462,7 @@ VALUE_STRING_ARRAY(zbee_zcl_tun_status_names);
*@param client_attr ZCL client
*/
static void
-dissect_zcl_tun_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_tun_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
switch (attr_id) {
/* cluster specific attributes */
@@ -8629,7 +8491,7 @@ dissect_zcl_tun_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint1
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_request_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_request_tunnel(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_tun_protocol_id, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -8652,7 +8514,7 @@ dissect_zcl_tun_request_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_close_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_close_tunnel(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_tun_tunnel_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -8667,9 +8529,9 @@ dissect_zcl_tun_close_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_transfer_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint *offset)
+dissect_zcl_tun_transfer_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned *offset)
{
- gint length;
+ int length;
heur_dtbl_entry_t *hdtbl_entry;
tvbuff_t *data_tvb;
proto_tree *root_tree = proto_tree_get_root(tree);
@@ -8696,7 +8558,7 @@ dissect_zcl_tun_transfer_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_transfer_data_error(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_transfer_data_error(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_tun_tunnel_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -8713,7 +8575,7 @@ dissect_zcl_tun_transfer_data_error(tvbuff_t *tvb, proto_tree *tree, guint *offs
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_ack_transfer_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_ack_transfer_data(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_tun_tunnel_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -8730,7 +8592,7 @@ dissect_zcl_tun_ack_transfer_data(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_ready_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_ready_data(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_tun_tunnel_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -8747,7 +8609,7 @@ dissect_zcl_tun_ready_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_get_supported(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_get_supported(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_tun_protocol_offset, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -8761,7 +8623,7 @@ dissect_zcl_tun_get_supported(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_request_tunnel_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_request_tunnel_rsp(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_tun_tunnel_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -8781,9 +8643,9 @@ dissect_zcl_tun_request_tunnel_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offse
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_get_supported_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_get_supported_rsp(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint16 mfg_code;
+ uint16_t mfg_code;
proto_tree_add_item(tree, hf_zbee_zcl_tun_protocol_list_complete, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -8814,7 +8676,7 @@ dissect_zcl_tun_get_supported_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_tun_closure_notify(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_tun_closure_notify(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_tun_tunnel_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -8832,9 +8694,9 @@ dissect_zbee_zcl_tun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -8985,7 +8847,7 @@ proto_register_zbee_zcl_tun(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_tun_flow_control_support,
- { "Flow Control Supported", "zbee_zcl_se.tun.flow_control_supported", FT_BOOLEAN, 8, NULL,
+ { "Flow Control Supported", "zbee_zcl_se.tun.flow_control_supported", FT_BOOLEAN, BASE_NONE, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_tun_max_in_size,
@@ -9017,13 +8879,13 @@ proto_register_zbee_zcl_tun(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_tun_protocol_list_complete,
- { "List Complete", "zbee_zcl_se.tun.protocol_list_complete", FT_BOOLEAN, 8, NULL,
+ { "List Complete", "zbee_zcl_se.tun.protocol_list_complete", FT_BOOLEAN, BASE_NONE, NULL,
0x00, NULL, HFILL } },
};
/* ZCL Tunneling subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_tun,
};
@@ -9033,7 +8895,7 @@ proto_register_zbee_zcl_tun(void)
proto_register_subtree_array(ett, array_length(ett));
/* Make heuristic dissectors possible */
- zbee_zcl_tun_heur_subdissector_list = register_heur_dissector_list(ZBEE_PROTOABBREV_ZCL_TUN, proto_zbee_zcl_tun);
+ zbee_zcl_tun_heur_subdissector_list = register_heur_dissector_list_with_description(ZBEE_PROTOABBREV_ZCL_TUN, "ZigBee Transfer Data", proto_zbee_zcl_tun);
/* Register the ZigBee ZCL Tunneling dissector. */
register_dissector(ZBEE_PROTOABBREV_ZCL_TUN, dissect_zbee_zcl_tun, proto_zbee_zcl_tun);
@@ -9246,134 +9108,134 @@ void proto_register_zbee_zcl_pp(void);
void proto_reg_handoff_zbee_zcl_pp(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_pp_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_pp_attr_data (proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/* Command Dissector Helpers */
-static void dissect_zcl_pp_select_available_emergency_credit (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_change_debt (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_emergency_credit_setup (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_consumer_top_up (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_credit_adjustment (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_change_payment_mode (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_get_prepay_snapshot (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_get_top_up_log (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_set_low_credit_warning_level (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_get_debt_repayment_log (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_set_maximum_credit_limit (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_set_overall_debt_cap (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_publish_prepay_snapshot (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_change_payment_mode_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_consumer_top_up_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_publish_top_up_log (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_pp_publish_debt_log (tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_pp_select_available_emergency_credit (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_change_debt (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_emergency_credit_setup (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_consumer_top_up (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_credit_adjustment (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_change_payment_mode (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_get_prepay_snapshot (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_get_top_up_log (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_set_low_credit_warning_level (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_get_debt_repayment_log (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_set_maximum_credit_limit (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_set_overall_debt_cap (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_publish_prepay_snapshot (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_change_payment_mode_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_consumer_top_up_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_publish_top_up_log (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_pp_publish_debt_log (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_pp = -1;
-
-static int hf_zbee_zcl_pp_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_pp_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_pp_attr_id = -1;
-static int hf_zbee_zcl_pp_attr_reporting_status = -1;
-static int hf_zbee_zcl_pp_select_available_emc_cmd_issue_date_time = -1;
-static int hf_zbee_zcl_pp_select_available_emc_originating_device = -1;
-static int hf_zbee_zcl_pp_change_debt_issuer_event_id = -1;
-static int hf_zbee_zcl_pp_change_debt_label = -1;
-static int hf_zbee_zcl_pp_change_debt_amount = -1;
-static int hf_zbee_zcl_pp_change_debt_recovery_method = -1;
-static int hf_zbee_zcl_pp_change_debt_amount_type = -1;
-static int hf_zbee_zcl_pp_change_debt_recovery_start_time = -1;
-static int hf_zbee_zcl_pp_change_debt_recovery_collection_time = -1;
-static int hf_zbee_zcl_pp_change_debt_recovery_frequency = -1;
-static int hf_zbee_zcl_pp_change_debt_recovery_amount = -1;
-static int hf_zbee_zcl_pp_change_debt_recovery_balance_percentage = -1;
-static int hf_zbee_zcl_pp_emergency_credit_setup_issuer_event_id = -1;
-static int hf_zbee_zcl_pp_emergency_credit_setup_start_time = -1;
-static int hf_zbee_zcl_pp_emergency_credit_setup_emergency_credit_limit = -1;
-static int hf_zbee_zcl_pp_emergency_credit_setup_emergency_credit_threshold = -1;
-static int hf_zbee_zcl_pp_consumer_top_up_originating_device = -1;
-static int hf_zbee_zcl_pp_consumer_top_up_top_up_code = -1;
-static int hf_zbee_zcl_pp_credit_adjustment_issuer_event_id = -1;
-static int hf_zbee_zcl_pp_credit_adjustment_start_time = -1;
-static int hf_zbee_zcl_pp_credit_adjustment_credit_adjustment_type = -1;
-static int hf_zbee_zcl_pp_credit_adjustment_credit_adjustment_value = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_provider_id = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_issuer_event_id = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_implementation_date_time = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_proposed_payment_control_configuration = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_cut_off_value = -1;
-static int hf_zbee_zcl_pp_get_prepay_snapshot_earliest_start_time = -1;
-static int hf_zbee_zcl_pp_get_prepay_snapshot_latest_end_time = -1;
-static int hf_zbee_zcl_pp_get_prepay_snapshot_snapshot_offset = -1;
-static int hf_zbee_zcl_pp_get_prepay_snapshot_snapshot_cause = -1;
-static int hf_zbee_zcl_pp_get_top_up_log_latest_end_time = -1;
-static int hf_zbee_zcl_pp_get_top_up_log_number_of_records = -1;
-static int hf_zbee_zcl_pp_set_low_credit_warning_level_low_credit_warning_level = -1;
-static int hf_zbee_zcl_pp_get_debt_repayment_log_latest_end_time = -1;
-static int hf_zbee_zcl_pp_get_debt_repayment_log_number_of_debts = -1;
-static int hf_zbee_zcl_pp_get_debt_repayment_log_debt_type = -1;
-static int hf_zbee_zcl_pp_set_maximum_credit_limit_provider_id = -1;
-static int hf_zbee_zcl_pp_set_maximum_credit_limit_issuer_event_id = -1;
-static int hf_zbee_zcl_pp_set_maximum_credit_limit_implementation_date_time = -1;
-static int hf_zbee_zcl_pp_set_maximum_credit_limit_maximum_credit_level = -1;
-static int hf_zbee_zcl_pp_set_maximum_credit_limit_maximum_credit_per_top_up = -1;
-static int hf_zbee_zcl_pp_set_overall_debt_cap_limit_provider_id = -1;
-static int hf_zbee_zcl_pp_set_overall_debt_cap_limit_issuer_event_id = -1;
-static int hf_zbee_zcl_pp_set_overall_debt_cap_limit_implementation_date_time = -1;
-static int hf_zbee_zcl_pp_set_overall_debt_cap_limit_overall_debt_cap = -1;
-static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_id = -1;
-static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_time = -1;
-static int hf_zbee_zcl_pp_publish_prepay_snapshot_total_snapshots_found = -1;
-static int hf_zbee_zcl_pp_publish_prepay_snapshot_command_index = -1;
-static int hf_zbee_zcl_pp_publish_prepay_snapshot_total_number_of_commands = -1;
-static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_cause = -1;
-static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_payload_type = -1;
-static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_payload = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_response_friendly_credit = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_response_friendly_credit_calendar_id = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_response_emergency_credit_limit = -1;
-static int hf_zbee_zcl_pp_change_payment_mode_response_emergency_credit_threshold = -1;
-static int hf_zbee_zcl_pp_consumer_top_up_response_result_type = -1;
-static int hf_zbee_zcl_pp_consumer_top_up_response_top_up_value = -1;
-static int hf_zbee_zcl_pp_consumer_top_up_response_source_of_top_up = -1;
-static int hf_zbee_zcl_pp_consumer_top_up_response_credit_remaining = -1;
-static int hf_zbee_zcl_pp_publish_top_up_log_command_index = -1;
-static int hf_zbee_zcl_pp_publish_top_up_log_total_number_of_commands = -1;
-static int hf_zbee_zcl_pp_publish_top_up_log_top_up_code = -1;
-static int hf_zbee_zcl_pp_publish_top_up_log_top_up_amount = -1;
-static int hf_zbee_zcl_pp_publish_top_up_log_top_up_time = -1;
-static int hf_zbee_zcl_pp_publish_debt_log_command_index = -1;
-static int hf_zbee_zcl_pp_publish_debt_log_total_number_of_commands = -1;
-static int hf_zbee_zcl_pp_publish_debt_log_collection_time = -1;
-static int hf_zbee_zcl_pp_publish_debt_log_amount_collected = -1;
-static int hf_zbee_zcl_pp_publish_debt_log_debt_type = -1;
-static int hf_zbee_zcl_pp_publish_debt_log_outstanding_debt = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_disconnection_enabled = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_prepayment_enabled = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_credit_management_enabled = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_credit_display_enabled = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_account_base = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_contactor_fitted = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_standing_charge_configuration = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_emergency_standing_charge_configuration = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_debt_configuration = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_emergency_debt_configuration = -1;
-static int hf_zbee_zcl_pp_payment_control_configuration_reserved = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_general = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_end_of_billing_period = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_tariff_information = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_price_matrix = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_manually_triggered_from_client = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_tenancy = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_supplier = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_meter_mode = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_top_up_addition = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_debt_credit_addition = -1;
-static int hf_zbee_zcl_pp_snapshot_payload_cause_reserved = -1;
+static int proto_zbee_zcl_pp;
+
+static int hf_zbee_zcl_pp_srv_tx_cmd_id;
+static int hf_zbee_zcl_pp_srv_rx_cmd_id;
+static int hf_zbee_zcl_pp_attr_id;
+static int hf_zbee_zcl_pp_attr_reporting_status;
+static int hf_zbee_zcl_pp_select_available_emc_cmd_issue_date_time;
+static int hf_zbee_zcl_pp_select_available_emc_originating_device;
+static int hf_zbee_zcl_pp_change_debt_issuer_event_id;
+static int hf_zbee_zcl_pp_change_debt_label;
+static int hf_zbee_zcl_pp_change_debt_amount;
+static int hf_zbee_zcl_pp_change_debt_recovery_method;
+static int hf_zbee_zcl_pp_change_debt_amount_type;
+static int hf_zbee_zcl_pp_change_debt_recovery_start_time;
+static int hf_zbee_zcl_pp_change_debt_recovery_collection_time;
+static int hf_zbee_zcl_pp_change_debt_recovery_frequency;
+static int hf_zbee_zcl_pp_change_debt_recovery_amount;
+static int hf_zbee_zcl_pp_change_debt_recovery_balance_percentage;
+static int hf_zbee_zcl_pp_emergency_credit_setup_issuer_event_id;
+static int hf_zbee_zcl_pp_emergency_credit_setup_start_time;
+static int hf_zbee_zcl_pp_emergency_credit_setup_emergency_credit_limit;
+static int hf_zbee_zcl_pp_emergency_credit_setup_emergency_credit_threshold;
+static int hf_zbee_zcl_pp_consumer_top_up_originating_device;
+static int hf_zbee_zcl_pp_consumer_top_up_top_up_code;
+static int hf_zbee_zcl_pp_credit_adjustment_issuer_event_id;
+static int hf_zbee_zcl_pp_credit_adjustment_start_time;
+static int hf_zbee_zcl_pp_credit_adjustment_credit_adjustment_type;
+static int hf_zbee_zcl_pp_credit_adjustment_credit_adjustment_value;
+static int hf_zbee_zcl_pp_change_payment_mode_provider_id;
+static int hf_zbee_zcl_pp_change_payment_mode_issuer_event_id;
+static int hf_zbee_zcl_pp_change_payment_mode_implementation_date_time;
+static int hf_zbee_zcl_pp_change_payment_mode_proposed_payment_control_configuration;
+static int hf_zbee_zcl_pp_change_payment_mode_cut_off_value;
+static int hf_zbee_zcl_pp_get_prepay_snapshot_earliest_start_time;
+static int hf_zbee_zcl_pp_get_prepay_snapshot_latest_end_time;
+static int hf_zbee_zcl_pp_get_prepay_snapshot_snapshot_offset;
+static int hf_zbee_zcl_pp_get_prepay_snapshot_snapshot_cause;
+static int hf_zbee_zcl_pp_get_top_up_log_latest_end_time;
+static int hf_zbee_zcl_pp_get_top_up_log_number_of_records;
+static int hf_zbee_zcl_pp_set_low_credit_warning_level_low_credit_warning_level;
+static int hf_zbee_zcl_pp_get_debt_repayment_log_latest_end_time;
+static int hf_zbee_zcl_pp_get_debt_repayment_log_number_of_debts;
+static int hf_zbee_zcl_pp_get_debt_repayment_log_debt_type;
+static int hf_zbee_zcl_pp_set_maximum_credit_limit_provider_id;
+static int hf_zbee_zcl_pp_set_maximum_credit_limit_issuer_event_id;
+static int hf_zbee_zcl_pp_set_maximum_credit_limit_implementation_date_time;
+static int hf_zbee_zcl_pp_set_maximum_credit_limit_maximum_credit_level;
+static int hf_zbee_zcl_pp_set_maximum_credit_limit_maximum_credit_per_top_up;
+static int hf_zbee_zcl_pp_set_overall_debt_cap_limit_provider_id;
+static int hf_zbee_zcl_pp_set_overall_debt_cap_limit_issuer_event_id;
+static int hf_zbee_zcl_pp_set_overall_debt_cap_limit_implementation_date_time;
+static int hf_zbee_zcl_pp_set_overall_debt_cap_limit_overall_debt_cap;
+static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_id;
+static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_time;
+static int hf_zbee_zcl_pp_publish_prepay_snapshot_total_snapshots_found;
+static int hf_zbee_zcl_pp_publish_prepay_snapshot_command_index;
+static int hf_zbee_zcl_pp_publish_prepay_snapshot_total_number_of_commands;
+static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_cause;
+static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_payload_type;
+static int hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_payload;
+static int hf_zbee_zcl_pp_change_payment_mode_response_friendly_credit;
+static int hf_zbee_zcl_pp_change_payment_mode_response_friendly_credit_calendar_id;
+static int hf_zbee_zcl_pp_change_payment_mode_response_emergency_credit_limit;
+static int hf_zbee_zcl_pp_change_payment_mode_response_emergency_credit_threshold;
+static int hf_zbee_zcl_pp_consumer_top_up_response_result_type;
+static int hf_zbee_zcl_pp_consumer_top_up_response_top_up_value;
+static int hf_zbee_zcl_pp_consumer_top_up_response_source_of_top_up;
+static int hf_zbee_zcl_pp_consumer_top_up_response_credit_remaining;
+static int hf_zbee_zcl_pp_publish_top_up_log_command_index;
+static int hf_zbee_zcl_pp_publish_top_up_log_total_number_of_commands;
+static int hf_zbee_zcl_pp_publish_top_up_log_top_up_code;
+static int hf_zbee_zcl_pp_publish_top_up_log_top_up_amount;
+static int hf_zbee_zcl_pp_publish_top_up_log_top_up_time;
+static int hf_zbee_zcl_pp_publish_debt_log_command_index;
+static int hf_zbee_zcl_pp_publish_debt_log_total_number_of_commands;
+static int hf_zbee_zcl_pp_publish_debt_log_collection_time;
+static int hf_zbee_zcl_pp_publish_debt_log_amount_collected;
+static int hf_zbee_zcl_pp_publish_debt_log_debt_type;
+static int hf_zbee_zcl_pp_publish_debt_log_outstanding_debt;
+static int hf_zbee_zcl_pp_payment_control_configuration;
+static int hf_zbee_zcl_pp_payment_control_configuration_disconnection_enabled;
+static int hf_zbee_zcl_pp_payment_control_configuration_prepayment_enabled;
+static int hf_zbee_zcl_pp_payment_control_configuration_credit_management_enabled;
+static int hf_zbee_zcl_pp_payment_control_configuration_credit_display_enabled;
+static int hf_zbee_zcl_pp_payment_control_configuration_account_base;
+static int hf_zbee_zcl_pp_payment_control_configuration_contactor_fitted;
+static int hf_zbee_zcl_pp_payment_control_configuration_standing_charge_configuration;
+static int hf_zbee_zcl_pp_payment_control_configuration_emergency_standing_charge_configuration;
+static int hf_zbee_zcl_pp_payment_control_configuration_debt_configuration;
+static int hf_zbee_zcl_pp_payment_control_configuration_emergency_debt_configuration;
+static int hf_zbee_zcl_pp_payment_control_configuration_reserved;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_general;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_end_of_billing_period;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_tariff_information;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_price_matrix;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_manually_triggered_from_client;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_tenancy;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_supplier;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_change_of_meter_mode;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_top_up_addition;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_debt_credit_addition;
+static int hf_zbee_zcl_pp_snapshot_payload_cause_reserved;
static int* const zbee_zcl_pp_payment_control_configuration_flags[] = {
&hf_zbee_zcl_pp_payment_control_configuration_disconnection_enabled,
@@ -9413,11 +9275,11 @@ static int* const zbee_zcl_pp_snapshot_payload_cause_flags[] = {
ZBEE_ZCL_SE_PP_NUM_PUBLISH_TOP_UP_LOG_ETT + \
ZBEE_ZCL_SE_PP_NUM_PUBLISH_DEBT_LOG_ETT)
-static gint ett_zbee_zcl_pp = -1;
-static gint ett_zbee_zcl_pp_payment_control_configuration = -1;
-static gint ett_zbee_zcl_pp_snapshot_payload_cause = -1;
-static gint ett_zbee_zcl_pp_publish_top_up_entry[ZBEE_ZCL_SE_PP_NUM_PUBLISH_TOP_UP_LOG_ETT];
-static gint ett_zbee_zcl_pp_publish_debt_log_entry[ZBEE_ZCL_SE_PP_NUM_PUBLISH_DEBT_LOG_ETT];
+static int ett_zbee_zcl_pp;
+static int ett_zbee_zcl_pp_payment_control_configuration;
+static int ett_zbee_zcl_pp_snapshot_payload_cause;
+static int ett_zbee_zcl_pp_publish_top_up_entry[ZBEE_ZCL_SE_PP_NUM_PUBLISH_TOP_UP_LOG_ETT];
+static int ett_zbee_zcl_pp_publish_debt_log_entry[ZBEE_ZCL_SE_PP_NUM_PUBLISH_DEBT_LOG_ETT];
/*************************/
/* Function Bodies */
@@ -9434,7 +9296,7 @@ static gint ett_zbee_zcl_pp_publish_debt_log_entry[ZBEE_ZCL_SE_PP_NUM_PUBLISH_DE
*@param client_attr ZCL client
*/
static void
-dissect_zcl_pp_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_pp_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
switch (attr_id) {
/* applies to all SE clusters */
@@ -9466,9 +9328,9 @@ dissect_zbee_zcl_pp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -9601,14 +9463,10 @@ dissect_zbee_zcl_pp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_select_available_emergency_credit(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_select_available_emergency_credit(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Command Issue Date/Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_select_available_emc_cmd_issue_date_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_select_available_emc_cmd_issue_date_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Originating Device */
@@ -9624,17 +9482,16 @@ dissect_zcl_pp_select_available_emergency_credit(tvbuff_t *tvb, proto_tree *tree
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_change_debt(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_change_debt(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 label_length;
- nstime_t start_time;
+ uint8_t label_length;
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_pp_change_debt_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Debt Label */
- label_length = tvb_get_guint8(tvb, *offset) + 1;
+ label_length = tvb_get_uint8(tvb, *offset) + 1;
proto_tree_add_item(tree, hf_zbee_zcl_pp_change_debt_label, tvb, *offset, label_length, ENC_NA);
*offset += label_length;
@@ -9651,9 +9508,7 @@ dissect_zcl_pp_change_debt(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 1;
/* Debt Recovery Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_change_debt_recovery_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_change_debt_recovery_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Debt Recovery Collection Time */
@@ -9681,18 +9536,14 @@ dissect_zcl_pp_change_debt(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_emergency_credit_setup(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_emergency_credit_setup(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_pp_emergency_credit_setup_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_emergency_credit_setup_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_emergency_credit_setup_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Emergency Credit Limit */
@@ -9712,7 +9563,7 @@ dissect_zcl_pp_emergency_credit_setup(tvbuff_t *tvb, proto_tree *tree, guint *of
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_consumer_top_up(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_consumer_top_up(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
int length;
@@ -9733,18 +9584,14 @@ dissect_zcl_pp_consumer_top_up(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_credit_adjustment(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_credit_adjustment(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_pp_credit_adjustment_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_credit_adjustment_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_credit_adjustment_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Credit Adjustment Type */
@@ -9764,10 +9611,8 @@ dissect_zcl_pp_credit_adjustment(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_change_payment_mode(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_change_payment_mode(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_pp_change_payment_mode_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -9777,9 +9622,7 @@ dissect_zcl_pp_change_payment_mode(tvbuff_t *tvb, proto_tree *tree, guint *offse
*offset += 4;
/* Implementation Date/Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_change_payment_mode_implementation_date_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_change_payment_mode_implementation_date_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Proposed Payment Control Configuration */
@@ -9800,21 +9643,14 @@ dissect_zcl_pp_change_payment_mode(tvbuff_t *tvb, proto_tree *tree, guint *offse
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_get_prepay_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_get_prepay_snapshot(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
- nstime_t end_time;
-
/* Earliest Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_get_prepay_snapshot_earliest_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_get_prepay_snapshot_earliest_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Latest End Time */
- end_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- end_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_get_prepay_snapshot_latest_end_time, tvb, *offset, 4, &end_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_get_prepay_snapshot_latest_end_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Snapshot Offset */
@@ -9835,14 +9671,10 @@ dissect_zcl_pp_get_prepay_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offse
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_get_top_up_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_get_top_up_log(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t end_time;
-
/* Latest End Time */
- end_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- end_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_get_top_up_log_latest_end_time, tvb, *offset, 4, &end_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_get_top_up_log_latest_end_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Records */
@@ -9858,7 +9690,7 @@ dissect_zcl_pp_get_top_up_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_set_low_credit_warning_level(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_set_low_credit_warning_level(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Low Credit Warning Level */
proto_tree_add_item(tree, hf_zbee_zcl_pp_set_low_credit_warning_level_low_credit_warning_level, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -9873,14 +9705,10 @@ dissect_zcl_pp_set_low_credit_warning_level(tvbuff_t *tvb, proto_tree *tree, gui
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_get_debt_repayment_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_get_debt_repayment_log(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t end_time;
-
/* Latest End Time */
- end_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- end_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_get_debt_repayment_log_latest_end_time, tvb, *offset, 4, &end_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_get_debt_repayment_log_latest_end_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Records */
@@ -9900,10 +9728,8 @@ dissect_zcl_pp_get_debt_repayment_log(tvbuff_t *tvb, proto_tree *tree, guint *of
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_set_maximum_credit_limit(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_set_maximum_credit_limit(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_pp_set_maximum_credit_limit_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -9913,9 +9739,7 @@ dissect_zcl_pp_set_maximum_credit_limit(tvbuff_t *tvb, proto_tree *tree, guint *
*offset += 4;
/* Implementation Date/Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_set_maximum_credit_limit_implementation_date_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_set_maximum_credit_limit_implementation_date_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Maximum Credit Level */
@@ -9935,10 +9759,8 @@ dissect_zcl_pp_set_maximum_credit_limit(tvbuff_t *tvb, proto_tree *tree, guint *
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_set_overall_debt_cap(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_set_overall_debt_cap(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_pp_set_overall_debt_cap_limit_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -9948,9 +9770,7 @@ dissect_zcl_pp_set_overall_debt_cap(tvbuff_t *tvb, proto_tree *tree, guint *offs
*offset += 4;
/* Implementation Date/Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_set_overall_debt_cap_limit_implementation_date_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_set_overall_debt_cap_limit_implementation_date_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Overall Debt Cap */
@@ -9966,19 +9786,16 @@ dissect_zcl_pp_set_overall_debt_cap(tvbuff_t *tvb, proto_tree *tree, guint *offs
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_publish_prepay_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_publish_prepay_snapshot(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t snapshot_time;
- gint rem_len;
+ int rem_len;
/* Snapshot ID */
proto_tree_add_item(tree, hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Snapshot Time */
- snapshot_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- snapshot_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_time, tvb, *offset, 4, &snapshot_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_pp_publish_prepay_snapshot_snapshot_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Total Snapshots Found */
@@ -10016,7 +9833,7 @@ dissect_zcl_pp_publish_prepay_snapshot(tvbuff_t *tvb, proto_tree *tree, guint *o
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_change_payment_mode_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_change_payment_mode_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Friendly Credit */
proto_tree_add_item(tree, hf_zbee_zcl_pp_change_payment_mode_response_friendly_credit, tvb, *offset, 1, ENC_NA);
@@ -10043,7 +9860,7 @@ dissect_zcl_pp_change_payment_mode_response(tvbuff_t *tvb, proto_tree *tree, gui
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_consumer_top_up_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_consumer_top_up_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Result Type */
proto_tree_add_item(tree, hf_zbee_zcl_pp_consumer_top_up_response_result_type, tvb, *offset, 1, ENC_NA);
@@ -10070,11 +9887,10 @@ dissect_zcl_pp_consumer_top_up_response(tvbuff_t *tvb, proto_tree *tree, guint *
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_publish_top_up_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_publish_top_up_log(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint i = 0;
- gint length;
- nstime_t top_up_time;
+ unsigned i = 0;
+ int length;
proto_tree *sub_tree;
/* Command Index */
@@ -10100,9 +9916,7 @@ dissect_zcl_pp_publish_top_up_log(tvbuff_t *tvb, proto_tree *tree, guint *offset
*offset += 4;
/* Top Up Time */
- top_up_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- top_up_time.nsecs = 0;
- proto_tree_add_time(sub_tree, hf_zbee_zcl_pp_publish_top_up_log_top_up_time, tvb, *offset, 4, &top_up_time);
+ proto_tree_add_item(sub_tree, hf_zbee_zcl_pp_publish_top_up_log_top_up_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Set length of subtree */
@@ -10118,10 +9932,9 @@ dissect_zcl_pp_publish_top_up_log(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_pp_publish_debt_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_pp_publish_debt_log(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint i = 0;
- nstime_t collection_time;
+ unsigned i = 0;
proto_tree *sub_tree;
/* Command Index */
@@ -10139,9 +9952,7 @@ dissect_zcl_pp_publish_debt_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
i++;
/* Collection Time */
- collection_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- collection_time.nsecs = 0;
- proto_tree_add_time(sub_tree, hf_zbee_zcl_pp_publish_debt_log_collection_time, tvb, *offset, 4, &collection_time);
+ proto_tree_add_item(sub_tree, hf_zbee_zcl_pp_publish_debt_log_collection_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Amount Collected */
@@ -10548,22 +10359,20 @@ proto_register_zbee_zcl_pp(void)
};
/* ZCL Prepayment subtrees */
- gint *ett[ZBEE_ZCL_SE_PP_NUM_TOTAL_ETT];
+ int *ett[ZBEE_ZCL_SE_PP_NUM_TOTAL_ETT];
ett[0] = &ett_zbee_zcl_pp;
ett[1] = &ett_zbee_zcl_pp_payment_control_configuration;
ett[2] = &ett_zbee_zcl_pp_snapshot_payload_cause;
- guint j = ZBEE_ZCL_SE_PP_NUM_INDIVIDUAL_ETT;
+ unsigned j = ZBEE_ZCL_SE_PP_NUM_INDIVIDUAL_ETT;
/* Initialize Publish Top Up Log subtrees */
- for (guint i = 0; i < ZBEE_ZCL_SE_PP_NUM_PUBLISH_TOP_UP_LOG_ETT; i++, j++) {
- ett_zbee_zcl_pp_publish_top_up_entry[i] = -1;
+ for (unsigned i = 0; i < ZBEE_ZCL_SE_PP_NUM_PUBLISH_TOP_UP_LOG_ETT; i++, j++) {
ett[j] = &ett_zbee_zcl_pp_publish_top_up_entry[i];
}
/* Initialize Publish Debt Log subtrees */
- for (guint i = 0; i < ZBEE_ZCL_SE_PP_NUM_PUBLISH_DEBT_LOG_ETT; i++, j++ ) {
- ett_zbee_zcl_pp_publish_debt_log_entry[i] = -1;
+ for (unsigned i = 0; i < ZBEE_ZCL_SE_PP_NUM_PUBLISH_DEBT_LOG_ETT; i++, j++ ) {
ett[j] = &ett_zbee_zcl_pp_publish_debt_log_entry[i];
}
@@ -10636,58 +10445,58 @@ VALUE_STRING_ARRAY(zbee_zcl_energy_management_srv_tx_cmd_names);
void proto_register_zbee_zcl_energy_management(void);
void proto_reg_handoff_zbee_zcl_energy_management(void);
-static void dissect_zbee_zcl_energy_management_manage_event (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zbee_zcl_energy_management_report_event_status (tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zbee_zcl_energy_management_manage_event (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zbee_zcl_energy_management_report_event_status (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/* Attribute Dissector Helpers */
-static void dissect_zcl_energy_management_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_energy_management_attr_data (proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_energy_management = -1;
-
-static int hf_zbee_zcl_energy_management_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_energy_management_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_energy_management_attr_id = -1;
-static int hf_zbee_zcl_energy_management_attr_reporting_status = -1;
-static int hf_zbee_zcl_energy_management_issuer_event_id = -1;
-static int hf_zbee_zcl_energy_management_device_class = -1;
-static int hf_zbee_zcl_energy_management_device_class_hvac_compressor_or_furnace = -1;
-static int hf_zbee_zcl_energy_management_device_class_strip_heaters_baseboard_heaters = -1;
-static int hf_zbee_zcl_energy_management_device_class_water_heater = -1;
-static int hf_zbee_zcl_energy_management_device_class_pool_pump_spa_jacuzzi = -1;
-static int hf_zbee_zcl_energy_management_device_class_smart_appliances = -1;
-static int hf_zbee_zcl_energy_management_device_class_irrigation_pump = -1;
-static int hf_zbee_zcl_energy_management_device_class_managed_c_i_loads= -1;
-static int hf_zbee_zcl_energy_management_device_class_simple_misc_loads = -1;
-static int hf_zbee_zcl_energy_management_device_class_exterior_lighting = -1;
-static int hf_zbee_zcl_energy_management_device_class_interior_lighting = -1;
-static int hf_zbee_zcl_energy_management_device_class_electric_vehicle = -1;
-static int hf_zbee_zcl_energy_management_device_class_generation_systems = -1;
-static int hf_zbee_zcl_energy_management_device_class_reserved = -1;
-static int hf_zbee_zcl_energy_management_utility_enrollment_group = -1;
-static int hf_zbee_zcl_energy_management_action_required = -1;
-static int hf_zbee_zcl_energy_management_action_required_opt_out_of_event = -1;
-static int hf_zbee_zcl_energy_management_action_required_opt_into_event = -1;
-static int hf_zbee_zcl_energy_management_action_required_disable_duty_cycling = -1;
-static int hf_zbee_zcl_energy_management_action_required_enable_duty_cycling = -1;
-static int hf_zbee_zcl_energy_management_action_required_reserved = -1;
-
-static int hf_zbee_zcl_energy_management_report_event_issuer_event_id = -1;
-static int hf_zbee_zcl_energy_management_report_event_event_status = -1;
-static int hf_zbee_zcl_energy_management_report_event_event_status_time = -1;
-static int hf_zbee_zcl_energy_management_report_event_criticality_level_applied = -1;
-static int hf_zbee_zcl_energy_management_report_event_cooling_temp_set_point_applied = -1;
-static int hf_zbee_zcl_energy_management_report_event_heating_temp_set_point_applied = -1;
-static int hf_zbee_zcl_energy_management_report_event_average_load_adjustment_percentage = -1;
-static int hf_zbee_zcl_energy_management_report_event_duty_cycle = -1;
-static int hf_zbee_zcl_energy_management_report_event_event_control = -1;
-static int hf_zbee_zcl_energy_management_report_event_event_control_randomize_start_time = -1;
-static int hf_zbee_zcl_energy_management_report_event_event_control_randomize_duration_time = -1;
-static int hf_zbee_zcl_energy_management_report_event_event_control_reserved = -1;
+static int proto_zbee_zcl_energy_management;
+
+static int hf_zbee_zcl_energy_management_srv_tx_cmd_id;
+static int hf_zbee_zcl_energy_management_srv_rx_cmd_id;
+static int hf_zbee_zcl_energy_management_attr_id;
+static int hf_zbee_zcl_energy_management_attr_reporting_status;
+static int hf_zbee_zcl_energy_management_issuer_event_id;
+static int hf_zbee_zcl_energy_management_device_class;
+static int hf_zbee_zcl_energy_management_device_class_hvac_compressor_or_furnace;
+static int hf_zbee_zcl_energy_management_device_class_strip_heaters_baseboard_heaters;
+static int hf_zbee_zcl_energy_management_device_class_water_heater;
+static int hf_zbee_zcl_energy_management_device_class_pool_pump_spa_jacuzzi;
+static int hf_zbee_zcl_energy_management_device_class_smart_appliances;
+static int hf_zbee_zcl_energy_management_device_class_irrigation_pump;
+static int hf_zbee_zcl_energy_management_device_class_managed_c_i_loads;
+static int hf_zbee_zcl_energy_management_device_class_simple_misc_loads;
+static int hf_zbee_zcl_energy_management_device_class_exterior_lighting;
+static int hf_zbee_zcl_energy_management_device_class_interior_lighting;
+static int hf_zbee_zcl_energy_management_device_class_electric_vehicle;
+static int hf_zbee_zcl_energy_management_device_class_generation_systems;
+static int hf_zbee_zcl_energy_management_device_class_reserved;
+static int hf_zbee_zcl_energy_management_utility_enrollment_group;
+static int hf_zbee_zcl_energy_management_action_required;
+static int hf_zbee_zcl_energy_management_action_required_opt_out_of_event;
+static int hf_zbee_zcl_energy_management_action_required_opt_into_event;
+static int hf_zbee_zcl_energy_management_action_required_disable_duty_cycling;
+static int hf_zbee_zcl_energy_management_action_required_enable_duty_cycling;
+static int hf_zbee_zcl_energy_management_action_required_reserved;
+
+static int hf_zbee_zcl_energy_management_report_event_issuer_event_id;
+static int hf_zbee_zcl_energy_management_report_event_event_status;
+static int hf_zbee_zcl_energy_management_report_event_event_status_time;
+static int hf_zbee_zcl_energy_management_report_event_criticality_level_applied;
+static int hf_zbee_zcl_energy_management_report_event_cooling_temp_set_point_applied;
+static int hf_zbee_zcl_energy_management_report_event_heating_temp_set_point_applied;
+static int hf_zbee_zcl_energy_management_report_event_average_load_adjustment_percentage;
+static int hf_zbee_zcl_energy_management_report_event_duty_cycle;
+static int hf_zbee_zcl_energy_management_report_event_event_control;
+static int hf_zbee_zcl_energy_management_report_event_event_control_randomize_start_time;
+static int hf_zbee_zcl_energy_management_report_event_event_control_randomize_duration_time;
+static int hf_zbee_zcl_energy_management_report_event_event_control_reserved;
static int* const zbee_zcl_energy_management_device_classes[] = {
@@ -10724,10 +10533,10 @@ static int* const hf_zbee_zcl_energy_management_event_control_flags[] = {
};
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_energy_management = -1;
-static gint ett_zbee_zcl_energy_management_device_class = -1;
-static gint ett_zbee_zcl_energy_management_actions_required = -1;
-static gint ett_zbee_zcl_energy_management_report_event_event_control = -1;
+static int ett_zbee_zcl_energy_management;
+static int ett_zbee_zcl_energy_management_device_class;
+static int ett_zbee_zcl_energy_management_actions_required;
+static int ett_zbee_zcl_energy_management_report_event_event_control;
static const range_string zbee_zcl_energy_management_load_control_event_criticality_level[] = {
{ 0x0, 0x0, "Reserved" },
@@ -10760,7 +10569,7 @@ static const range_string zbee_zcl_energy_management_load_control_event_critical
*@param client_attr ZCL client
*/
static void
-dissect_zcl_energy_management_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_energy_management_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
switch (attr_id) {
/* applies to all SE clusters */
@@ -10783,7 +10592,7 @@ dissect_zcl_energy_management_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *
*@param offset pointer to buffer offset
*/
static void
-dissect_zbee_zcl_energy_management_manage_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zbee_zcl_energy_management_manage_event(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_energy_management_issuer_event_id, tvb,
@@ -10814,10 +10623,9 @@ dissect_zbee_zcl_energy_management_manage_event(tvbuff_t *tvb, proto_tree *tree,
*@param offset pointer to buffer offset
*/
static void
-dissect_zbee_zcl_energy_management_report_event_status(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zbee_zcl_energy_management_report_event_status(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Event Control */
- nstime_t event_status_time;
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_energy_management_report_event_issuer_event_id, tvb,
@@ -10829,9 +10637,7 @@ dissect_zbee_zcl_energy_management_report_event_status(tvbuff_t *tvb, proto_tree
*offset += 1;
/* Event Status Time */
- event_status_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- event_status_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_energy_management_report_event_event_status_time, tvb, *offset, 4, &event_status_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_energy_management_report_event_event_status_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Criticality Level Applied */
@@ -10877,9 +10683,9 @@ static int
dissect_zbee_zcl_energy_management(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -11107,7 +10913,7 @@ proto_register_zbee_zcl_energy_management(void)
};
/* ZCL Energy_Management subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_energy_management,
&ett_zbee_zcl_energy_management_device_class,
&ett_zbee_zcl_energy_management_actions_required,
@@ -11196,78 +11002,78 @@ void proto_register_zbee_zcl_calendar(void);
void proto_reg_handoff_zbee_zcl_calendar(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_calendar_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_calendar_attr_data (proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/* Command Dissector Helpers */
-static void dissect_zcl_calendar_get_calendar (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_get_day_profiles(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_get_week_profiles(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_get_seasons(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_get_special_days(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_publish_calendar(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_publish_week_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_publish_seasons(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_publish_special_days(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_calendar_cancel(tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_calendar_get_calendar (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_get_day_profiles(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_get_week_profiles(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_get_seasons(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_get_special_days(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_publish_calendar(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_publish_week_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_publish_seasons(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_publish_special_days(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_calendar_cancel(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_calendar = -1;
-
-static int hf_zbee_zcl_calendar_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_calendar_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_calendar_attr_id = -1;
-static int hf_zbee_zcl_calendar_attr_reporting_status = -1;
-static int hf_zbee_zcl_calendar_type = -1;
-static int hf_zbee_zcl_calendar_start_time = -1;
-static int hf_zbee_zcl_calendar_earliest_start_time = -1;
-static int hf_zbee_zcl_calendar_time_reference = -1;
-static int hf_zbee_zcl_calendar_name = -1;
-static int hf_zbee_zcl_calendar_command_index = -1;
-static int hf_zbee_zcl_calendar_date_year = -1;
-static int hf_zbee_zcl_calendar_date_month = -1;
-static int hf_zbee_zcl_calendar_date_month_day = -1;
-static int hf_zbee_zcl_calendar_date_week_day = -1;
-static int hf_zbee_zcl_calendar_provider_id = -1;
-static int hf_zbee_zcl_calendar_issuer_event_id = -1;
-static int hf_zbee_zcl_calendar_min_issuer_event_id = -1;
-static int hf_zbee_zcl_calendar_issuer_calendar_id = -1;
-static int hf_zbee_zcl_calendar_day_id = -1;
-static int hf_zbee_zcl_calendar_day_id_ref = -1;
-static int hf_zbee_zcl_calendar_day_id_ref_monday = -1;
-static int hf_zbee_zcl_calendar_day_id_ref_tuesday = -1;
-static int hf_zbee_zcl_calendar_day_id_ref_wednesday = -1;
-static int hf_zbee_zcl_calendar_day_id_ref_thursday = -1;
-static int hf_zbee_zcl_calendar_day_id_ref_friday = -1;
-static int hf_zbee_zcl_calendar_day_id_ref_saturday = -1;
-static int hf_zbee_zcl_calendar_day_id_ref_sunday = -1;
-static int hf_zbee_zcl_calendar_week_id = -1;
-static int hf_zbee_zcl_calendar_week_id_ref = -1;
-static int hf_zbee_zcl_calendar_start_day_id = -1;
-static int hf_zbee_zcl_calendar_start_week_id = -1;
-static int hf_zbee_zcl_calendar_number_of_calendars = -1;
-static int hf_zbee_zcl_calendar_number_of_events = -1;
-static int hf_zbee_zcl_calendar_number_of_days = -1;
-static int hf_zbee_zcl_calendar_number_of_weeks = -1;
-static int hf_zbee_zcl_calendar_number_of_seasons = -1;
-static int hf_zbee_zcl_calendar_number_of_day_profiles = -1;
-static int hf_zbee_zcl_calendar_number_of_week_profiles = -1;
-static int hf_zbee_zcl_calendar_total_number_of_schedule_entries = -1;
-static int hf_zbee_zcl_calendar_total_number_of_special_days = -1;
-static int hf_zbee_zcl_calendar_total_number_of_commands = -1;
-static int hf_zbee_zcl_calendar_schedule_entry_start_time = -1;
-static int hf_zbee_zcl_calendar_schedule_entry_price_tier = -1;
-static int hf_zbee_zcl_calendar_schedule_entry_friendly_credit_enable = -1;
-static int hf_zbee_zcl_calendar_schedule_entry_auxiliary_load_switch_state = -1;
+static int proto_zbee_zcl_calendar;
+
+static int hf_zbee_zcl_calendar_srv_tx_cmd_id;
+static int hf_zbee_zcl_calendar_srv_rx_cmd_id;
+static int hf_zbee_zcl_calendar_attr_id;
+static int hf_zbee_zcl_calendar_attr_reporting_status;
+static int hf_zbee_zcl_calendar_type;
+static int hf_zbee_zcl_calendar_start_time;
+static int hf_zbee_zcl_calendar_earliest_start_time;
+static int hf_zbee_zcl_calendar_time_reference;
+static int hf_zbee_zcl_calendar_name;
+static int hf_zbee_zcl_calendar_command_index;
+static int hf_zbee_zcl_calendar_date_year;
+static int hf_zbee_zcl_calendar_date_month;
+static int hf_zbee_zcl_calendar_date_month_day;
+static int hf_zbee_zcl_calendar_date_week_day;
+static int hf_zbee_zcl_calendar_provider_id;
+static int hf_zbee_zcl_calendar_issuer_event_id;
+static int hf_zbee_zcl_calendar_min_issuer_event_id;
+static int hf_zbee_zcl_calendar_issuer_calendar_id;
+static int hf_zbee_zcl_calendar_day_id;
+static int hf_zbee_zcl_calendar_day_id_ref;
+static int hf_zbee_zcl_calendar_day_id_ref_monday;
+static int hf_zbee_zcl_calendar_day_id_ref_tuesday;
+static int hf_zbee_zcl_calendar_day_id_ref_wednesday;
+static int hf_zbee_zcl_calendar_day_id_ref_thursday;
+static int hf_zbee_zcl_calendar_day_id_ref_friday;
+static int hf_zbee_zcl_calendar_day_id_ref_saturday;
+static int hf_zbee_zcl_calendar_day_id_ref_sunday;
+static int hf_zbee_zcl_calendar_week_id;
+static int hf_zbee_zcl_calendar_week_id_ref;
+static int hf_zbee_zcl_calendar_start_day_id;
+static int hf_zbee_zcl_calendar_start_week_id;
+static int hf_zbee_zcl_calendar_number_of_calendars;
+static int hf_zbee_zcl_calendar_number_of_events;
+static int hf_zbee_zcl_calendar_number_of_days;
+static int hf_zbee_zcl_calendar_number_of_weeks;
+static int hf_zbee_zcl_calendar_number_of_seasons;
+static int hf_zbee_zcl_calendar_number_of_day_profiles;
+static int hf_zbee_zcl_calendar_number_of_week_profiles;
+static int hf_zbee_zcl_calendar_total_number_of_schedule_entries;
+static int hf_zbee_zcl_calendar_total_number_of_special_days;
+static int hf_zbee_zcl_calendar_total_number_of_commands;
+static int hf_zbee_zcl_calendar_schedule_entry_start_time;
+static int hf_zbee_zcl_calendar_schedule_entry_price_tier;
+static int hf_zbee_zcl_calendar_schedule_entry_friendly_credit_enable;
+static int hf_zbee_zcl_calendar_schedule_entry_auxiliary_load_switch_state;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_calendar = -1;
-static gint ett_zbee_zcl_calendar_special_day_date = -1;
-static gint ett_zbee_zcl_calendar_season_start_date = -1;
+static int ett_zbee_zcl_calendar;
+static int ett_zbee_zcl_calendar_special_day_date;
+static int ett_zbee_zcl_calendar_season_start_date;
#define zbee_zcl_calendar_type_names_VALUE_STRING_LIST(XXX) \
XXX(ZBEE_ZCL_CALENDAR_TYPE_DELIVERED, 0x00, "Delivered Calendar" ) \
@@ -11302,7 +11108,7 @@ VALUE_STRING_ARRAY(zbee_zcl_calendar_time_reference_names);
*@param client_attr ZCL client
*/
static void
-dissect_zcl_calendar_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_calendar_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
switch (attr_id) {
/* applies to all SE clusters */
@@ -11329,9 +11135,9 @@ dissect_zbee_zcl_calendar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -11444,14 +11250,10 @@ dissect_zbee_zcl_calendar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_get_calendar(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_get_calendar(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t earliest_start_time;
-
/* Earliest Start Time */
- earliest_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- earliest_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_calendar_earliest_start_time, tvb, *offset, 4, &earliest_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_calendar_earliest_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Min Issuer Event ID */
@@ -11479,7 +11281,7 @@ dissect_zcl_calendar_get_calendar(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_get_day_profiles(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_get_day_profiles(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -11506,7 +11308,7 @@ dissect_zcl_calendar_get_day_profiles(tvbuff_t *tvb, proto_tree *tree, guint *of
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_get_week_profiles(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_get_week_profiles(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -11533,7 +11335,7 @@ dissect_zcl_calendar_get_week_profiles(tvbuff_t *tvb, proto_tree *tree, guint *o
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_get_seasons(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_get_seasons(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -11552,14 +11354,10 @@ dissect_zcl_calendar_get_seasons(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_get_special_days(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_get_special_days(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
-
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_calendar_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_calendar_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Events */
@@ -11587,9 +11385,8 @@ dissect_zcl_calendar_get_special_days(tvbuff_t *tvb, proto_tree *tree, guint *of
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_publish_calendar(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_publish_calendar(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
int length;
/* Provider Id */
@@ -11605,9 +11402,7 @@ dissect_zcl_calendar_publish_calendar(tvbuff_t *tvb, proto_tree *tree, guint *of
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_calendar_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_calendar_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Calendar Type */
@@ -11643,10 +11438,10 @@ dissect_zcl_calendar_publish_calendar(tvbuff_t *tvb, proto_tree *tree, guint *of
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 schedule_entries_count;
- guint8 calendar_type;
+ uint8_t schedule_entries_count;
+ uint8_t calendar_type;
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -11665,7 +11460,7 @@ dissect_zcl_calendar_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, guint
*offset += 1;
/* Total Number of Schedule Entries */
- schedule_entries_count = tvb_get_guint8(tvb, *offset);
+ schedule_entries_count = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_calendar_total_number_of_schedule_entries, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -11678,11 +11473,11 @@ dissect_zcl_calendar_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, guint
*offset += 1;
/* Calendar Type */
- calendar_type = tvb_get_guint8(tvb, *offset);
+ calendar_type = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_calendar_type, tvb, *offset, 1, ENC_NA);
*offset += 1;
- for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 3 && i < schedule_entries_count; i++) {
+ for (int i = 0; tvb_reported_length_remaining(tvb, *offset) >= 3 && i < schedule_entries_count; i++) {
/* Start Time */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_schedule_entry_start_time, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -11722,7 +11517,7 @@ dissect_zcl_calendar_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, guint
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_publish_week_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_publish_week_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -11777,7 +11572,7 @@ dissect_zcl_calendar_publish_week_profile(tvbuff_t *tvb, proto_tree *tree, guint
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_publish_seasons(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_publish_seasons(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -11817,10 +11612,9 @@ dissect_zcl_calendar_publish_seasons(tvbuff_t *tvb, proto_tree *tree, guint *off
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_publish_special_days(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_publish_special_days(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 total_special_days_count;
- nstime_t start_time;
+ uint8_t total_special_days_count;
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -11835,9 +11629,7 @@ dissect_zcl_calendar_publish_special_days(tvbuff_t *tvb, proto_tree *tree, guint
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_calendar_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_calendar_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Calendar Type */
@@ -11845,7 +11637,7 @@ dissect_zcl_calendar_publish_special_days(tvbuff_t *tvb, proto_tree *tree, guint
*offset += 1;
/* Total Number of Special Days */
- total_special_days_count = tvb_get_guint8(tvb, *offset);
+ total_special_days_count = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_calendar_total_number_of_special_days, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -11857,7 +11649,7 @@ dissect_zcl_calendar_publish_special_days(tvbuff_t *tvb, proto_tree *tree, guint
proto_tree_add_item(tree, hf_zbee_zcl_calendar_total_number_of_commands, tvb, *offset, 1, ENC_NA);
*offset += 1;
- for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 5 && i < total_special_days_count; i++) {
+ for (int i = 0; tvb_reported_length_remaining(tvb, *offset) >= 5 && i < total_special_days_count; i++) {
/* Special Day Date */
dissect_zcl_date(tvb, tree, offset, ett_zbee_zcl_calendar_special_day_date, "Special Day Date", hf_zbee_zcl_calendar_date_year, hf_zbee_zcl_calendar_date_month, hf_zbee_zcl_calendar_date_month_day, hf_zbee_zcl_calendar_date_week_day);
@@ -11875,7 +11667,7 @@ dissect_zcl_calendar_publish_special_days(tvbuff_t *tvb, proto_tree *tree, guint
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_calendar_cancel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_calendar_cancel(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_calendar_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -12072,7 +11864,7 @@ proto_register_zbee_zcl_calendar(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_calendar_schedule_entry_friendly_credit_enable,
- { "Friendly Credit Enable", "zbee_zcl_se.calendar.schedule_entry.friendly_credit_enable", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled),
+ { "Friendly Credit Enable", "zbee_zcl_se.calendar.schedule_entry.friendly_credit_enable", FT_BOOLEAN, BASE_NONE, TFS(&tfs_enabled_disabled),
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_calendar_schedule_entry_auxiliary_load_switch_state,
@@ -12082,7 +11874,7 @@ proto_register_zbee_zcl_calendar(void)
};
/* ZCL Calendar subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_calendar,
&ett_zbee_zcl_calendar_special_day_date,
&ett_zbee_zcl_calendar_season_start_date,
@@ -12165,44 +11957,44 @@ void proto_register_zbee_zcl_daily_schedule(void);
void proto_reg_handoff_zbee_zcl_daily_schedule(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_daily_schedule_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_daily_schedule_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/* Command Dissector Helpers */
-static void dissect_zcl_daily_schedule_get_schedule(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_daily_schedule_get_day_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_daily_schedule_publish_schedule(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_daily_schedule_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_daily_schedule_cancel_schedule(tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_daily_schedule_get_schedule(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_daily_schedule_get_day_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_daily_schedule_publish_schedule(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_daily_schedule_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_daily_schedule_cancel_schedule(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_daily_schedule = -1;
+static int proto_zbee_zcl_daily_schedule;
-static int hf_zbee_zcl_daily_schedule_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_daily_schedule_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_daily_schedule_attr_server_id = -1;
+static int hf_zbee_zcl_daily_schedule_srv_tx_cmd_id;
+static int hf_zbee_zcl_daily_schedule_srv_rx_cmd_id;
+static int hf_zbee_zcl_daily_schedule_attr_server_id;
/* Get Schedule cmd */
-static int hf_zbee_zcl_daily_schedule_type = -1;
-static int hf_zbee_zcl_daily_schedule_name = -1;
-static int hf_zbee_zcl_daily_schedule_start_time = -1;
-static int hf_zbee_zcl_daily_schedule_earliest_start_time = -1;
-static int hf_zbee_zcl_daily_schedule_command_index = -1;
-static int hf_zbee_zcl_daily_schedule_id = -1;
-static int hf_zbee_zcl_daily_schedule_time_reference = -1;
-static int hf_zbee_zcl_daily_schedule_provider_id = -1;
-static int hf_zbee_zcl_daily_schedule_issuer_event_id = -1;
-static int hf_zbee_zcl_daily_schedule_min_issuer_event_id = -1;
-static int hf_zbee_zcl_daily_schedule_number_of_schedules = -1;
-static int hf_zbee_zcl_daily_schedule_total_number_of_schedule_entries = -1;
-static int hf_zbee_zcl_daily_schedule_schedule_entry_start_time = -1;
-static int hf_zbee_zcl_daily_schedule_schedule_entry_price_tier = -1;
-static int hf_zbee_zcl_daily_schedule_schedule_entry_auxiliary_load_switch_state = -1;
+static int hf_zbee_zcl_daily_schedule_type;
+static int hf_zbee_zcl_daily_schedule_name;
+static int hf_zbee_zcl_daily_schedule_start_time;
+static int hf_zbee_zcl_daily_schedule_earliest_start_time;
+static int hf_zbee_zcl_daily_schedule_command_index;
+static int hf_zbee_zcl_daily_schedule_id;
+static int hf_zbee_zcl_daily_schedule_time_reference;
+static int hf_zbee_zcl_daily_schedule_provider_id;
+static int hf_zbee_zcl_daily_schedule_issuer_event_id;
+static int hf_zbee_zcl_daily_schedule_min_issuer_event_id;
+static int hf_zbee_zcl_daily_schedule_number_of_schedules;
+static int hf_zbee_zcl_daily_schedule_total_number_of_schedule_entries;
+static int hf_zbee_zcl_daily_schedule_schedule_entry_start_time;
+static int hf_zbee_zcl_daily_schedule_schedule_entry_price_tier;
+static int hf_zbee_zcl_daily_schedule_schedule_entry_auxiliary_load_switch_state;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_daily_schedule = -1;
+static int ett_zbee_zcl_daily_schedule;
#define zbee_zcl_daily_schedule_type_names_VALUE_STRING_LIST(XXX) \
XXX(ZBEE_ZCL_SCHEDULE_TYPE_LINKY_SCHEDULE, 0x00, "Linky Schedule" ) \
@@ -12230,9 +12022,9 @@ dissect_zbee_zcl_daily_schedule(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -12321,9 +12113,8 @@ dissect_zbee_zcl_daily_schedule(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_daily_schedule_publish_schedule(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_daily_schedule_publish_schedule(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
int length;
/* Provider Id */
@@ -12339,9 +12130,7 @@ dissect_zcl_daily_schedule_publish_schedule(tvbuff_t *tvb, proto_tree *tree, gui
*offset += 4;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_daily_schedule_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Schedule Type */
@@ -12365,10 +12154,10 @@ dissect_zcl_daily_schedule_publish_schedule(tvbuff_t *tvb, proto_tree *tree, gui
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_daily_schedule_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_daily_schedule_publish_day_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 schedule_entries_count;
- guint8 calendar_type;
+ uint8_t schedule_entries_count;
+ uint8_t calendar_type;
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -12383,7 +12172,7 @@ dissect_zcl_daily_schedule_publish_day_profile(tvbuff_t *tvb, proto_tree *tree,
*offset += 4;
/* Total Number of Schedule Entries */
- schedule_entries_count = tvb_get_guint8(tvb, *offset);
+ schedule_entries_count = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_total_number_of_schedule_entries, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -12396,11 +12185,11 @@ dissect_zcl_daily_schedule_publish_day_profile(tvbuff_t *tvb, proto_tree *tree,
*offset += 1;
/* Calendar Type */
- calendar_type = tvb_get_guint8(tvb, *offset);
+ calendar_type = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_type, tvb, *offset, 1, ENC_NA);
*offset += 1;
- for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 4 && i < schedule_entries_count; i++) {
+ for (int i = 0; tvb_reported_length_remaining(tvb, *offset) >= 4 && i < schedule_entries_count; i++) {
/* Start Time */
proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_schedule_entry_start_time, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
@@ -12427,7 +12216,7 @@ dissect_zcl_daily_schedule_publish_day_profile(tvbuff_t *tvb, proto_tree *tree,
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_daily_schedule_cancel_schedule(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_daily_schedule_cancel_schedule(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -12450,18 +12239,14 @@ dissect_zcl_daily_schedule_cancel_schedule(tvbuff_t *tvb, proto_tree *tree, guin
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_daily_schedule_get_schedule(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_daily_schedule_get_schedule(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t earliest_start_time;
-
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Earliest Start Time */
- earliest_start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- earliest_start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_daily_schedule_earliest_start_time, tvb, *offset, 4, &earliest_start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_earliest_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Min Issuer Event ID */
@@ -12485,7 +12270,7 @@ dissect_zcl_daily_schedule_get_schedule(tvbuff_t *tvb, proto_tree *tree, guint *
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_daily_schedule_get_day_profile(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_daily_schedule_get_day_profile(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Provider Id */
proto_tree_add_item(tree, hf_zbee_zcl_daily_schedule_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -12506,7 +12291,7 @@ dissect_zcl_daily_schedule_get_day_profile(tvbuff_t *tvb, proto_tree *tree, guin
*@param data_type attribute data type
*/
static void
-dissect_zcl_daily_schedule_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_daily_schedule_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
(void)attr_id;
/* Catch all */
@@ -12597,7 +12382,7 @@ proto_register_zbee_zcl_daily_schedule(void)
};
/* ZCL Daily Schedule subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_daily_schedule,
};
@@ -13195,86 +12980,86 @@ void proto_register_zbee_zcl_device_management(void);
void proto_reg_handoff_zbee_zcl_device_management(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_device_management_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_device_management_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_device_management = -1;
-
-static int hf_zbee_zcl_device_management_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_device_management_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_device_management_attr_server_id = -1;
-static int hf_zbee_zcl_device_management_attr_client_id = -1;
-static int hf_zbee_zcl_device_management_attr_reporting_status = -1;
-static int hf_zbee_zcl_device_management_password_type = -1;
-static int hf_zbee_zcl_device_management_command_index = -1;
-static int hf_zbee_zcl_device_management_total_commands = -1;
-static int hf_zbee_zcl_device_management_event_id= -1;
-static int hf_zbee_zcl_device_management_event_configuration = -1;
-static int hf_zbee_zcl_device_management_event_configuration_logging = -1;
-static int hf_zbee_zcl_device_management_event_configuration_push_event_to_wan = -1;
-static int hf_zbee_zcl_device_management_event_configuration_push_event_to_han = -1;
-static int hf_zbee_zcl_device_management_event_configuration_raise_alarm_zigbee = -1;
-static int hf_zbee_zcl_device_management_event_configuration_raise_alarm_physical = -1;
-static int hf_zbee_zcl_device_management_event_configuration_reserved = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_provider_id = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_issuer_event_id = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_tariff_type = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_implementation_date = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_pre_snapshot = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_post_snapshot = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_reset_credit_register = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_reset_debit_register = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_reset_billing_period = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_tariff_plan = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_standing_charge = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_block_historical_load_profile_information = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_historical_load_profile_information = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_ihd_data_consumer = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_ihd_data_supplier = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_meter_contactor_state = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_transaction_log = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_prepayment_data = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_reserved = -1;
-
-static int hf_zbee_zcl_device_management_publish_change_of_supplier_current_provider_id = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_supplier_issuer_event_id = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_supplier_tariff_type = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_supplier_proposed_provider_id = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_supplier_provider_change_implementation_time = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_supplier_provider_change_control = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_supplier_provider_proposed_provider_name = -1;
-static int hf_zbee_zcl_device_management_publish_change_of_supplier_provider_proposed_provider_contact_details = -1;
-
-static int hf_zbee_zcl_device_management_request_new_password_issuer_event_id = -1;
-static int hf_zbee_zcl_device_management_request_new_password_implementation_date = -1;
-static int hf_zbee_zcl_device_management_request_new_password_password = -1;
-static int hf_zbee_zcl_device_management_request_new_password_duration_in_minutes = -1;
-
-static int hf_zbee_zcl_device_management_update_site_id_issuer_event_id = -1;
-static int hf_zbee_zcl_device_management_update_site_id_site_id_time = -1;
-static int hf_zbee_zcl_device_management_update_site_id_provider_id = -1;
-static int hf_zbee_zcl_device_management_update_site_id_site_id = -1;
-
-static int hf_zbee_zcl_device_management_set_event_configuration_issuer_event_id = -1;
-static int hf_zbee_zcl_device_management_set_event_configuration_start_time = -1;
-static int hf_zbee_zcl_device_management_set_event_configuration_configuration_control = -1;
-static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_number_of_events = -1;
-static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_id = -1;
-static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_group_id = -1;
-static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_log_id = -1;
-static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_configuration_value_match = -1;
-
-static int hf_zbee_zcl_device_management_get_event_configuration_event_id = -1;
-
-static int hf_zbee_zcl_device_management_update_cin_issuer_event_id = -1;
-static int hf_zbee_zcl_device_management_update_cin_cin_implementation_time = -1;
-static int hf_zbee_zcl_device_management_update_cin_provider_id = -1;
-static int hf_zbee_zcl_device_management_update_cin_customerid_number = -1;
+static int proto_zbee_zcl_device_management;
+
+static int hf_zbee_zcl_device_management_srv_tx_cmd_id;
+static int hf_zbee_zcl_device_management_srv_rx_cmd_id;
+static int hf_zbee_zcl_device_management_attr_server_id;
+static int hf_zbee_zcl_device_management_attr_client_id;
+static int hf_zbee_zcl_device_management_attr_reporting_status;
+static int hf_zbee_zcl_device_management_password_type;
+static int hf_zbee_zcl_device_management_command_index;
+static int hf_zbee_zcl_device_management_total_commands;
+static int hf_zbee_zcl_device_management_event_id;
+static int hf_zbee_zcl_device_management_event_configuration;
+static int hf_zbee_zcl_device_management_event_configuration_logging;
+static int hf_zbee_zcl_device_management_event_configuration_push_event_to_wan;
+static int hf_zbee_zcl_device_management_event_configuration_push_event_to_han;
+static int hf_zbee_zcl_device_management_event_configuration_raise_alarm_zigbee;
+static int hf_zbee_zcl_device_management_event_configuration_raise_alarm_physical;
+static int hf_zbee_zcl_device_management_event_configuration_reserved;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_provider_id;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_issuer_event_id;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_tariff_type;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_implementation_date;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_pre_snapshot;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_post_snapshot;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_reset_credit_register;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_reset_debit_register;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_reset_billing_period;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_tariff_plan;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_standing_charge;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_block_historical_load_profile_information;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_historical_load_profile_information;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_ihd_data_consumer;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_ihd_data_supplier;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_meter_contactor_state;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_transaction_log;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_clear_prepayment_data;
+static int hf_zbee_zcl_device_management_publish_change_of_tenancy_proposed_tenancy_change_control_reserved;
+
+static int hf_zbee_zcl_device_management_publish_change_of_supplier_current_provider_id;
+static int hf_zbee_zcl_device_management_publish_change_of_supplier_issuer_event_id;
+static int hf_zbee_zcl_device_management_publish_change_of_supplier_tariff_type;
+static int hf_zbee_zcl_device_management_publish_change_of_supplier_proposed_provider_id;
+static int hf_zbee_zcl_device_management_publish_change_of_supplier_provider_change_implementation_time;
+static int hf_zbee_zcl_device_management_publish_change_of_supplier_provider_change_control;
+static int hf_zbee_zcl_device_management_publish_change_of_supplier_provider_proposed_provider_name;
+static int hf_zbee_zcl_device_management_publish_change_of_supplier_provider_proposed_provider_contact_details;
+
+static int hf_zbee_zcl_device_management_request_new_password_issuer_event_id;
+static int hf_zbee_zcl_device_management_request_new_password_implementation_date;
+static int hf_zbee_zcl_device_management_request_new_password_password;
+static int hf_zbee_zcl_device_management_request_new_password_duration_in_minutes;
+
+static int hf_zbee_zcl_device_management_update_site_id_issuer_event_id;
+static int hf_zbee_zcl_device_management_update_site_id_site_id_time;
+static int hf_zbee_zcl_device_management_update_site_id_provider_id;
+static int hf_zbee_zcl_device_management_update_site_id_site_id;
+
+static int hf_zbee_zcl_device_management_set_event_configuration_issuer_event_id;
+static int hf_zbee_zcl_device_management_set_event_configuration_start_time;
+static int hf_zbee_zcl_device_management_set_event_configuration_configuration_control;
+static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_number_of_events;
+static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_id;
+static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_group_id;
+static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_log_id;
+static int hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_configuration_value_match;
+
+static int hf_zbee_zcl_device_management_get_event_configuration_event_id;
+
+static int hf_zbee_zcl_device_management_update_cin_issuer_event_id;
+static int hf_zbee_zcl_device_management_update_cin_cin_implementation_time;
+static int hf_zbee_zcl_device_management_update_cin_provider_id;
+static int hf_zbee_zcl_device_management_update_cin_customerid_number;
static int* const hf_zbee_zcl_device_management_event_configuration_flags[] = {
&hf_zbee_zcl_device_management_event_configuration_logging,
@@ -13306,10 +13091,10 @@ static int* const hf_zbee_zcl_device_management_publish_change_of_tenancy_propos
};
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_device_management = -1;
-static gint ett_zbee_zcl_device_management_event_configuration_payload = -1;
-static gint ett_zbee_zcl_device_management_event_configuration = -1;
-static gint ett_zbee_zcl_device_management_proposed_tenancy_change_control = -1;
+static int ett_zbee_zcl_device_management;
+static int ett_zbee_zcl_device_management_event_configuration_payload;
+static int ett_zbee_zcl_device_management_event_configuration;
+static int ett_zbee_zcl_device_management_proposed_tenancy_change_control;
/*************************/
/* Function Bodies */
@@ -13326,7 +13111,7 @@ static gint ett_zbee_zcl_device_management_proposed_tenancy_change_control = -1;
*@param client_attr ZCL client
*/
static void
-dissect_zcl_device_management_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_device_management_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
switch (attr_id) {
/* applies to all SE clusters */
@@ -13349,7 +13134,7 @@ dissect_zcl_device_management_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_request_new_password(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_request_new_password(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
/* Password Type */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_password_type, tvb, *offset, 1, ENC_NA);
@@ -13364,10 +13149,10 @@ dissect_zcl_device_management_request_new_password(proto_tree *tree, tvbuff_t *t
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_report_event_configuration(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_report_event_configuration(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
proto_tree *event_configuration_payload;
- guint rem_len;
+ unsigned rem_len;
/* Command Index */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_command_index, tvb, *offset, 1, ENC_NA);
@@ -13401,10 +13186,8 @@ dissect_zcl_device_management_report_event_configuration(proto_tree *tree, tvbuf
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_publish_change_of_tenancy(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_publish_change_of_tenancy(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
- nstime_t impl_date;
-
/* Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_publish_change_of_tenancy_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
@@ -13418,9 +13201,7 @@ dissect_zcl_device_management_publish_change_of_tenancy(proto_tree *tree, tvbuff
*offset += 1;
/* Implementation Date/Time */
- impl_date.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- impl_date.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_device_management_publish_change_of_tenancy_implementation_date, tvb, *offset, 4, &impl_date);
+ proto_tree_add_item(tree, hf_zbee_zcl_device_management_publish_change_of_tenancy_implementation_date, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Proposed Tenancy Change Control */
@@ -13438,11 +13219,10 @@ dissect_zcl_device_management_publish_change_of_tenancy(proto_tree *tree, tvbuff
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_publish_change_of_supplier(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_publish_change_of_supplier(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
- nstime_t impl_time;
- gint name_length;
- gint detail_length;
+ int name_length;
+ int detail_length;
/* Current Provider ID */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_publish_change_of_supplier_current_provider_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -13461,9 +13241,7 @@ dissect_zcl_device_management_publish_change_of_supplier(proto_tree *tree, tvbuf
*offset += 4;
/* Provider Change Implementation Time */
- impl_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- impl_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_device_management_publish_change_of_supplier_provider_change_implementation_time, tvb, *offset, 4, &impl_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_device_management_publish_change_of_supplier_provider_change_implementation_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Provider Change Control */
@@ -13488,19 +13266,16 @@ dissect_zcl_device_management_publish_change_of_supplier(proto_tree *tree, tvbuf
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_request_new_password_response(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_request_new_password_response(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
- nstime_t impl_date;
- gint password_length;
+ int password_length;
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_request_new_password_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Implementation Date/Time */
- impl_date.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- impl_date.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_device_management_request_new_password_implementation_date, tvb, *offset, 4, &impl_date);
+ proto_tree_add_item(tree, hf_zbee_zcl_device_management_request_new_password_implementation_date, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Duration in minutes */
@@ -13525,19 +13300,16 @@ dissect_zcl_device_management_request_new_password_response(proto_tree *tree, tv
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_update_site_id(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_update_site_id(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
- nstime_t siteid_time;
- gint siteid_length;
+ int siteid_length;
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_update_site_id_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* SiteID Time */
- siteid_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- siteid_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_device_management_update_site_id_site_id_time, tvb, *offset, 4, &siteid_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_device_management_update_site_id_site_id_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Provider ID */
@@ -13558,20 +13330,17 @@ dissect_zcl_device_management_update_site_id(proto_tree *tree, tvbuff_t *tvb, gu
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_set_event_configuration(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_set_event_configuration(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
- nstime_t start_time;
- guint8 config_control;
- guint8 number_of_events;
+ uint8_t config_control;
+ uint8_t number_of_events;
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_set_event_configuration_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Start Date/Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_device_management_set_event_configuration_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_device_management_set_event_configuration_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Event Configuration */
@@ -13580,20 +13349,20 @@ dissect_zcl_device_management_set_event_configuration(proto_tree *tree, tvbuff_t
*offset += 1;
/* Configuration Control */
- config_control = tvb_get_guint8(tvb, *offset);
+ config_control = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_device_management_set_event_configuration_configuration_control, tvb, *offset, 1, ENC_NA);
*offset += 1;
/* Event Configuration Payload */
switch (config_control) {
case ZBEE_ZCL_DEVICE_MANAGEMENT_CONFIGURATION_CONTROL_APPLY_BY_LIST:
- number_of_events = tvb_get_guint8(tvb, *offset);
+ number_of_events = tvb_get_uint8(tvb, *offset);
/* Number of Events */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_set_event_configuration_event_configuration_number_of_events, tvb, *offset, 1, ENC_NA);
*offset += 1;
/* Event IDs */
- for (guint i = 0; tvb_reported_length_remaining(tvb, *offset) > 0 && i < number_of_events; i++) {
+ for (unsigned i = 0; tvb_reported_length_remaining(tvb, *offset) > 0 && i < number_of_events; i++) {
proto_tree_add_item(tree, hf_zbee_zcl_device_management_set_event_configuration_event_configuration_event_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
}
@@ -13624,7 +13393,7 @@ dissect_zcl_device_management_set_event_configuration(proto_tree *tree, tvbuff_t
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_get_event_configuration(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_get_event_configuration(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
/* Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_get_event_configuration_event_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
@@ -13639,19 +13408,16 @@ dissect_zcl_device_management_get_event_configuration(proto_tree *tree, tvbuff_t
*@param offset pointer to buffer offset
*/
static void
-dissect_zcl_device_management_update_cin(proto_tree *tree, tvbuff_t *tvb, guint *offset)
+dissect_zcl_device_management_update_cin(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
{
- nstime_t cin_impl_time;
- gint customer_id_length;
+ int customer_id_length;
/* Issuer Event ID */
proto_tree_add_item(tree, hf_zbee_zcl_device_management_update_cin_issuer_event_id, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* CIN Implementation Time */
- cin_impl_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- cin_impl_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_device_management_update_cin_cin_implementation_time, tvb, *offset, 4, &cin_impl_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_device_management_update_cin_cin_implementation_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Provider ID */
@@ -13675,9 +13441,9 @@ dissect_zbee_zcl_device_management(tvbuff_t *tvb, packet_info *pinfo, proto_tree
{
zbee_zcl_packet *zcl;
proto_tree *payload_tree;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -14053,7 +13819,7 @@ proto_register_zbee_zcl_device_management(void)
};
/* ZCL Device Management subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_device_management,
&ett_zbee_zcl_device_management_event_configuration_payload,
&ett_zbee_zcl_device_management_event_configuration,
@@ -14120,50 +13886,50 @@ void proto_register_zbee_zcl_events(void);
void proto_reg_handoff_zbee_zcl_events(void);
/* Command Dissector Helpers */
-static void dissect_zcl_events_get_event_log (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_events_clear_event_log_request (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_events_publish_event (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_events_publish_event_log (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_events_clear_event_log_response (tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_events_get_event_log (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_events_clear_event_log_request (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_events_publish_event (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_events_publish_event_log (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_events_clear_event_log_response (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_events = -1;
-
-static int hf_zbee_zcl_events_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_events_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_events_get_event_log_event_control_log_id = -1;
-static int hf_zbee_zcl_events_get_event_log_event_id = -1;
-static int hf_zbee_zcl_events_get_event_log_start_time = -1;
-static int hf_zbee_zcl_events_get_event_log_end_time = -1;
-static int hf_zbee_zcl_events_get_event_log_number_of_events = -1;
-static int hf_zbee_zcl_events_get_event_log_event_offset = -1;
-static int hf_zbee_zcl_events_clear_event_log_request_log_id = -1;
-static int hf_zbee_zcl_events_publish_event_log_id = -1;
-static int hf_zbee_zcl_events_publish_event_event_id = -1;
-static int hf_zbee_zcl_events_publish_event_event_time = -1;
-static int hf_zbee_zcl_events_publish_event_event_control = -1;
-static int hf_zbee_zcl_events_publish_event_event_data = -1;
-static int hf_zbee_zcl_events_publish_event_log_total_number_of_matching_events = -1;
-static int hf_zbee_zcl_events_publish_event_log_command_index = -1;
-static int hf_zbee_zcl_events_publish_event_log_total_commands = -1;
-static int hf_zbee_zcl_events_publish_event_log_number_of_events_log_payload_control = -1;
-static int hf_zbee_zcl_events_publish_event_log_log_id = -1;
-static int hf_zbee_zcl_events_publish_event_log_event_id = -1;
-static int hf_zbee_zcl_events_publish_event_log_event_time = -1;
-static int hf_zbee_zcl_events_publish_event_log_event_data = -1;
-static int hf_zbee_zcl_events_clear_event_log_response_cleared_event_logs = -1;
+static int proto_zbee_zcl_events;
+
+static int hf_zbee_zcl_events_srv_tx_cmd_id;
+static int hf_zbee_zcl_events_srv_rx_cmd_id;
+static int hf_zbee_zcl_events_get_event_log_event_control_log_id;
+static int hf_zbee_zcl_events_get_event_log_event_id;
+static int hf_zbee_zcl_events_get_event_log_start_time;
+static int hf_zbee_zcl_events_get_event_log_end_time;
+static int hf_zbee_zcl_events_get_event_log_number_of_events;
+static int hf_zbee_zcl_events_get_event_log_event_offset;
+static int hf_zbee_zcl_events_clear_event_log_request_log_id;
+static int hf_zbee_zcl_events_publish_event_log_id;
+static int hf_zbee_zcl_events_publish_event_event_id;
+static int hf_zbee_zcl_events_publish_event_event_time;
+static int hf_zbee_zcl_events_publish_event_event_control;
+static int hf_zbee_zcl_events_publish_event_event_data;
+static int hf_zbee_zcl_events_publish_event_log_total_number_of_matching_events;
+static int hf_zbee_zcl_events_publish_event_log_command_index;
+static int hf_zbee_zcl_events_publish_event_log_total_commands;
+static int hf_zbee_zcl_events_publish_event_log_number_of_events_log_payload_control;
+static int hf_zbee_zcl_events_publish_event_log_log_id;
+static int hf_zbee_zcl_events_publish_event_log_event_id;
+static int hf_zbee_zcl_events_publish_event_log_event_time;
+static int hf_zbee_zcl_events_publish_event_log_event_data;
+static int hf_zbee_zcl_events_clear_event_log_response_cleared_event_logs;
/* Initialize the subtree pointers */
#define ZBEE_ZCL_SE_EVENTS_NUM_INDIVIDUAL_ETT 1
#define ZBEE_ZCL_SE_EVENTS_NUM_PUBLISH_EVENT_LOG_ETT 100 // The Great Britain Companion Specification (GBCS) allows up to 100 even though ZigBee only allows 15
#define ZBEE_ZCL_SE_EVENTS_NUM_TOTAL_ETT (ZBEE_ZCL_SE_EVENTS_NUM_INDIVIDUAL_ETT + ZBEE_ZCL_SE_EVENTS_NUM_PUBLISH_EVENT_LOG_ETT)
-static gint ett_zbee_zcl_events = -1;
-static gint ett_zbee_zcl_events_publish_event_log_entry[ZBEE_ZCL_SE_EVENTS_NUM_PUBLISH_EVENT_LOG_ETT];
+static int ett_zbee_zcl_events;
+static int ett_zbee_zcl_events_publish_event_log_entry[ZBEE_ZCL_SE_EVENTS_NUM_PUBLISH_EVENT_LOG_ETT];
/*************************/
/* Function Bodies */
@@ -14181,9 +13947,9 @@ dissect_zbee_zcl_events(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -14268,11 +14034,8 @@ dissect_zbee_zcl_events(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_events_get_event_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_events_get_event_log(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t start_time;
- nstime_t end_time;
-
/* Event Control / Log ID */
proto_tree_add_item(tree, hf_zbee_zcl_events_get_event_log_event_control_log_id, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -14282,15 +14045,11 @@ dissect_zcl_events_get_event_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 2;
/* Start Time */
- start_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- start_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_events_get_event_log_start_time, tvb, *offset, 4, &start_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_events_get_event_log_start_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* End Time */
- end_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- end_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_events_get_event_log_end_time, tvb, *offset, 4, &end_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_events_get_event_log_end_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Number of Events */
@@ -14310,7 +14069,7 @@ dissect_zcl_events_get_event_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_events_clear_event_log_request(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_events_clear_event_log_request(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Log ID */
proto_tree_add_item(tree, hf_zbee_zcl_events_clear_event_log_request_log_id, tvb, *offset, 1, ENC_NA);
@@ -14325,10 +14084,9 @@ dissect_zcl_events_clear_event_log_request(tvbuff_t *tvb, proto_tree *tree, guin
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_events_publish_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_events_publish_event(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- nstime_t event_time;
- gint length;
+ int length;
if (gPREF_zbee_se_protocol_version >= ZBEE_SE_VERSION_1_2) {
/* Log ID - Introduced from ZCL version 1.2 */
@@ -14341,9 +14099,7 @@ dissect_zcl_events_publish_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 2;
/* Event Time */
- event_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- event_time.nsecs = 0;
- proto_tree_add_time(tree, hf_zbee_zcl_events_publish_event_event_time, tvb, *offset, 4, &event_time);
+ proto_tree_add_item(tree, hf_zbee_zcl_events_publish_event_event_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Event Control */
@@ -14363,10 +14119,9 @@ dissect_zcl_events_publish_event(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_events_publish_event_log(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_events_publish_event_log(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree* event_log_tree;
- nstime_t event_time;
int length;
/* Total Number of Matching Events */
@@ -14385,7 +14140,7 @@ dissect_zcl_events_publish_event_log(tvbuff_t *tvb, proto_tree *tree, guint *off
proto_tree_add_item(tree, hf_zbee_zcl_events_publish_event_log_number_of_events_log_payload_control, tvb, *offset, 1, ENC_NA);
*offset += 1;
- for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) > 0 && i < ZBEE_ZCL_SE_EVENTS_NUM_PUBLISH_EVENT_LOG_ETT; i++) {
+ for (int i = 0; tvb_reported_length_remaining(tvb, *offset) > 0 && i < ZBEE_ZCL_SE_EVENTS_NUM_PUBLISH_EVENT_LOG_ETT; i++) {
/* Add subtree */
event_log_tree = proto_tree_add_subtree_format(tree, tvb, *offset, 0, ett_zbee_zcl_events_publish_event_log_entry[i], NULL, "Event Log %d", i + 1);
@@ -14396,14 +14151,12 @@ dissect_zcl_events_publish_event_log(tvbuff_t *tvb, proto_tree *tree, guint *off
}
/* Event ID */
- proto_item_append_text(event_log_tree, ", Event ID: 0x%04x", tvb_get_guint16(tvb, *offset, ENC_LITTLE_ENDIAN));
+ proto_item_append_text(event_log_tree, ", Event ID: 0x%04x", tvb_get_uint16(tvb, *offset, ENC_LITTLE_ENDIAN));
proto_tree_add_item(event_log_tree, hf_zbee_zcl_events_publish_event_log_event_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
*offset += 2;
/* Event Time */
- event_time.secs = (time_t)tvb_get_letohl(tvb, *offset) + ZBEE_ZCL_NSTIME_UTC_OFFSET;
- event_time.nsecs = 0;
- proto_tree_add_time(event_log_tree, hf_zbee_zcl_events_publish_event_log_event_time, tvb, *offset, 4, &event_time);
+ proto_tree_add_item(event_log_tree, hf_zbee_zcl_events_publish_event_log_event_time, tvb, *offset, 4, ENC_TIME_ZBEE_ZCL|ENC_LITTLE_ENDIAN);
*offset += 4;
/* Event Data */
@@ -14423,7 +14176,7 @@ dissect_zcl_events_publish_event_log(tvbuff_t *tvb, proto_tree *tree, guint *off
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_events_clear_event_log_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_events_clear_event_log_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Cleared Event Logs */
proto_tree_add_item(tree, hf_zbee_zcl_events_clear_event_log_response_cleared_event_logs, tvb, *offset, 1, ENC_NA);
@@ -14496,7 +14249,7 @@ proto_register_zbee_zcl_events(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_events_publish_event_log_total_number_of_matching_events,
- { "Total Number of Matching Events", "zbee_zcl_se.events.publish_event_log.event_id", FT_UINT16, BASE_DEC, NULL,
+ { "Total Number of Matching Events", "zbee_zcl_se.events.publish_event_log.matching_events", FT_UINT16, BASE_DEC, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_events_publish_event_log_command_index,
@@ -14534,14 +14287,13 @@ proto_register_zbee_zcl_events(void)
};
/* ZCL Events subtrees */
- gint *ett[ZBEE_ZCL_SE_EVENTS_NUM_TOTAL_ETT];
+ int *ett[ZBEE_ZCL_SE_EVENTS_NUM_TOTAL_ETT];
ett[0] = &ett_zbee_zcl_events;
- guint j = ZBEE_ZCL_SE_EVENTS_NUM_INDIVIDUAL_ETT;
+ unsigned j = ZBEE_ZCL_SE_EVENTS_NUM_INDIVIDUAL_ETT;
/* Initialize Publish Event Log subtrees */
- for (guint i = 0; i < ZBEE_ZCL_SE_EVENTS_NUM_PUBLISH_EVENT_LOG_ETT; i++, j++) {
- ett_zbee_zcl_events_publish_event_log_entry[i] = -1;
+ for (unsigned i = 0; i < ZBEE_ZCL_SE_EVENTS_NUM_PUBLISH_EVENT_LOG_ETT; i++, j++) {
ett[j] = &ett_zbee_zcl_events_publish_event_log_entry[i];
}
@@ -14600,28 +14352,28 @@ void proto_register_zbee_zcl_mdu_pairing(void);
void proto_reg_handoff_zbee_zcl_mdu_pairing(void);
/* Command Dissector Helpers */
-static void dissect_zcl_mdu_pairing_request (tvbuff_t *tvb, proto_tree *tree, guint *offset);
-static void dissect_zcl_mdu_pairing_response(tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_mdu_pairing_request (tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
+static void dissect_zcl_mdu_pairing_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_mdu_pairing = -1;
-
-static int hf_zbee_zcl_mdu_pairing_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_mdu_pairing_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_mdu_pairing_info_version = -1;
-static int hf_zbee_zcl_mdu_pairing_total_devices_number = -1;
-static int hf_zbee_zcl_mdu_pairing_cmd_id = -1;
-static int hf_zbee_zcl_mdu_pairing_total_commands_number = -1;
-static int hf_zbee_zcl_mdu_pairing_device_eui64 = -1;
-static int hf_zbee_zcl_mdu_pairing_local_info_version = -1;
-static int hf_zbee_zcl_mdu_pairing_requesting_device_eui64 = -1;
+static int proto_zbee_zcl_mdu_pairing;
+
+static int hf_zbee_zcl_mdu_pairing_srv_tx_cmd_id;
+static int hf_zbee_zcl_mdu_pairing_srv_rx_cmd_id;
+static int hf_zbee_zcl_mdu_pairing_info_version;
+static int hf_zbee_zcl_mdu_pairing_total_devices_number;
+static int hf_zbee_zcl_mdu_pairing_cmd_id;
+static int hf_zbee_zcl_mdu_pairing_total_commands_number;
+static int hf_zbee_zcl_mdu_pairing_device_eui64;
+static int hf_zbee_zcl_mdu_pairing_local_info_version;
+static int hf_zbee_zcl_mdu_pairing_requesting_device_eui64;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_mdu_pairing = -1;
+static int ett_zbee_zcl_mdu_pairing;
/*************************/
/* Function Bodies */
@@ -14639,9 +14391,9 @@ dissect_zbee_zcl_mdu_pairing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -14714,7 +14466,7 @@ dissect_zbee_zcl_mdu_pairing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_mdu_pairing_request(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_mdu_pairing_request(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* Local pairing information version */
proto_tree_add_item(tree, hf_zbee_zcl_mdu_pairing_local_info_version, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
@@ -14733,16 +14485,16 @@ dissect_zcl_mdu_pairing_request(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_mdu_pairing_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_mdu_pairing_response(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- guint8 devices_num;
+ uint8_t devices_num;
/* Pairing information version */
proto_tree_add_item(tree, hf_zbee_zcl_mdu_pairing_info_version, tvb, *offset, 4, ENC_LITTLE_ENDIAN);
*offset += 4;
/* Total Number of Devices */
- devices_num = tvb_get_guint8(tvb, *offset);
+ devices_num = tvb_get_uint8(tvb, *offset);
proto_tree_add_item(tree, hf_zbee_zcl_mdu_pairing_total_devices_number, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -14755,7 +14507,7 @@ dissect_zcl_mdu_pairing_response(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 1;
/* EUI64 of Devices */
- for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 8 && i < devices_num; i++) {
+ for (int i = 0; tvb_reported_length_remaining(tvb, *offset) >= 8 && i < devices_num; i++) {
/* EUI64 of Device i */
proto_tree_add_item(tree, hf_zbee_zcl_mdu_pairing_device_eui64, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
*offset += 8;
@@ -14809,7 +14561,7 @@ proto_register_zbee_zcl_mdu_pairing(void)
};
/* ZCL MDU Pairing subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_mdu_pairing
};
@@ -14878,26 +14630,26 @@ void proto_register_zbee_zcl_sub_ghz(void);
void proto_reg_handoff_zbee_zcl_sub_ghz(void);
/* Attribute Dissector Helpers */
-static void dissect_zcl_sub_ghz_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr);
+static void dissect_zcl_sub_ghz_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr);
/* Command Dissector Helpers */
-static void dissect_zcl_sub_ghz_suspend_zcl_messages(tvbuff_t *tvb, proto_tree *tree, guint *offset);
+static void dissect_zcl_sub_ghz_suspend_zcl_messages(tvbuff_t *tvb, proto_tree *tree, unsigned *offset);
/*************************/
/* Global Variables */
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_sub_ghz = -1;
+static int proto_zbee_zcl_sub_ghz;
-static int hf_zbee_zcl_sub_ghz_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_sub_ghz_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_sub_ghz_attr_id = -1;
-static int hf_zbee_zcl_sub_ghz_attr_reporting_status = -1;
-static int hf_zbee_zcl_sub_ghz_zcl_messages_suspension_period = -1;
+static int hf_zbee_zcl_sub_ghz_srv_tx_cmd_id;
+static int hf_zbee_zcl_sub_ghz_srv_rx_cmd_id;
+static int hf_zbee_zcl_sub_ghz_attr_id;
+static int hf_zbee_zcl_sub_ghz_attr_reporting_status;
+static int hf_zbee_zcl_sub_ghz_zcl_messages_suspension_period;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_sub_ghz = -1;
+static int ett_zbee_zcl_sub_ghz;
/*************************/
/* Function Bodies */
@@ -14914,7 +14666,7 @@ static gint ett_zbee_zcl_sub_ghz = -1;
*@param client_attr ZCL client
*/
static void
-dissect_zcl_sub_ghz_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type, gboolean client_attr)
+dissect_zcl_sub_ghz_attr_data(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint16_t attr_id, unsigned data_type, bool client_attr)
{
/* Dissect attribute data type and data */
switch (attr_id) {
@@ -14948,9 +14700,9 @@ dissect_zbee_zcl_sub_ghz(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
{
proto_tree *payload_tree;
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -15023,7 +14775,7 @@ dissect_zbee_zcl_sub_ghz(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_sub_ghz_suspend_zcl_messages(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_sub_ghz_suspend_zcl_messages(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
/* (Optional) Suspension Period */
if (tvb_reported_length_remaining(tvb, *offset) > 0) {
@@ -15063,7 +14815,7 @@ proto_register_zbee_zcl_sub_ghz(void)
};
/* ZCL Sub-Ghz subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_sub_ghz
};
@@ -15184,37 +14936,37 @@ void proto_reg_handoff_zbee_zcl_ke(void);
/*************************/
/* Initialize the protocol and registered fields */
-static int proto_zbee_zcl_ke = -1;
-static int hf_zbee_zcl_ke_srv_tx_cmd_id = -1;
-static int hf_zbee_zcl_ke_srv_rx_cmd_id = -1;
-static int hf_zbee_zcl_ke_attr_id = -1;
-static int hf_zbee_zcl_ke_attr_client_id = -1;
-static int hf_zbee_zcl_ke_suite = -1;
-static int hf_zbee_zcl_ke_ephemeral_time = -1;
-static int hf_zbee_zcl_ke_confirm_time = -1;
-static int hf_zbee_zcl_ke_status = -1;
-static int hf_zbee_zcl_ke_wait_time = -1;
-static int hf_zbee_zcl_ke_cert_reconstr = -1;
-static int hf_zbee_zcl_ke_cert_subject = -1;
-static int hf_zbee_zcl_ke_cert_issuer = -1;
-static int hf_zbee_zcl_ke_cert_profile_attr = -1;
-static int hf_zbee_zcl_ke_cert_type = -1;
-static int hf_zbee_zcl_ke_cert_serialno = -1;
-static int hf_zbee_zcl_ke_cert_curve = -1;
-static int hf_zbee_zcl_ke_cert_hash = -1;
-static int hf_zbee_zcl_ke_cert_valid_from = -1;
-static int hf_zbee_zcl_ke_cert_valid_to = -1;
-static int hf_zbee_zcl_ke_cert_key_usage_agreement = -1;
-static int hf_zbee_zcl_ke_cert_key_usage_signature = -1;
-static int hf_zbee_zcl_ke_ephemeral_qeu = -1;
-static int hf_zbee_zcl_ke_ephemeral_qev = -1;
-static int hf_zbee_zcl_ke_macu = -1;
-static int hf_zbee_zcl_ke_macv = -1;
+static int proto_zbee_zcl_ke;
+static int hf_zbee_zcl_ke_srv_tx_cmd_id;
+static int hf_zbee_zcl_ke_srv_rx_cmd_id;
+static int hf_zbee_zcl_ke_attr_id;
+static int hf_zbee_zcl_ke_attr_client_id;
+static int hf_zbee_zcl_ke_suite;
+static int hf_zbee_zcl_ke_ephemeral_time;
+static int hf_zbee_zcl_ke_confirm_time;
+static int hf_zbee_zcl_ke_status;
+static int hf_zbee_zcl_ke_wait_time;
+static int hf_zbee_zcl_ke_cert_reconstr;
+static int hf_zbee_zcl_ke_cert_subject;
+static int hf_zbee_zcl_ke_cert_issuer;
+static int hf_zbee_zcl_ke_cert_profile_attr;
+static int hf_zbee_zcl_ke_cert_type;
+static int hf_zbee_zcl_ke_cert_serialno;
+static int hf_zbee_zcl_ke_cert_curve;
+static int hf_zbee_zcl_ke_cert_hash;
+static int hf_zbee_zcl_ke_cert_valid_from;
+static int hf_zbee_zcl_ke_cert_valid_to;
+static int hf_zbee_zcl_ke_cert_key_usage_agreement;
+static int hf_zbee_zcl_ke_cert_key_usage_signature;
+static int hf_zbee_zcl_ke_ephemeral_qeu;
+static int hf_zbee_zcl_ke_ephemeral_qev;
+static int hf_zbee_zcl_ke_macu;
+static int hf_zbee_zcl_ke_macv;
/* Initialize the subtree pointers */
-static gint ett_zbee_zcl_ke = -1;
-static gint ett_zbee_zcl_ke_cert = -1;
-static gint ett_zbee_zcl_ke_key_usage = -1;
+static int ett_zbee_zcl_ke;
+static int ett_zbee_zcl_ke_cert;
+static int ett_zbee_zcl_ke_key_usage;
/*************************/
/* Function Bodies */
@@ -15228,7 +14980,7 @@ static gint ett_zbee_zcl_ke_key_usage = -1;
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_ke_suite1_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_ke_suite1_certificate(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_ke_cert_reconstr, tvb, *offset, 22, ENC_NA);
*offset += 22;
@@ -15252,12 +15004,12 @@ dissect_zcl_ke_suite1_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_ke_suite2_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_ke_suite2_certificate(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
nstime_t valid_from_time;
nstime_t valid_to_time;
- guint32 valid_to;
- guint8 key_usage;
+ uint32_t valid_to;
+ uint8_t key_usage;
proto_tree *usage_tree;
proto_tree_add_item(tree, hf_zbee_zcl_ke_cert_type, tvb, *offset, 1, ENC_NA);
@@ -15294,7 +15046,7 @@ dissect_zcl_ke_suite2_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset
proto_tree_add_item(tree, hf_zbee_zcl_ke_cert_subject, tvb, *offset, 8, ENC_NA);
*offset += 8;
- key_usage = tvb_get_guint8(tvb, *offset);
+ key_usage = tvb_get_uint8(tvb, *offset);
usage_tree = proto_tree_add_subtree_format(tree, tvb, *offset, 1, ett_zbee_zcl_ke_key_usage, NULL, "Key Usage (0x%02x)", key_usage);
proto_tree_add_item(usage_tree, hf_zbee_zcl_ke_cert_key_usage_agreement, tvb, *offset, 1, ENC_NA);
@@ -15314,11 +15066,11 @@ dissect_zcl_ke_suite2_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_ke_initiate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_ke_initiate(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- gint rem_len;
+ int rem_len;
proto_tree *subtree;
- guint16 suite;
+ uint16_t suite;
suite = tvb_get_letohs(tvb, *offset);
@@ -15356,9 +15108,9 @@ dissect_zcl_ke_initiate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static int
-dissect_zcl_ke_ephemeral_qeu(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_ke_ephemeral_qeu(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- gint length;
+ int length;
/* size depends on suite but without a session we don't know that here */
/* so just report what we have */
@@ -15376,9 +15128,9 @@ dissect_zcl_ke_ephemeral_qeu(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static int
-dissect_zcl_ke_ephemeral_qev(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_ke_ephemeral_qev(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
- gint length;
+ int length;
/* size depends on suite but without a session we don't know that here */
/* so just report what we have */
@@ -15396,7 +15148,7 @@ dissect_zcl_ke_ephemeral_qev(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static int
-dissect_zcl_ke_confirm_macu(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_ke_confirm_macu(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_ke_macu, tvb, *offset, ZBEE_SEC_CONST_BLOCKSIZE, ENC_NA);
*offset += ZBEE_SEC_CONST_BLOCKSIZE;
@@ -15411,7 +15163,7 @@ dissect_zcl_ke_confirm_macu(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static int
-dissect_zcl_ke_confirm_macv(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_ke_confirm_macv(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_ke_macv, tvb, *offset, ZBEE_SEC_CONST_BLOCKSIZE, ENC_NA);
*offset += ZBEE_SEC_CONST_BLOCKSIZE;
@@ -15426,7 +15178,7 @@ dissect_zcl_ke_confirm_macv(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*@param offset pointer to offset from caller
*/
static void
-dissect_zcl_ke_terminate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
+dissect_zcl_ke_terminate(tvbuff_t *tvb, proto_tree *tree, unsigned *offset)
{
proto_tree_add_item(tree, hf_zbee_zcl_ke_status, tvb, *offset, 1, ENC_NA);
*offset += 1;
@@ -15449,9 +15201,9 @@ static int
dissect_zbee_zcl_ke(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
zbee_zcl_packet *zcl;
- guint offset = 0;
- guint8 cmd_id;
- gint rem_len;
+ unsigned offset = 0;
+ uint8_t cmd_id;
+ int rem_len;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -15645,7 +15397,7 @@ proto_register_zbee_zcl_ke(void)
};
/* subtrees */
- gint *ett[] = {
+ int *ett[] = {
&ett_zbee_zcl_ke,
&ett_zbee_zcl_ke_cert,
&ett_zbee_zcl_ke_key_usage,