Logo
Developing with ZBOSS for Zigbee
zb_zcl_tunneling.h File Reference

Data Structures

struct  zb_zcl_tunneling_attrs_s
 Tunneling cluster attributes. More...
 
struct  zb_zcl_tunneling_request_tunnel_s
 RequestTunnel command payload More...
 
struct  zb_zcl_tunneling_close_tunnel_s
 CloseTunnel command payload More...
 
struct  zb_zcl_tunneling_transfer_data_hdr_s
 TransferData commands header data. More...
 
struct  zb_zcl_tunneling_srv_rec_s
 
struct  zb_zcl_tunnel_request_params_out_s
 
struct  zb_zcl_tunneling_transfer_data_payload_s
 TransferData payload. This structure presents custom implementation of Transfer Data command payload defined in SE spec. More...
 
struct  zb_zcl_tunneling_transfer_data_error_s
 TransferDataError command payload More...
 
struct  zb_zcl_tunneling_request_tunnel_response_s
 RequestTunnelResponse command payload More...
 
struct  zb_zcl_tunneling_ack_transfer_data_s
 
struct  zb_zcl_tunneling_ready_data_s
 
struct  zb_zcl_tunneling_get_supported_tunnel_protocols_s
 
struct  zb_zcl_tunneling_protocol_field_s
 
struct  zb_zcl_tunneling_supported_tunnel_protocols_response_s
 
struct  zb_zcl_tunneling_tunnel_closure_notification_s
 

Macros

#define ZB_ZCL_TUNNELING_MAX_INCOMING_TRANSFER_SIZE   (ZB_ASDU_MAX_FRAG_LEN - 3 /* ZCL cmd */ - 2 /* Tunnel_ID */)
 
#define ZB_ZCL_TUNNELING_SRV_TABLE_SIZE   10
 
#define ZB_ZCL_TUNNELING_CLUSTER_REVISION_DEFAULT   ((zb_uint16_t)0x0002u)
 Default value for Tunneling cluster revision global attribute. More...
 
#define ZB_ZCL_TUNNELING_CLOSE_TUNNEL_TIMEOUT_MIN_VALUE   0x0001
 Min value for the CloseTunnelTimeout attribute. More...
 
#define ZB_ZCL_TUNNELING_CLOSE_TUNNEL_TIMEOUT_DEFAULT_VALUE   0xFFFF
 Default value for the CloseTunnelTimeout attribute. More...
 
#define ZB_ZCL_DECLARE_TUNNELING_ATTRIB_LIST(attr_list, close_tunnel_timeout)
 Declare attribute list for Tunneling cluster. More...
 
#define ZB_ZCL_DECLARE_TUNNELING_ATTR_LIST(attr_list, attrs)   ZB_ZCL_DECLARE_TUNNELING_ATTRIB_LIST(attr_list, &attrs.close_tunnel_timeout )
 Declare attribute list for Tunneling cluster cluster. More...
 
#define ZB_ZCL_TUNNELING_SEND_REQUEST_TUNNEL( _param, _addr, _dst_addr_mode, _dst_ep, _ep, _prfl_id, _def_resp, _cb, _protocol_id, _manufacturer_code, _flow_control_support, _max_incoming_transfer_size)
 Send RequestTunnel command. More...
 
#define ZB_ZCL_TUNNELING_GET_REQUEST_TUNNEL(_data_ptr, _buffer, _status)
 Macro for parsing payload of RequestTunnel command. More...
 
#define ZB_ZCL_TUNNELING_SEND_CLOSE_TUNNEL( _param, _addr, _dst_addr_mode, _dst_ep, _ep, _prfl_id, _def_resp, _cb, _tunnel_id)
 CloseTunnel command More...
 
#define ZB_ZCL_TUNNELING_GET_CLOSE_TUNNEL(_data_ptr, _buffer, _status)
 Macro for parsing payload of CloseTunnel command. More...
 
#define ZB_ZCL_TUNNELING_SERVER_SEND_TRANSFER_DATA( _param, _ep, _prfl_id, _def_resp, _cb, _tunnel_id, _data_size, _image_data)
 
#define ZB_ZCL_TUNNELING_CLIENT_SEND_TRANSFER_DATA( _param, _ep, _prfl_id, _def_resp, _cb, _tunnel_id, _data_size, _image_data)
 
#define ZB_ZCL_TUNNELING_GET_TRANSFER_DATA(_data_ptr, _buffer, _status)
 Macro for parsing payload of TransferData command. More...
 
#define ZB_ZCL_TUNNELING_SEND_TRANSFER_DATA_ERROR( _buffer, _addr, _dst_addr_mode, _dst_ep, _ep, _prfl_id, _def_resp, _cb, _seq_num, _tunnel_id, _transfer_data_status, _command_id, _direction)
 Send client TransferDataError command and server TransferDataError command. More...
 
