Exemple #1
0
/*
 * @brief Do the protocal level command handler
 * Note: this function does hiden process in embeded target, mobile phone can
 * get those information via commands to identify it.
 *
 * @param[i] cmdType    command type
 * @param[i] cmd        command id
 * @param[i] pData      data to be handled
 * @param[i] len        length of pData context
 *
 * @return
 *  0 : continue process
 *  1 : this is an internal command, no needer further process
 */
int32_t bicProcessCmd(uint8_t cmdType,
            uint8_t cmd, uint8_t *pData, uint8_t len)
{
    uint32_t ret = 0;

    Trace("type:%d, cmd:%d, len:%d", cmdType, cmd, len);
    switch(cmdType)
    {
        case CMD_TYPE_ACK:
            break;

        case CMD_TYPE_QUERY:
            ret = onQuery(cmd, pData, len);
            break;

        case CMD_TYPE_SET:
            ret = onSet(cmd, pData, len);
            break;

        default:
            break;
    }

    return ret;
}
InfoDlg::InfoDlg(SimpleQt *parent)
    : QDialog(parent),
    m_hApBase(NULL)
{
    ui.setupUi(this);
    m_pMainWnd = parent;

    connect(ui.pushButton_Get, SIGNAL(clicked()), this, SLOT(onGet()));
    connect(ui.pushButton_Set, SIGNAL(clicked()), this, SLOT(onSet()));
}
Exemple #3
0
Player::Player()
{
    onSet();
}