2016-04-02 09:03:50 +02:00
|
|
|
#include "cw.h"
|
|
|
|
#include "dbg.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-17 17:29:09 +01:00
|
|
|
/*
|
2016-04-02 09:03:50 +02:00
|
|
|
int cw_radio_set_admin_state(mbag_t radios,int rid, int state, int cause)
|
|
|
|
{
|
|
|
|
mbag_t radio = mbag_i_get_mbag(radios,rid,NULL);
|
|
|
|
if (!radio) {
|
|
|
|
cw_dbg(DBG_ELEM_ERR,"Can't set radio administrative state for radio %d - radio does't exists",rid);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
mbag_set_byte(radio,CW_RADIOITEM_ADMIN_STATE,state);
|
|
|
|
|
|
|
|
if (cause < 0)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
|
2018-03-17 17:29:09 +01:00
|
|
|
// Set operational state for next config update response.
|
2016-04-02 09:03:50 +02:00
|
|
|
|
|
|
|
mbag_set_word(radio,CW_RADIOITEM_OPER_STATE, (state<<8) | 3);
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
2018-03-17 17:29:09 +01:00
|
|
|
*/
|
2016-04-02 09:03:50 +02:00
|
|
|
|
|
|
|
|