#define ZB_ZCL_TUNNELING_GET_TRANSFER_DATA_ERROR(_data_ptr, _buffer, _status)
 Macro for parsing payload of TransferDataError command. More...
 
#define ZB_ZCL_TUNNELING_SEND_REQUEST_TUNNEL_RESPONSE( _param, _addr, _dst_addr_mode, _dst_ep, _ep, _prfl_id, _def_resp, _seq_num, _cb, _tunnel_id, _tunnel_status, _max_incoming_transfer_size)
 Macro for sending RequestTunnelResponse command. More...
 
#define ZB_ZCL_TUNNELING_GET_REQUEST_TUNNEL_RESPONSE(_data_ptr, _buffer, _status)
 Macro for parsing payload of RequestTunnelResponse command. More...
 
#define ZB_ZCL_CLUSTER_ID_TUNNELING_SERVER_ROLE_INIT   zb_zcl_tunneling_init_server
 
#define ZB_ZCL_CLUSTER_ID_TUNNELING_CLIENT_ROLE_INIT   zb_zcl_tunneling_init_client
 

Typedefs

typedef struct zb_zcl_tunneling_attrs_s zb_zcl_tunneling_attrs_t
 Tunneling cluster attributes. More...
 
typedef enum zb_zcl_tunneling_protocol_id_e zb_zcl_tunneling_protocol_id_t
 Tunneling ProtocolID Enumerations. More...
 
typedef struct zb_zcl_tunneling_request_tunnel_s zb_zcl_tunneling_request_tunnel_t
 RequestTunnel command payload More...
 
typedef struct zb_zcl_tunneling_close_tunnel_s zb_zcl_tunneling_close_tunnel_t
 CloseTunnel command payload More...
 
typedef struct zb_zcl_tunneling_transfer_data_hdr_s zb_zcl_tunneling_transfer_data_hdr_t
 TransferData commands header data. More...
 
typedef struct zb_zcl_tunneling_srv_rec_s zb_zcl_tunneling_srv_rec_t
 
typedef struct zb_zcl_tunnel_request_params_out_s zb_zcl_tunnel_request_params_out_t
 
typedef struct zb_zcl_tunneling_transfer_data_payload_s zb_zcl_tunneling_transfer_data_payload_t
 TransferData payload. This structure presents custom implementation of Transfer Data command payload defined in SE spec. More...
 
typedef struct zb_zcl_tunneling_transfer_data_error_s zb_zcl_tunneling_transfer_data_error_t
 TransferDataError command payload More...
 
typedef struct zb_zcl_tunneling_request_tunnel_response_s zb_zcl_tunneling_request_tunnel_response_t
 RequestTunnelResponse command payload More...
 
typedef struct zb_zcl_tunneling_ack_transfer_data_s zb_zcl_tunneling_ack_transfer_data_t
 
typedef struct zb_zcl_tunneling_ready_data_s zb_zcl_tunneling_ready_data_t
 
typedef struct zb_zcl_tunneling_get_supported_tunnel_protocols_s zb_zcl_tunneling_get_supported_tunnel_protocols_t
 
typedef struct zb_zcl_tunneling_protocol_field_s zb_zcl_tunneling_protocol_field_t
 
typedef struct zb_zcl_tunneling_supported_tunnel_protocols_response_s zb_zcl_tunneling_supported_tunnel_protocols_response_t
 
typedef struct zb_zcl_tunneling_tunnel_closure_notification_s zb_zcl_tunneling_tunnel_closure_notification_t
 

Enumerations

enum  zb_zcl_tunneling_attr_e { ZB_ZCL_ATTR_TUNNELING_CLOSE_TUNNEL_TIMEOUT_ID = 0 }
 Tunneling cluster attribute identifiers. More...
 
enum  zb_zcl_tunneling_cli_cmd_e {
  ZB_ZCL_TUNNELING_CLI_CMD_REQUEST_TUNNEL = 0x00, ZB_ZCL_TUNNELING_CLI_CMD_CLOSE_TUNNEL = 0x01, ZB_ZCL_TUNNELING_CLI_CMD_TRANSFER_DATA = 0x02, ZB_ZCL_TUNNELING_CLI_CMD_TRANSFER_DATA_ERROR = 0x03,
  ZB_ZCL_TUNNELING_CLI_CMD_ACK_TRANSFER_DATA = 0x04, ZB_ZCL_TUNNELING_CLI_CMD_READY_DATA = 0x05, ZB_ZCL_TUNNELING_CLI_CMD_GET_SUPPORTED_TUNNEL_PROTOCOLS = 0x06
}
 Tunnel cluster commands received. More...
 
