mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
mesh: generic on off client
This commit is contained in:
parent
16d1335912
commit
92c33ebfc3
@ -2502,4 +2502,28 @@ typedef uint8_t sm_key_t[16];
|
||||
*/
|
||||
#define MESH_SUBEVENT_STATE_UPDATE_BOOL 0x24
|
||||
|
||||
/**
|
||||
* @format 114412
|
||||
* @param subevent_code
|
||||
* @param element_index
|
||||
* @param model_identifier
|
||||
* @param state_identifier
|
||||
* @param reason
|
||||
* @param value
|
||||
*/
|
||||
#define MESH_SUBEVENT_STATE_UPDATE_INT16 0x25
|
||||
|
||||
// Mesh Client Events
|
||||
/**
|
||||
* @format 114114
|
||||
* @param subevent_code
|
||||
* @param element_index
|
||||
* @param model_identifier
|
||||
* @param present_value
|
||||
* @param target_value // optinal, if value > 0, than remaining_time_ms must be read
|
||||
* @param remaining_time_ms
|
||||
*/
|
||||
#define MESH_SUBEVENT_GENERIC_ON_OFF_STATUS 0x30
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -7599,6 +7599,89 @@ static inline uint8_t mesh_subevent_state_update_bool_get_value(const uint8_t *
|
||||
return event[13];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field element_index from event MESH_SUBEVENT_STATE_UPDATE_INT16
|
||||
* @param event packet
|
||||
* @return element_index
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t mesh_subevent_state_update_int16_get_element_index(const uint8_t * event){
|
||||
return event[3];
|
||||
}
|
||||
/**
|
||||
* @brief Get field model_identifier from event MESH_SUBEVENT_STATE_UPDATE_INT16
|
||||
* @param event packet
|
||||
* @return model_identifier
|
||||
* @note: btstack_type 4
|
||||
*/
|
||||
static inline uint32_t mesh_subevent_state_update_int16_get_model_identifier(const uint8_t * event){
|
||||
return little_endian_read_32(event, 4);
|
||||
}
|
||||
/**
|
||||
* @brief Get field state_identifier from event MESH_SUBEVENT_STATE_UPDATE_INT16
|
||||
* @param event packet
|
||||
* @return state_identifier
|
||||
* @note: btstack_type 4
|
||||
*/
|
||||
static inline uint32_t mesh_subevent_state_update_int16_get_state_identifier(const uint8_t * event){
|
||||
return little_endian_read_32(event, 8);
|
||||
}
|
||||
/**
|
||||
* @brief Get field reason from event MESH_SUBEVENT_STATE_UPDATE_INT16
|
||||
* @param event packet
|
||||
* @return reason
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t mesh_subevent_state_update_int16_get_reason(const uint8_t * event){
|
||||
return event[12];
|
||||
}
|
||||
/**
|
||||
* @brief Get field value from event MESH_SUBEVENT_STATE_UPDATE_INT16
|
||||
* @param event packet
|
||||
* @return value
|
||||
* @note: btstack_type 2
|
||||
*/
|
||||
static inline uint16_t mesh_subevent_state_update_int16_get_value(const uint8_t * event){
|
||||
return little_endian_read_16(event, 13);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field element_index from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS
|
||||
* @param event packet
|
||||
* @return element_index
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t mesh_subevent_generic_on_off_status_get_element_index(const uint8_t * event){
|
||||
return event[3];
|
||||
}
|
||||
/**
|
||||
* @brief Get field present_value from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS
|
||||
* @param event packet
|
||||
* @return present_value
|
||||
* @note: btstack_type 4
|
||||
*/
|
||||
static inline uint32_t mesh_subevent_generic_on_off_status_get_present_value(const uint8_t * event){
|
||||
return little_endian_read_32(event, 4);
|
||||
}
|
||||
/**
|
||||
* @brief Get field target_value from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS
|
||||
* @param event packet
|
||||
* @return target_value
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t mesh_subevent_generic_on_off_status_get_target_value(const uint8_t * event){
|
||||
return event[8];
|
||||
}
|
||||
/**
|
||||
* @brief Get field remaining_time_ms from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS
|
||||
* @param event packet
|
||||
* @return remaining_time_ms
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t mesh_subevent_generic_on_off_status_get_remaining_time_ms(const uint8_t * event){
|
||||
return event[9];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* API_END */
|
||||
|
@ -53,7 +53,7 @@ LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
|
||||
mesh: mesh.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} pb_adv.o pb_gatt.o mesh_foundation.o mesh_provisioning_service_server.o mesh_crypto.o provisioning_device.o mesh_network.o mesh_peer.o mesh_lower_transport.o mesh_transport.o mesh_virtual_addresses.o mesh_keys.o mesh_proxy.o mesh_access.o mesh_configuration_server.o mesh_generic_server.o mesh_generic_level_server.o mesh.o
|
||||
mesh: mesh.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} pb_adv.o pb_gatt.o mesh_foundation.o mesh_provisioning_service_server.o mesh_crypto.o provisioning_device.o mesh_network.o mesh_peer.o mesh_lower_transport.o mesh_transport.o mesh_virtual_addresses.o mesh_keys.o mesh_proxy.o mesh_access.o mesh_configuration_server.o mesh_generic_server.o mesh_generic_level_server.o mesh_generic_client.o mesh.o
|
||||
${CC} $(filter-out mesh.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
||||
|
||||
provisioner: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} pb_adv.o mesh_crypto.o provisioning_provisioner.o mesh_keys.o provisioner.o
|
||||
|
202
test/mesh/mesh_generic_client.c
Normal file
202
test/mesh/mesh_generic_client.c
Normal file
@ -0,0 +1,202 @@
|
||||
/*
|
||||
* Copyright (C) 2019 BlueKitchen GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holders nor the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* 4. Any redistribution, use, or modification is done solely for
|
||||
* personal benefit and not for any commercial purpose or for
|
||||
* monetary gain.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
|
||||
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Please inquire about commercial licensing options at
|
||||
* contact@bluekitchen-gmbh.com
|
||||
*
|
||||
*/
|
||||
|
||||
#define __BTSTACK_FILE__ "mesh_generic_client.c"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "mesh_generic_client.h"
|
||||
#include "btstack_util.h"
|
||||
#include "mesh_generic_model.h"
|
||||
#include "ble/mesh/mesh_network.h"
|
||||
#include "mesh_keys.h"
|
||||
#include "mesh_transport.h"
|
||||
#include "mesh_access.h"
|
||||
#include "mesh_foundation.h"
|
||||
#include "bluetooth_company_id.h"
|
||||
#include "btstack_memory.h"
|
||||
#include "btstack_debug.h"
|
||||
|
||||
static void generic_client_send_message(uint16_t src, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index, mesh_pdu_t *pdu){
|
||||
uint8_t ttl = mesh_foundation_default_ttl_get();
|
||||
mesh_upper_transport_setup_access_pdu_header(pdu, netkey_index, appkey_index, ttl, src, dest, 0);
|
||||
mesh_upper_transport_send_access_pdu(pdu);
|
||||
}
|
||||
|
||||
void mesh_generic_on_off_client_register_packet_handler(mesh_model_t *mesh_model, btstack_packet_handler_t transition_events_packet_handler){
|
||||
if (transition_events_packet_handler == NULL){
|
||||
log_error("mesh_generic_on_off_client_register_packet_handler called with NULL callback");
|
||||
return;
|
||||
}
|
||||
if (mesh_model == NULL){
|
||||
log_error("mesh_generic_on_off_client_register_packet_handler called with NULL mesh_model");
|
||||
return;
|
||||
}
|
||||
mesh_model->model_packet_handler = &transition_events_packet_handler;
|
||||
}
|
||||
|
||||
// Generic On Off State
|
||||
|
||||
static void generic_on_off_status_handler(mesh_model_t *mesh_model, mesh_pdu_t * pdu){
|
||||
if (!mesh_model->model_packet_handler){
|
||||
log_error("model_packet_handler == NULL");
|
||||
}
|
||||
|
||||
mesh_access_parser_state_t parser;
|
||||
mesh_access_parser_init(&parser, (mesh_pdu_t*) pdu);
|
||||
|
||||
uint8_t present_value = mesh_access_parser_get_u8(&parser);
|
||||
uint8_t target_value = 0;
|
||||
uint8_t remaining_time_gdtt = 0;
|
||||
|
||||
if (mesh_access_parser_available(&parser) == 2){
|
||||
target_value = mesh_access_parser_get_u8(&parser);
|
||||
remaining_time_gdtt = mesh_access_parser_get_u8(&parser);
|
||||
}
|
||||
|
||||
uint8_t event[14] = {HCI_EVENT_MESH_META, 12, MESH_SUBEVENT_GENERIC_ON_OFF_STATUS};
|
||||
int pos = 0;
|
||||
event[pos++] = HCI_EVENT_MESH_META;
|
||||
// reserve for size
|
||||
pos++;
|
||||
event[pos++] = MESH_SUBEVENT_GENERIC_ON_OFF_STATUS;
|
||||
|
||||
// element index
|
||||
event[pos++] = mesh_model->element->element_index;
|
||||
// model_id
|
||||
little_endian_store_32(event, pos, mesh_model->model_identifier);
|
||||
pos += 4;
|
||||
|
||||
event[pos++] = present_value;
|
||||
event[pos++] = target_value;
|
||||
little_endian_store_32(event, pos, (uint32_t) mesh_access_time_gdtt2ms(remaining_time_gdtt));
|
||||
pos += 4;
|
||||
event[1] = pos - 2;
|
||||
|
||||
(*mesh_model->model_packet_handler)(HCI_EVENT_PACKET, 0, event, pos);
|
||||
mesh_access_message_processed(pdu);
|
||||
}
|
||||
|
||||
// Generic On Off Message
|
||||
|
||||
const mesh_access_message_t mesh_generic_on_off_set_with_transition = {
|
||||
MESH_GENERIC_ON_OFF_SET, "1111"
|
||||
};
|
||||
|
||||
const mesh_access_message_t mesh_generic_on_off_set_instantaneous = {
|
||||
MESH_GENERIC_ON_OFF_SET, "11"
|
||||
};
|
||||
|
||||
const mesh_access_message_t mesh_generic_on_off_set_unacknowledged_with_transition = {
|
||||
MESH_GENERIC_ON_OFF_SET_UNACKNOWLEDGED, "1111"
|
||||
};
|
||||
|
||||
const mesh_access_message_t mesh_generic_on_off_set_unacknowledged_instantaneous = {
|
||||
MESH_GENERIC_ON_OFF_SET_UNACKNOWLEDGED, "11"
|
||||
};
|
||||
|
||||
const mesh_access_message_t mesh_generic_on_off_get = {
|
||||
MESH_GENERIC_ON_OFF_GET, ""
|
||||
};
|
||||
|
||||
const static mesh_operation_t mesh_generic_on_off_model_operations[] = {
|
||||
{ MESH_GENERIC_ON_OFF_STATUS, 0, generic_on_off_status_handler },
|
||||
{ 0, 0, NULL }
|
||||
};
|
||||
|
||||
const mesh_operation_t * mesh_generic_on_off_client_get_operations(void){
|
||||
return mesh_generic_on_off_model_operations;
|
||||
}
|
||||
|
||||
static uint8_t mesh_generic_on_off_client_set_with_transition_message(mesh_model_t *mesh_model, const mesh_access_message_t * message_template,
|
||||
uint16_t dest, uint16_t netkey_index, uint16_t appkey_index,
|
||||
uint8_t on_off_value, uint8_t transition_time_gdtt, uint8_t delay_time_gdtt){
|
||||
if (mesh_model->element == NULL){
|
||||
log_error("mesh_model->element == NULL");
|
||||
}
|
||||
// setup message
|
||||
uint8_t transaction_id = mesh_access_transactions_get_next_transaction_id();
|
||||
mesh_transport_pdu_t * transport_pdu = mesh_access_setup_segmented_message(message_template, on_off_value, transaction_id, transition_time_gdtt, delay_time_gdtt);
|
||||
if (!transport_pdu) return 0;
|
||||
// send as segmented access pdu
|
||||
generic_client_send_message(mesh_access_get_element_address(mesh_model), dest, netkey_index, appkey_index, (mesh_pdu_t *) transport_pdu);
|
||||
return transaction_id;
|
||||
}
|
||||
|
||||
static uint8_t mesh_generic_on_off_client_set_instantaneous_message(mesh_model_t *mesh_model, const mesh_access_message_t * message_template,
|
||||
uint16_t dest, uint16_t netkey_index, uint16_t appkey_index, uint8_t on_off_value){
|
||||
if (mesh_model->element == NULL){
|
||||
log_error("mesh_model->element == NULL");
|
||||
}
|
||||
// setup message
|
||||
uint8_t transaction_id = mesh_access_transactions_get_next_transaction_id();
|
||||
mesh_transport_pdu_t * transport_pdu = mesh_access_setup_segmented_message(message_template, on_off_value, transaction_id);
|
||||
if (!transport_pdu) return 0;
|
||||
// send as segmented access pdu
|
||||
generic_client_send_message(mesh_access_get_element_address(mesh_model), dest, netkey_index, appkey_index, (mesh_pdu_t *) transport_pdu);
|
||||
return transaction_id;
|
||||
}
|
||||
|
||||
uint8_t mesh_generic_on_off_client_set_value(mesh_model_t * mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index, uint8_t on_off_value, uint8_t transition_time_gdtt, uint8_t delay_time_gdtt){
|
||||
if (transition_time_gdtt != 0) {
|
||||
return mesh_generic_on_off_client_set_with_transition_message(mesh_model, &mesh_generic_on_off_set_with_transition, dest, netkey_index, appkey_index, on_off_value, transition_time_gdtt, delay_time_gdtt);
|
||||
} else {
|
||||
return mesh_generic_on_off_client_set_instantaneous_message(mesh_model, &mesh_generic_on_off_set_instantaneous, dest, netkey_index, appkey_index, on_off_value);
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t mesh_generic_on_off_client_set_value_unacknowledged(mesh_model_t * mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index, uint8_t on_off_value, uint8_t transition_time_gdtt, uint8_t delay_time_gdtt){
|
||||
if (transition_time_gdtt != 0) {
|
||||
return mesh_generic_on_off_client_set_with_transition_message(mesh_model, &mesh_generic_on_off_set_unacknowledged_with_transition, dest, netkey_index, appkey_index, on_off_value, transition_time_gdtt, delay_time_gdtt);
|
||||
} else {
|
||||
return mesh_generic_on_off_client_set_instantaneous_message(mesh_model, &mesh_generic_on_off_set_unacknowledged_instantaneous, dest, netkey_index, appkey_index, on_off_value);
|
||||
}
|
||||
}
|
||||
|
||||
void mesh_generic_on_off_client_get_value(mesh_model_t *mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index){
|
||||
if (mesh_model->element == NULL){
|
||||
log_error("mesh_model->element == NULL");
|
||||
}
|
||||
// setup message
|
||||
mesh_transport_pdu_t * transport_pdu = mesh_access_setup_segmented_message(&mesh_generic_on_off_get);
|
||||
if (!transport_pdu) return;
|
||||
// send as segmented access pdu
|
||||
generic_client_send_message(mesh_access_get_element_address(mesh_model), dest, netkey_index, appkey_index, (mesh_pdu_t *) transport_pdu);
|
||||
}
|
||||
|
||||
|
||||
|
97
test/mesh/mesh_generic_client.h
Normal file
97
test/mesh/mesh_generic_client.h
Normal file
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright (C) 2019 BlueKitchen GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holders nor the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* 4. Any redistribution, use, or modification is done solely for
|
||||
* personal benefit and not for any commercial purpose or for
|
||||
* monetary gain.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
|
||||
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Please inquire about commercial licensing options at
|
||||
* contact@bluekitchen-gmbh.com
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MESH_GENERIC_CLIENT_H
|
||||
#define __MESH_GENERIC_CLIENT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "mesh_access.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
const mesh_operation_t * mesh_generic_on_off_client_get_operations(void);
|
||||
/**
|
||||
* @brief Register packet handler
|
||||
* @param generic_on_off_client_model
|
||||
* @param events_packet_handler
|
||||
*/
|
||||
void mesh_generic_on_off_client_register_packet_handler(mesh_model_t *mesh_model, btstack_packet_handler_t events_packet_handler);
|
||||
|
||||
/**
|
||||
* @brief Set ON/OFF value
|
||||
* @param mesh_model
|
||||
* @param dest
|
||||
* @param netkey_index
|
||||
* @param appkey_index
|
||||
* @param on_off_value
|
||||
* @param transition_time_gdtt
|
||||
* @param delay_time_gdtt
|
||||
* @return transaction_id if transaction_id == 0, it is invalid
|
||||
*/
|
||||
uint8_t mesh_generic_on_off_client_set_value(mesh_model_t * mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index, uint8_t on_off_value, uint8_t transition_time_gdtt, uint8_t delay_time_gdtt);
|
||||
|
||||
/**
|
||||
* @brief Get present ON/OFF value
|
||||
* @param mesh_model
|
||||
* @param dest
|
||||
* @param netkey_index
|
||||
* @param appkey_index
|
||||
* @param on_off_value
|
||||
* @param transition_time_gdtt
|
||||
* @param delay_time_gdtt
|
||||
* @return transaction_id if transaction_id == 0, it is invalid
|
||||
*/
|
||||
uint8_t mesh_generic_on_off_client_set_value_unacknowledged(mesh_model_t * mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index, uint8_t on_off_value, uint8_t transition_time_gdtt, uint8_t delay_time_gdtt);
|
||||
|
||||
/**
|
||||
* @brief Get present ON/OFF value
|
||||
* @param mesh_model
|
||||
* @param dest
|
||||
* @param netkey_index
|
||||
* @param appkey_index
|
||||
*/
|
||||
void mesh_generic_on_off_client_get_value(mesh_model_t *mesh_model, uint16_t dest, uint16_t netkey_index, uint16_t appkey_index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
@ -180,11 +180,11 @@ void mesh_generic_on_off_server_register_packet_handler(mesh_model_t *generic_on
|
||||
}
|
||||
|
||||
const mesh_access_message_t mesh_generic_on_off_status_transition = {
|
||||
MESH_GENERIC_ON_OFF_STATUS, "111"
|
||||
MESH_GENERIC_ON_OFF_SET, "111"
|
||||
};
|
||||
|
||||
const mesh_access_message_t mesh_generic_on_off_status_instantaneous = {
|
||||
MESH_GENERIC_ON_OFF_STATUS, "1"
|
||||
MESH_GENERIC_ON_OFF_SET, "1"
|
||||
};
|
||||
|
||||
static void mesh_generic_on_off_status_message(mesh_model_t *generic_on_off_server_model, uint16_t netkey_index, uint16_t dest, uint16_t appkey_index){
|
||||
|
Loading…
x
Reference in New Issue
Block a user