 |
ESP3D
3.0
Firmware for ESP boards connected to 3D Printer
|
Go to the documentation of this file.
20 #include "../../include/esp3d_config.h"
21 #if defined (FTP_FEATURE)
22 #include "../commands.h"
23 #include "../esp3doutput.h"
24 #include "../settings_esp3d.h"
25 #include "../../modules/authentication/authentication_service.h"
32 #ifdef AUTHENTICATION_FEATURE
34 output->
printERROR(
"Wrong authentication!", 401);
39 #endif //AUTHENTICATION_FEATURE
42 if (parameter.length() == 0) {
46 #ifdef AUTHENTICATION_FEATURE
48 output->
printERROR(
"Wrong authentication!", 401);
51 #endif //AUTHENTICATION_FEATURE
52 parameter =
get_param (cmd_params,
"ctrl=");
55 if (parameter.length() > 0) {
56 ibuf = parameter.toInt();
68 parameter =
get_param (cmd_params,
"active=");
69 if (parameter.length() > 0) {
70 ibuf = parameter.toInt();
82 parameter =
get_param (cmd_params,
"passive=");
83 if (parameter.length() > 0) {
84 ibuf = parameter.toInt();
96 if (response && done) {
99 if (response && !done) {
100 output->
printERROR (
"Only ctrl, active and passive settings are supported!");
109 #endif //TELNET_FEATURE
#define ESP_FTP_DATA_ACTIVE_PORT
const char * get_param(const char *cmd_params, const char *label)
static uint32_t get_max_int32_value(int pos)
static bool write_uint32(int pos, const uint32_t value)
#define ESP_FTP_CTRL_PORT
size_t printMSG(const char *s, bool withNL=true)
size_t printERROR(const char *s, int code_error=200)
static uint32_t get_min_int32_value(int pos)
static uint32_t read_uint32(int pos, bool *haserror=NULL)
bool ESP181(const char *cmd_params, level_authenticate_type auth_level, ESP3DOutput *output)
#define ESP_FTP_DATA_PASSIVE_PORT