enum  zb_zcl_tunneling_srv_cmd_e {
  ZB_ZCL_TUNNELING_SRV_CMD_REQUEST_TUNNEL_RESPONSE = 0x00, ZB_ZCL_TUNNELING_SRV_CMD_TRANSFER_DATA = 0x01, ZB_ZCL_TUNNELING_SRV_CMD_TRANSFER_DATA_ERROR = 0x02, ZB_ZCL_TUNNELING_SRV_CMD_ACK_TRANSFER_DATA = 0x03,
  ZB_ZCL_TUNNELING_SRV_CMD_READY_DATA = 0x04, ZB_ZCL_TUNNELING_SRV_CMD_SUPPORTED_TUNNEL_PROTOCOLS_RESPONSE = 0x05, ZB_ZCL_TUNNELING_SRV_CMD_TUNNEL_CLOSURE_NOTIFICATION = 0x06
}
 Tunnel cluster commands generated. More...
 
enum  zb_zcl_tunneling_tunnel_status_e {
  ZB_ZCL_TUNNELING_STATUS_SUCCESS = 0, ZB_ZCL_TUNNELING_STATUS_BUSY = 1, ZB_ZCL_TUNNELING_STATUS_NO_MORE_IDS = 2, ZB_ZCL_TUNNELING_STATUS_PROTOCOL_NOT_SUPPORTED = 3,
  ZB_ZCL_TUNNELING_STATUS_FLOW_CONTROL_NOT_SUPPORTED = 4
}
 TunnelStatus parameter values. More...
 
enum  zb_zcl_tunneling_transfer_data_status_e {
  ZB_ZCL_TUNNELING_TRANSFER_DATA_STATUS_NO_SUCH_TUNNEL = 0x00, ZB_ZCL_TUNNELING_TRANSFER_DATA_STATUS_WRONG_DEVICE = 0x01, ZB_ZCL_TUNNELING_TRANSFER_DATA_STATUS_DATA_OVERFLOW = 0x02, ZB_ZCL_TUNNELING_TRANSFER_DATA_INTERNAL_ERROR = 0xFE,
  ZB_ZCL_TUNNELING_TRANSFER_DATA_STATUS_OK = 0xFF
}
 TransferDataStatus parameter values. More...
 
enum  zb_zcl_tunneling_protocol_id_e {
  ZB_ZCL_TUNNELING_PROTOCOL_DLMS_COSEM = 0, ZB_ZCL_TUNNELING_PROTOCOL_IEC_61107 = 1, ZB_ZCL_TUNNELING_PROTOCOL_ANSI_C12 = 2, ZB_ZCL_TUNNELING_PROTOCOL_M_BUS = 3,
  ZB_ZCL_TUNNELING_PROTOCOL_SML = 4, ZB_ZCL_TUNNELING_PROTOCOL_CLIMATE_TALK = 5, ZB_ZCL_TUNNELING_PROTOCOL_GB_HRGP = 6, ZB_ZCL_TUNNELING_PROTOCOL_IPv4 = 7,
  ZB_ZCL_TUNNELING_PROTOCOL_IPv6 = 8, ZB_ZCL_TUNNELING_PROTOCOL_MANUFACTURER_DEFINED = 200, ZB_ZCL_TUNNELING_PROTOCOL_RESERVED = 255
}
 Tunneling ProtocolID Enumerations. More...
 

Functions

void zb_zcl_tunneling_set_max_incoming_to_cli_transfer_size (zb_uint16_t transfer_size)
 
void zb_zcl_tunneling_init_server (void)
 
void zb_zcl_tunneling_init_client (void)
 

Macro Definition Documentation

§ ZB_ZCL_CLUSTER_ID_TUNNELING_CLIENT_ROLE_INIT

#define ZB_ZCL_CLUSTER_ID_TUNNELING_CLIENT_ROLE_INIT   zb_zcl_tunneling_init_client

§ ZB_ZCL_CLUSTER_ID_TUNNELING_SERVER_ROLE_INIT

#define ZB_ZCL_CLUSTER_ID_TUNNELING_SERVER_ROLE_INIT   zb_zcl_tunneling_init_server

§ ZB_ZCL_TUNNELING_MAX_INCOMING_TRANSFER_SIZE

#define ZB_ZCL_TUNNELING_MAX_INCOMING_TRANSFER_SIZE   (ZB_ASDU_MAX_FRAG_LEN - 3 /* ZCL cmd */ - 2 /* Tunnel_ID */)

§ ZB_ZCL_TUNNELING_SRV_TABLE_SIZE

#define ZB_ZCL_TUNNELING_SRV_TABLE_SIZE   10

Function Documentation

§ zb_zcl_tunneling_init_client()

void zb_zcl_tunneling_init_client ( void  )

§ zb_zcl_tunneling_init_server()

void zb_zcl_tunneling_init_server ( void  )