Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Нет в XML описания #12

Closed
Cramac opened this issue Jan 21, 2017 · 2 comments
Closed

Нет в XML описания #12

Cramac opened this issue Jan 21, 2017 · 2 comments

Comments

@Cramac
Copy link

Cramac commented Jan 21, 2017

Приветствую.
В 5,3 версии есть некий турборежим. Так вот в ЛК он вызывается через 0x1200c но что то в xml его найти не получилось. Есть у кого?

@Cramac
Copy link
Author

Cramac commented Jan 21, 2017

вот что удалось мне самому сварганить, полурабочее:

	<function name="rpcf_user5_get_turbo_mode_settings" id="-0x1200c">
        <input>
            <integer name="slink_id"/>
        </input>
        <output>
		    <integer name="cnt"/>
            <for name="i" from="0" count="cnt">
				<integer name="id" array_index="i"/>
				<string name="name" array_index="i"/>
				<integer name="incoming_rate" array_index="i"/>
				<integer name="outgoing_rate" array_index="i"/>
				<long name="incoming_limit" array_index="i"/>
				<long name="outgoing_limit" array_index="i"/>
				<double name="cost" array_index="i"/>
			</for>
        </output>
    </function>

в ЛК от утм это выглядит так:

                $this->urfa->call(-0x1200c);
                $this->urfa->put_int($this->slink_id);
                $this->urfa->send();

                $modesCnt = $this->urfa->get_int();

                $modes = array();

                for($m = 0; $m < $modesCnt; $m++){
                    $modes[$m] = array();
                    $modes[$m]['id'] = $this->urfa->get_int();
                    $modes[$m]['name'] = $this->urfa->get_string();
                    $modes[$m]['incoming_rate'] = $this->urfa->get_int();
                    $modes[$m]['outgoing_rate'] = $this->urfa->get_int();

                    if($modes[$m]['incoming_rate'] == 0)
                        $modes[$m]['incoming_rate'] = $modes[$m]['outgoing_rate'];

                    if($modes[$m]['outgoing_rate'] == 0)
                        $modes[$m]['outgoing_rate'] = $modes[$m]['incoming_rate'];

                    $isDuration = $this->urfa->get_int();
                    if($isDuration)
                        $modes[$m]['duration'] = $this->urfa->get_int();
                    else {
                        $modes[$m]['incoming_limit'] = $this->urfa->get_long();
                        $modes[$m]['outgoing_limit'] = $this->urfa->get_long();
                    }

                    $modes[$m]['cost'] = $this->urfa->get_double();
                }

                $this->urfa->finish();

@k-shym
Copy link
Owner

k-shym commented Jun 21, 2018

Функция есть, её номер -0x1200b
-0x1200c эта версия для личного кабинета, вы можете добавить её в свой api.xml

@k-shym k-shym closed this as completed Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants