Work on mods
FossilOrigin-Name: b97c913c6d4499d5451e53075322a9313abbf36f114433d48e4cef7094ab2123
This commit is contained in:
parent
2e39deb1f4
commit
4d242d1b44
@ -10,8 +10,10 @@ int cw_out_wtp_board_data(struct conn *conn, struct cw_action_out *a, uint8_t *
|
|||||||
{
|
{
|
||||||
mbag_t board_data =
|
mbag_t board_data =
|
||||||
mbag_get_mbag(conn->config, CW_ITEM_WTP_BOARD_DATA,NULL);
|
mbag_get_mbag(conn->config, CW_ITEM_WTP_BOARD_DATA,NULL);
|
||||||
|
|
||||||
|
|
||||||
if (!board_data) {
|
if (!board_data) {
|
||||||
cw_log(LOG_ERR, "Error: Can't send WTP Board Data element. WTP Board Data is not defined.");
|
cw_log(LOG_ERR, "Error: Can't send WTP Board Data element. \"%s\" is undefined.",CW_ITEM_WTP_BOARD_DATA);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,6 +217,7 @@ int wtpconf_preinit()
|
|||||||
conf_hardware_version = bstr_create_from_cfgstr(CONF_DEFAULT_HARDWARE_VERSION);
|
conf_hardware_version = bstr_create_from_cfgstr(CONF_DEFAULT_HARDWARE_VERSION);
|
||||||
conf_bootloader_version = bstr_create_from_cfgstr(CONF_DEFAULT_BOOTLOADER_VERSION);
|
conf_bootloader_version = bstr_create_from_cfgstr(CONF_DEFAULT_BOOTLOADER_VERSION);
|
||||||
conf_serial_no = bstr_create_from_cfgstr(CONF_DEFAULT_SERIAL_NO);
|
conf_serial_no = bstr_create_from_cfgstr(CONF_DEFAULT_SERIAL_NO);
|
||||||
|
conf_model_no = bstr_create_from_cfgstr(CONF_DEFAULT_MODEL_NO);
|
||||||
|
|
||||||
conf_board_id = bstr_create_from_cfgstr(CONF_DEFAULT_BOARD_ID);
|
conf_board_id = bstr_create_from_cfgstr(CONF_DEFAULT_BOARD_ID);
|
||||||
conf_board_revision = bstr_create_from_cfgstr(CONF_DEFAULT_BOARD_REVISION);
|
conf_board_revision = bstr_create_from_cfgstr(CONF_DEFAULT_BOARD_REVISION);
|
||||||
|
@ -166,8 +166,17 @@ conn->config=mbag_create();
|
|||||||
mbag_set_bstr16n(board_data, CW_ITEM_WTP_BOARD_SERIALNO,
|
mbag_set_bstr16n(board_data, CW_ITEM_WTP_BOARD_SERIALNO,
|
||||||
bstr_data(conf_serial_no), bstr_len(conf_serial_no));
|
bstr_data(conf_serial_no), bstr_len(conf_serial_no));
|
||||||
|
|
||||||
|
mbag_set_bstr16n(board_data, CW_ITEM_WTP_BOARD_MODELNO, bstr_data(conf_model_no),bstr_len(conf_model_no));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mbag_set_mavl(conn->outgoing, CW_ITEM_WTP_BOARD_DATA, board_data);
|
mbag_set_mbag(conn->config, CW_ITEM_WTP_BOARD_DATA, board_data);
|
||||||
|
|
||||||
|
printf("Board_data %p\n",board_data);
|
||||||
|
|
||||||
|
mbag_t mb = mbag_get_mbag(conn->config,CW_ITEM_WTP_BOARD_DATA,NULL);
|
||||||
|
printf("mbag %p\n",mb);
|
||||||
|
|
||||||
|
|
||||||
cw_acpriolist_t acprios = cw_acpriolist_create();
|
cw_acpriolist_t acprios = cw_acpriolist_create();
|
||||||
cw_acpriolist_set(acprios,"Master AC",strlen("Master AC"),1);
|
cw_acpriolist_set(acprios,"Master AC",strlen("Master AC"),1);
|
||||||
|
Loading…
Reference in New Issue
Block a user